1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-27 10:32:58 +02:00
joplin/packages/app-clipper/popup/postinstall.js

17 lines
750 B
JavaScript
Raw Normal View History

const fs = require('fs-extra');
2020-11-05 18:58:23 +02:00
const sourcePath = `${__dirname}/../../lib/randomClipperPort.js`;
2020-02-23 23:04:14 +02:00
// Mozilla insists on building the clipper from a tarball, not from the repository
// so we add this check and only copy the file if it's present. Normally it rarely
// changes anyway and it is committed to the repo.
if (fs.pathExistsSync(sourcePath)) {
2020-11-05 18:58:23 +02:00
fs.copySync(sourcePath, `${__dirname}/src/randomClipperPort.js`);
2020-02-23 23:04:14 +02:00
}
// These files give warnings when loading the extension in Chrome, in dev mode
fs.removeSync(`${__dirname}/node_modules/public-encrypt/test/test_key.pem`);
fs.removeSync(`${__dirname}/node_modules/public-encrypt/test/test_rsa_pubkey.pem`);
fs.removeSync(`${__dirname}/node_modules/public-encrypt/test/test_rsa_privkey.pem`);