1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-24 10:27:10 +02:00

Cli: Fix build

This commit is contained in:
Laurent Cozic 2020-03-07 01:00:11 +00:00
parent ed0fae36ad
commit 5516b3284c
3 changed files with 6 additions and 6 deletions

View File

@ -16,10 +16,10 @@ tasks.build = {
await tasks.copyLib.fn(); await tasks.copyLib.fn();
await utils.copyFile(`${__dirname}/package.json`, `${buildDir}/package.json`); await utils.copyFile(`${__dirname}/package.json`, `${buildDir}/package.json`);
const packageRaw = await fs.readFile(`${buildDir}/package.json`); // const packageRaw = await fs.readFile(`${buildDir}/package.json`);
const package = JSON.parse(packageRaw.toString()); // const package = JSON.parse(packageRaw.toString());
package.scripts.postinstall = package.scripts.postinstall.replace(/\.\.\/patches/, './patches'); // package.scripts.postinstall = package.scripts.postinstall.replace(/\.\.\/patches/, './patches');
await fs.writeFile(`${buildDir}/package.json`, JSON.stringify(package, null, 2), 'utf8'); // await fs.writeFile(`${buildDir}/package.json`, JSON.stringify(package, null, 2), 'utf8');
fs.chmodSync(`${buildDir}/main.js`, 0o755); fs.chmodSync(`${buildDir}/main.js`, 0o755);
}, },

View File

@ -5,7 +5,7 @@
"author": "Laurent Cozic", "author": "Laurent Cozic",
"scripts": { "scripts": {
"test": "gulp buildTests -L && jasmine --config=tests/support/jasmine.json", "test": "gulp buildTests -L && jasmine --config=tests/support/jasmine.json",
"postinstall": "patch-package --patch-dir ../patches && npm run build", "postinstall": "patch-package --patch-dir ./patches && npm run build",
"build": "gulp build", "build": "gulp build",
"start": "gulp build -L && node 'build/main.js' --profile ~/Temp/TestNotes2 --stack-trace-enabled --log-level debug --env dev" "start": "gulp build -L && node 'build/main.js' --profile ~/Temp/TestNotes2 --stack-trace-enabled --log-level debug --env dev"
}, },

View File

@ -59,7 +59,7 @@ async function main() {
await execCommand('git pull'); await execCommand('git pull');
await execCommand('touch app/main.js'); await execCommand('touch app/main.js');
await execCommand('npm run build'); await execCommand('npm run build');
await execCommand('cp package.json build/'); // await execCommand('cp package.json build/');
await execCommand('cp ../README.md build/'); await execCommand('cp ../README.md build/');
process.chdir(`${appDir}/build`); process.chdir(`${appDir}/build`);