akkoma-fe/build/build.js
Floatingghost 1092d43802
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
remove nonsense dep
2024-06-23 03:02:45 +01:00

36 lines
858 B
JavaScript

// https://github.com/shelljs/shelljs
require("./check-versions")();
require("shelljs/global");
env.NODE_ENV = "production";
var path = require("path");
var config = require("../config");
var webpack = require("webpack");
var webpackConfig = require("./webpack.prod.conf");
console.log(
" Tip:\n" +
" Built files are meant to be served over an HTTP server.\n" +
" Opening index.html over file:// won't work.\n",
);
var assetsPath = path.join(
config.build.assetsRoot,
config.build.assetsSubDirectory,
);
rm("-rf", assetsPath);
mkdir("-p", assetsPath);
cp("-R", "static/*", assetsPath);
webpack(webpackConfig, function (err, stats) {
if (err) throw err;
process.stdout.write(
stats.toString({
colors: true,
modules: false,
children: false,
chunks: false,
chunkModules: false,
}) + "\n",
);
});