2023-01-07 00:21:18 +08:00
|
|
|
const Fs = require("fs");
|
|
|
|
const Fse = require("fs-extra");
|
|
|
|
const Path = require("path");
|
|
|
|
|
|
|
|
const componentsPath = Path.join("www", "components");
|
2023-06-01 17:08:26 +08:00
|
|
|
const oldComponentsPath = Path.join("www", "bower_components");
|
2023-01-07 00:21:18 +08:00
|
|
|
Fse.mkdirpSync(componentsPath);
|
2023-06-01 17:08:26 +08:00
|
|
|
Fse.rmSync(oldComponentsPath, { recursive: true, force: true });
|
2023-01-07 00:21:18 +08:00
|
|
|
|
|
|
|
[
|
2023-02-01 23:53:38 +08:00
|
|
|
"alertify.js",
|
|
|
|
"bootstrap",
|
|
|
|
"bootstrap-tokenfield",
|
|
|
|
"chainpad",
|
|
|
|
"chainpad-listmap",
|
|
|
|
"chainpad-netflux",
|
2023-01-07 15:13:01 +08:00
|
|
|
"ckeditor",
|
2023-01-07 15:16:09 +08:00
|
|
|
"codemirror",
|
2023-02-01 23:53:38 +08:00
|
|
|
"components-font-awesome",
|
|
|
|
"croppie",
|
|
|
|
"file-saver",
|
|
|
|
"hyper-json",
|
|
|
|
"jquery",
|
|
|
|
"json.sortify",
|
|
|
|
"jszip",
|
|
|
|
"dragula",
|
|
|
|
"html2canvas",
|
|
|
|
"localforage",
|
2023-01-07 15:20:46 +08:00
|
|
|
"marked",
|
2023-02-01 23:53:38 +08:00
|
|
|
"mathjax",
|
|
|
|
"open-sans-fontface",
|
|
|
|
"tweetnacl",
|
|
|
|
"require-css",
|
2023-01-07 15:34:32 +08:00
|
|
|
"requirejs",
|
|
|
|
"requirejs-plugins",
|
2023-01-07 19:25:02 +08:00
|
|
|
"scrypt-async",
|
2023-01-07 20:22:36 +08:00
|
|
|
"sortablejs",
|
2023-02-01 23:53:38 +08:00
|
|
|
// both client and server:
|
|
|
|
"chainpad-crypto",
|
2023-01-07 20:22:36 +08:00
|
|
|
"saferphore",
|
2023-02-01 23:53:38 +08:00
|
|
|
"nthen",
|
2023-01-07 20:47:29 +08:00
|
|
|
"netflux-websocket",
|
2023-06-30 18:45:54 +08:00
|
|
|
"drawio",
|
|
|
|
"pako",
|
|
|
|
"x2js"
|
2023-01-07 00:21:18 +08:00
|
|
|
].forEach(l => {
|
|
|
|
const source = Path.join("node_modules", l);
|
|
|
|
const destination = Path.join(componentsPath, l);
|
|
|
|
Fs.cpSync(source, destination, { recursive: true });
|
|
|
|
});
|