1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-24 10:27:10 +02:00

Finished fixing clipper build

This commit is contained in:
Laurent Cozic 2020-02-23 21:15:37 +00:00
parent 3f267f3774
commit 2ce40e0390
3 changed files with 12 additions and 3 deletions

View File

@ -39,6 +39,14 @@ Then:
To run the iOS application, it might be easier to open the file `ios/Joplin.xcworkspace` on XCode and run the app from there.
## Building the clipper
cd Clipper/popup
npm install
npm run watch # To watch for changes
To test the extension please refer to the relevant pages for each browser: [Firefox](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Your_first_WebExtension#Trying_it_out) / [Chrome](https://developer.chrome.com/extensions/faq#faq-dev-01). Please note that the extension in dev mode will only connect to a dev instance of the desktop app (and vice-versa).
## Watching files
To make changes to the application, you'll need to rebuild any TypeScript file you've changed, and rebuild the lib. The simplest way to do all this is to watch for changes from the root of the project. Simply run this command, and it should take care of the rest:

View File

@ -16,7 +16,7 @@
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject",
"watch": "cra-build-watch",
"postinstall": "node scripts/postinstall.js"
"postinstall": "node scripts/postinstall.js && npm run build"
},
"devDependencies": {
"cra-build-watch": "^3.2.0",

View File

@ -33,6 +33,8 @@ async function updateManifestVersionNumber(manifestPath) {
}
async function main() {
console.info(await execCommand('git pull'));
const newVersion = await updateManifestVersionNumber(`${clipperDir}/manifest.json`);
console.info('Building extension...');
@ -40,7 +42,7 @@ async function main() {
// SKIP_PREFLIGHT_CHECK avoids the error "There might be a problem with the project dependency tree." due to eslint 5.12.0 being
// installed by CRA and 6.1.0 by us. It doesn't affect anything though, and the behaviour of the preflight
// check is buggy so we can ignore it.
console.info(await execCommand('SKIP_PREFLIGHT_CHECK=true npm run build'));
console.info(await execCommand('npm run build'));
const dists = [
{
@ -86,7 +88,6 @@ async function main() {
console.info(await execCommand('7z a -tzip joplin-webclipper-source.zip joplin-webclipper-source'));
console.info(await execCommand(`mv joplin-webclipper-source.zip ${clipperDir}/dist/ && rm -rf joplin-webclipper-source`));
console.info(await execCommand('git pull'));
console.info(await execCommand('git add -A'));
console.info(await execCommand(`git commit -m "Clipper release v${newVersion}"`));
console.info(await execCommand(`git tag clipper-${newVersion}`));