1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-03-03 15:32:30 +02:00

Cli: Fix build

This commit is contained in:
Laurent Cozic 2020-03-07 01:19:41 +00:00
parent dbba7af4b5
commit 557c7a2877
3 changed files with 361 additions and 86 deletions

View File

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

File diff suppressed because it is too large Load Diff

View File

@ -5,7 +5,7 @@
"author": "Laurent Cozic",
"scripts": {
"test": "gulp buildTests -L && jasmine --config=tests/support/jasmine.json",
"postinstall": "patch-package --patch-dir ./patches && npm run build",
"postinstall": "npm run build && patch-package --patch-dir ../patches",
"build": "gulp build",
"start": "gulp build -L && node 'build/main.js' --profile ~/Temp/TestNotes2 --stack-trace-enabled --log-level debug --env dev"
},
@ -109,10 +109,10 @@
"valid-url": "^1.0.9",
"word-wrap": "^1.2.3",
"xml2js": "^0.4.19",
"yargs-parser": "^7.0.0",
"gulp": "^4.0.2"
"yargs-parser": "^7.0.0"
},
"devDependencies": {
"gulp": "^4.0.2",
"jasmine": "^3.5.0",
"temp": "^0.9.1"
}