mirror of
https://github.com/mudita/mudita-center.git
synced 2025-12-23 22:28:03 -05:00
Co-authored-by: Daniel Karski <daniel.karski5q@gmail.com> Co-authored-by: Oskar Michalkiewicz <32848134+OskarMichalkiewicz@users.noreply.github.com> Co-authored-by: Łukasz Kowalczyk <freelancer.lukasz.kowalczyk@gmail.com> Co-authored-by: Michał Kurczewski <michalkurczewski94@gmail.com> Co-authored-by: mkurczewski <michal@kurczewski.dev>
29 lines
988 B
JavaScript
29 lines
988 B
JavaScript
const fs = require('fs');
|
|
const path = require("path")
|
|
const shell = require('child_process').execSync;
|
|
|
|
const FILES_TO_COPY = ['sql-wasm-debug.js', 'sql-wasm-debug.wasm', 'sql-wasm.js', 'sql-wasm.wasm']
|
|
|
|
FILES_TO_COPY.forEach(fileName => {
|
|
const sourcePath = path.resolve(__dirname, "../node_modules/sql.js/dist", fileName)
|
|
const destinationPath = path.resolve(__dirname, "../apps/mudita-center/static", fileName)
|
|
console.log("sourcePath", sourcePath)
|
|
console.log("destinationPath", destinationPath)
|
|
|
|
fs.copyFile(sourcePath, destinationPath, (err)=>{
|
|
console.log(err)
|
|
})
|
|
})
|
|
|
|
//this needs to be moved to new file
|
|
var source = path.resolve(__dirname, "../node_modules/electron")
|
|
var destination = path.resolve(__dirname, "../apps/mudita-center/node_modules/electron")
|
|
|
|
if(process.platform === "win32") {
|
|
shell(`Xcopy ${source} ${destination} /E /H /C /I`);
|
|
}
|
|
else {
|
|
shell(`mkdir -p ${destination}`);
|
|
shell(`cp -r ${source}/* ${destination}`);
|
|
}
|