You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-07-16 00:14:34 +02:00
Cli: Trying to fix build
This commit is contained in:
1
CliClient/.gitignore
vendored
1
CliClient/.gitignore
vendored
@ -23,3 +23,4 @@ tests/support/dropbox-auth.txt
|
|||||||
tests/support/nextcloud-auth.json
|
tests/support/nextcloud-auth.json
|
||||||
tests/support/onedrive-auth.txt
|
tests/support/onedrive-auth.txt
|
||||||
build/
|
build/
|
||||||
|
patches/
|
@ -17,12 +17,23 @@ tasks.prepareBuild = {
|
|||||||
excluded: ['node_modules'],
|
excluded: ['node_modules'],
|
||||||
});
|
});
|
||||||
await utils.copyDir(`${__dirname}/locales-build`, `${buildDir}/locales`);
|
await utils.copyDir(`${__dirname}/locales-build`, `${buildDir}/locales`);
|
||||||
await utils.copyDir(`${__dirname}/../patches`, `${buildDir}/patches`);
|
|
||||||
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`);
|
||||||
await utils.copyFile(`${__dirname}/package-lock.json`, `${buildDir}/package-lock.json`);
|
await utils.copyFile(`${__dirname}/package-lock.json`, `${buildDir}/package-lock.json`);
|
||||||
await utils.copyFile(`${__dirname}/gulpfile.js`, `${buildDir}/gulpfile.js`);
|
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 packageRaw = await fs.readFile(`${buildDir}/package.json`);
|
||||||
const package = JSON.parse(packageRaw.toString());
|
const package = JSON.parse(packageRaw.toString());
|
||||||
package.scripts.postinstall = 'patch-package';
|
package.scripts.postinstall = 'patch-package';
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "gulp buildTests -L && node node_modules/jasmine/bin/jasmine.js --fail-fast=true --config=tests/support/jasmine.json",
|
"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",
|
"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",
|
"build": "gulp build",
|
||||||
"start": "gulp build -L && node 'build/main.js' --stack-trace-enabled --log-level debug --env dev"
|
"start": "gulp build -L && node 'build/main.js' --stack-trace-enabled --log-level debug --env dev"
|
||||||
},
|
},
|
||||||
|
Reference in New Issue
Block a user