mirror of
https://github.com/laurent22/joplin.git
synced 2024-12-24 10:27:10 +02:00
Cli: Trying to fix build
This commit is contained in:
parent
6d5d9323bd
commit
4cbfd04522
1
CliClient/.gitignore
vendored
1
CliClient/.gitignore
vendored
@ -23,3 +23,4 @@ tests/support/dropbox-auth.txt
|
||||
tests/support/nextcloud-auth.json
|
||||
tests/support/onedrive-auth.txt
|
||||
build/
|
||||
patches/
|
@ -17,12 +17,23 @@ tasks.prepareBuild = {
|
||||
excluded: ['node_modules'],
|
||||
});
|
||||
await utils.copyDir(`${__dirname}/locales-build`, `${buildDir}/locales`);
|
||||
await utils.copyDir(`${__dirname}/../patches`, `${buildDir}/patches`);
|
||||
await tasks.copyLib.fn();
|
||||
await utils.copyFile(`${__dirname}/package.json`, `${buildDir}/package.json`);
|
||||
await utils.copyFile(`${__dirname}/package-lock.json`, `${buildDir}/package-lock.json`);
|
||||
await utils.copyFile(`${__dirname}/gulpfile.js`, `${buildDir}/gulpfile.js`);
|
||||
|
||||
// Import all the patches inside the CliClient directory
|
||||
// and build file. Needs to be in CliClient dir for when running
|
||||
// in dev mode, and in build dir for production.
|
||||
const localPatchDir = `${buildDir}/patches`;
|
||||
await fs.remove(localPatchDir);
|
||||
await fs.mkdirp(localPatchDir);
|
||||
await utils.copyDir(`${__dirname}/../patches/shared`, `${localPatchDir}`, { delete: false });
|
||||
await utils.copyDir(`${__dirname}/../patches/node`, `${localPatchDir}`, { delete: false });
|
||||
|
||||
await fs.remove(`${__dirname}/patches`);
|
||||
await utils.copyDir(`${localPatchDir}`, `${__dirname}/patches`);
|
||||
|
||||
const packageRaw = await fs.readFile(`${buildDir}/package.json`);
|
||||
const package = JSON.parse(packageRaw.toString());
|
||||
package.scripts.postinstall = 'patch-package';
|
||||
|
@ -6,7 +6,7 @@
|
||||
"scripts": {
|
||||
"test": "gulp buildTests -L && node node_modules/jasmine/bin/jasmine.js --fail-fast=true --config=tests/support/jasmine.json",
|
||||
"test-ci": "gulp buildTests -L && node node_modules/jasmine/bin/jasmine.js --config=tests/support/jasmine.json",
|
||||
"postinstall": "npm run build && patch-package --patch-dir ../patches/shared && patch-package --patch-dir ../patches/node",
|
||||
"postinstall": "npm run build && patch-package --patch-dir ./patches",
|
||||
"build": "gulp build",
|
||||
"start": "gulp build -L && node 'build/main.js' --stack-trace-enabled --log-level debug --env dev"
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user