From 207a74706ba9096a21357bf0f255906ca9ca0d42 Mon Sep 17 00:00:00 2001 From: 18alantom <2.alan.tom@gmail.com> Date: Wed, 21 Jun 2023 12:28:20 +0530 Subject: [PATCH] chore: update refs to build command --- .github/workflows/build.yml | 2 +- .github/workflows/publish.yml | 6 +++--- README.md | 6 +++--- build/scripts/dev.mjs | 12 ++++-------- package.json | 6 ------ scripts/publish-mac-arm.sh | 2 +- 6 files changed, 12 insertions(+), 22 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d49750f2..3abd3a99 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -28,4 +28,4 @@ jobs: env: CSC_IDENTITY_AUTO_DISCOVERY: false APPLE_NOTARIZE: 0 - run: yarn electron:build -mw --publish never + run: yarn build -mw --publish never diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index b1676bdf..f278a8d4 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -42,7 +42,7 @@ jobs: GH_TOKEN: ${{ secrets.GH_TOKEN }} run: | yarn set version 1.22.18 - yarn electron:build --mac --publish always + yarn build --mac --publish always - name: Tar files run: tar -cvf dist-macOS.tar dist_electron @@ -86,7 +86,7 @@ jobs: GH_TOKEN: ${{ secrets.GH_TOKEN }} run: | yarn set version 1.22.18 - yarn electron:build --linux --publish always + yarn build --linux --publish always - name: Tar files run: tar -cvf dist-linux.tar dist_electron @@ -132,7 +132,7 @@ jobs: WIN_CSC_LINK: ${{ secrets.WIN_CSC_LINK }} WIN_CSC_KEY_PASSWORD: ${{ secrets.WIN_CSC_KEY_PASSWORD }} GH_TOKEN: ${{ secrets.GH_TOKEN }} - run: yarn electron:build --win --publish always + run: yarn build --win --publish always - name: Tar files run: tar -cvf dist-windows.tar dist_electron diff --git a/README.md b/README.md index 64ba8f39..032eefbb 100644 --- a/README.md +++ b/README.md @@ -87,7 +87,7 @@ To run Frappe Books in development mode (with hot reload, etc): ```bash # start the electron app -yarn electron:serve +yarn dev ``` #### Build @@ -96,7 +96,7 @@ To build Frappe Books and create an installer: ```bash # start the electron app -yarn electron:build +yarn build ``` **Note** @@ -105,7 +105,7 @@ architecture. To build for other environments (example: for linux from a windows computer) check the _Building_ section at [electron.build/cli](https://www.electron.build/cli). -So to build for linux you could use the `--linux` flag like so: `yarn electron:build --linux`. +So to build for linux you could use the `--linux` flag like so: `yarn build --linux`. ## Contributions and Community diff --git a/build/scripts/dev.mjs b/build/scripts/dev.mjs index 61085614..a7aaf9e0 100644 --- a/build/scripts/dev.mjs +++ b/build/scripts/dev.mjs @@ -31,15 +31,11 @@ let isReload = false; */ let electronProcess = null; -/** - * @type {null | import('execa').ExecaChildProcess} - */ -let viteProcess = null; - console.log(`running Frappe Books in dev mode\nroot: ${root}`); -if (!process.argv.includes('--no-renderer')) { - viteProcess = $$`yarn vite`; -} +/** + * @type {import('execa').ExecaChildProcess} + */ +const viteProcess = $$`yarn vite`; /** * Create esbuild context that is used * to [re]build the main process code diff --git a/package.json b/package.json index 0d4b7817..477b313d 100644 --- a/package.json +++ b/package.json @@ -9,8 +9,6 @@ "scripts": { "dev": "node build/scripts/dev.mjs", "build": "node build/scripts/build.mjs", - "dev:main": "node build/scripts/dev.mjs --no-renderer", - "dev:renderer": "yarn vite", "release": "scripts/publish-mac-arm.sh", "postinstall": "electron-rebuild", "postuninstall": "electron-rebuild", @@ -81,10 +79,6 @@ "singleQuote": true, "trailingComma": "es5" }, - "engineStrict": true, - "gitHooks": { - "pre-commit": "lint-staged" - }, "homepage": "https://frappebooks.com", "repository": { "url": "https://github.com/frappe/books" diff --git a/scripts/publish-mac-arm.sh b/scripts/publish-mac-arm.sh index d08e2857..f89fbbb5 100755 --- a/scripts/publish-mac-arm.sh +++ b/scripts/publish-mac-arm.sh @@ -42,6 +42,6 @@ export GH_TOKEN=$GH_TOKEN && export APPLE_ID=$APPLE_ID && export APPLE_TEAM_ID=$APPLE_TEAM_ID && export APPLE_APP_SPECIFIC_PASSWORD=$APPLE_APP_SPECIFIC_PASSWORD && - yarn electron:build --mac --publish=always + yarn build --mac --publish=always cd ../books