2022-06-09 12:51:19 +02:00
|
|
|
/*
|
2022-09-29 12:02:41 +02:00
|
|
|
GoToSocial
|
2023-01-05 12:43:00 +01:00
|
|
|
Copyright (C) 2021-2023 GoToSocial Authors admin@gotosocial.org
|
2022-06-09 12:51:19 +02:00
|
|
|
|
2022-09-29 12:02:41 +02:00
|
|
|
This program is free software: you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU Affero General Public License as published by
|
|
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
|
|
(at your option) any later version.
|
2022-06-09 12:51:19 +02:00
|
|
|
|
2022-09-29 12:02:41 +02:00
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU Affero General Public License for more details.
|
2022-06-09 12:51:19 +02:00
|
|
|
|
2022-09-29 12:02:41 +02:00
|
|
|
You should have received a copy of the GNU Affero General Public License
|
|
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
2022-06-09 12:51:19 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
"use strict";
|
|
|
|
|
2022-11-02 16:31:43 +01:00
|
|
|
const skulk = require("skulk");
|
|
|
|
const fs = require("fs");
|
|
|
|
const path = require("path");
|
2022-06-09 12:51:19 +02:00
|
|
|
|
2022-11-02 16:31:43 +01:00
|
|
|
let cssEntryFiles = fs.readdirSync(path.join(__dirname, "./css")).map((file) => {
|
2022-10-03 16:46:38 +02:00
|
|
|
return path.join(__dirname, "./css", file);
|
2022-06-09 12:51:19 +02:00
|
|
|
});
|
|
|
|
|
2022-11-02 16:31:43 +01:00
|
|
|
const prodCfg = {
|
|
|
|
transform: [
|
|
|
|
["uglifyify", {
|
2022-10-03 16:46:38 +02:00
|
|
|
global: true,
|
2022-11-02 16:31:43 +01:00
|
|
|
exts: ".js"
|
|
|
|
}],
|
2023-01-18 14:45:14 +01:00
|
|
|
["@browserify/envify", { global: true }]
|
2022-11-02 16:31:43 +01:00
|
|
|
]
|
|
|
|
};
|
|
|
|
|
|
|
|
skulk({
|
|
|
|
name: "GoToSocial",
|
|
|
|
basePath: __dirname,
|
|
|
|
assetPath: "../assets/",
|
|
|
|
prodCfg: {
|
|
|
|
servers: {
|
|
|
|
express: false,
|
|
|
|
livereload: false
|
2022-10-03 16:46:38 +02:00
|
|
|
}
|
|
|
|
},
|
2022-11-02 16:31:43 +01:00
|
|
|
servers: {
|
|
|
|
express: {
|
|
|
|
proxy: "http://localhost:8081",
|
|
|
|
assets: "/assets"
|
2022-10-03 16:46:38 +02:00
|
|
|
}
|
|
|
|
},
|
2022-11-02 16:31:43 +01:00
|
|
|
bundles: {
|
|
|
|
frontend: {
|
|
|
|
entryFile: "frontend",
|
|
|
|
outputFile: "frontend.js",
|
|
|
|
preset: ["js"],
|
|
|
|
prodCfg: prodCfg,
|
|
|
|
transform: [
|
|
|
|
["babelify", {
|
|
|
|
global: true,
|
|
|
|
ignore: [/node_modules\/(?!(photoswipe.*))/]
|
|
|
|
}]
|
|
|
|
],
|
|
|
|
},
|
|
|
|
settings: {
|
2023-01-18 14:45:14 +01:00
|
|
|
debug: false,
|
2022-11-02 16:31:43 +01:00
|
|
|
entryFile: "settings",
|
|
|
|
outputFile: "settings.js",
|
|
|
|
prodCfg: prodCfg,
|
|
|
|
presets: [
|
|
|
|
"react",
|
|
|
|
["postcss", {
|
|
|
|
output: "settings-style.css"
|
|
|
|
}]
|
|
|
|
]
|
|
|
|
},
|
|
|
|
css: {
|
|
|
|
entryFiles: cssEntryFiles,
|
|
|
|
outputFile: "_discard",
|
|
|
|
presets: [["postcss", {
|
|
|
|
output: "_split"
|
|
|
|
}]]
|
|
|
|
}
|
2022-10-03 16:46:38 +02:00
|
|
|
}
|
2022-11-02 16:31:43 +01:00
|
|
|
});
|