mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-11-01 21:41:45 +08:00
build(copy-dist): get rid of manual node_module copying
this is useless at the moment, as all build processes are running "npm ci --omit=dev" anyways, i.e. they will just install everything remaining again
This commit is contained in:
parent
1e713469e7
commit
17d5fdb4b0
@ -11,13 +11,6 @@ function log(...args: any[]) {
|
||||
}
|
||||
}
|
||||
|
||||
function copyNodeModuleFileOrFolder(source: string) {
|
||||
const destination = path.join(DEST_DIR, source);
|
||||
log(`Copying ${source} to ${destination}`);
|
||||
fs.ensureDirSync(path.dirname(destination));
|
||||
fs.copySync(source, destination);
|
||||
}
|
||||
|
||||
try {
|
||||
|
||||
const assetsToCopy = new Set([
|
||||
@ -61,47 +54,6 @@ try {
|
||||
fs.copySync(dir, path.join(PUBLIC_DIR, path.basename(dir)));
|
||||
}
|
||||
|
||||
const nodeModulesFile = new Set([
|
||||
"node_modules/react/umd/react.production.min.js",
|
||||
"node_modules/react/umd/react.development.js",
|
||||
"node_modules/react-dom/umd/react-dom.production.min.js",
|
||||
"node_modules/react-dom/umd/react-dom.development.js",
|
||||
"node_modules/katex/dist/katex.min.js",
|
||||
"node_modules/katex/dist/contrib/mhchem.min.js",
|
||||
"node_modules/katex/dist/contrib/auto-render.min.js",
|
||||
"node_modules/@highlightjs/cdn-assets/highlight.min.js",
|
||||
]);
|
||||
|
||||
const nodeModulesFolder = new Set([
|
||||
"node_modules/@excalidraw/excalidraw/dist/prod/fonts/",
|
||||
"node_modules/katex/dist/",
|
||||
"node_modules/dayjs/",
|
||||
"node_modules/boxicons/css/",
|
||||
"node_modules/boxicons/fonts/",
|
||||
"node_modules/jquery/dist/",
|
||||
"node_modules/jquery-hotkeys/",
|
||||
"node_modules/split.js/dist/",
|
||||
"node_modules/i18next/",
|
||||
"node_modules/i18next-http-backend/",
|
||||
"node_modules/vanilla-js-wheel-zoom/dist/",
|
||||
"node_modules/mark.js/dist/",
|
||||
"node_modules/normalize.css/",
|
||||
"node_modules/jquery.fancytree/dist/",
|
||||
"node_modules/autocomplete.js/dist/",
|
||||
"node_modules/codemirror/lib/",
|
||||
"node_modules/codemirror/addon/",
|
||||
"node_modules/codemirror/mode/",
|
||||
"node_modules/codemirror/keymap/",
|
||||
"node_modules/@highlightjs/cdn-assets/languages",
|
||||
"node_modules/@highlightjs/cdn-assets/styles",
|
||||
"node_modules/leaflet/dist"
|
||||
]);
|
||||
|
||||
|
||||
|
||||
for (const nodeModuleItem of [...nodeModulesFile, ...nodeModulesFolder]) {
|
||||
copyNodeModuleFileOrFolder(nodeModuleItem);
|
||||
}
|
||||
console.log("Copying complete!")
|
||||
|
||||
} catch(err) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user