mirror of
https://github.com/laurent22/joplin.git
synced 2024-11-27 08:21:03 +02:00
Cli: Fix build
This commit is contained in:
parent
1600d27db4
commit
35d27f03bd
@ -12,8 +12,15 @@ tasks.build = {
|
||||
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`);
|
||||
|
||||
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');
|
||||
|
||||
fs.chmodSync(`${buildDir}/main.js`, 0o755);
|
||||
},
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user