Skip to content
This repository has been archived by the owner on Jun 20, 2022. It is now read-only.

Commit

Permalink
chore: improve build script
Browse files Browse the repository at this point in the history
  • Loading branch information
moughxyz committed Jan 13, 2022
1 parent 234e82b commit b4454cc
Show file tree
Hide file tree
Showing 5 changed files with 231 additions and 182 deletions.
22 changes: 3 additions & 19 deletions README.md
Expand Up @@ -47,16 +47,7 @@ To determine where to install a dependency:

Build for all platforms:

- `yarn build:all`

or

- `yarn build appimage`
- `yarn build mac`
- `yarn build snap`
- `yarn build windows`
- `yarn build appimage:arm64`
- `yarn build deb:arm64`
- `yarn release`

## Building natively on arm64

Expand All @@ -78,18 +69,11 @@ Snap releases also require a working snapcraft / `snapd` installation.
Building can then be done by running:

- `yarn setup`
- `yarn bundle:arm64`

Followed by either:

- `yarn build:all:arm64`
Followed by

Or the individual commands:
- `node scripts/build.mjs deb-arm64`

- `yarn build:dir:arm64`
- `yarn build:appimage:arm64`
- `yarn build:deb:arm64`
- `yarn build:snap:arm64`

## Installation

Expand Down
2 changes: 1 addition & 1 deletion app/package.json
Expand Up @@ -3,7 +3,7 @@
"productName": "Standard Notes",
"description": "A simple and private place for your notes, thoughts, and life's work.",
"author": "Standard Notes <help@standardnotes.com>",
"version": "3.9.14",
"version": "3.9.15",
"main": "./dist/index.js",
"dependencies": {
"keytar": "^7.7.0",
Expand Down
34 changes: 10 additions & 24 deletions package.json
@@ -1,47 +1,33 @@
{
"name": "standard-notes",
"main": "./app/dist/index.js",
"version": "3.9.14",
"version": "3.9.15",
"repository": {
"type": "git",
"url": "git://github.com/standardnotes/desktop"
},
"license": "AGPL-3.0-or-later",
"scripts": {
"build": "yarn lint && yarn build:web && node scripts/build.mjs",
"build:all": "yarn bundle && electron-builder -wl --x64 --ia32 && yarn build:snap && yarn build:appimage:arm64 && yarn build:deb:arm64 && yarn build:mac-all && yarn build:write-sums && yarn release:draft",
"build:mac": "node scripts/build.mjs mac",
"build:mac-all": "node scripts/build.mjs mac-all",
"build:mac-arm64": "node scripts/build.mjs mac-arm64",
"build:snap": "node scripts/build.mjs snap",
"build:write-sums": "node scripts/sums.mjs",
"build:remove-unpacked": "rimraf dist/{linux-*,mac,win-*}",
"build:web": "cd web && rimraf node_modules && yarn --ignore-engines && yarn run bundle:desktop",
"bundle:arm64": "yarn run lint && yarn clean:build && yarn run build:web:arm64 && webpack --config webpack.prod.js",
"build:web:arm64": "git submodule update && yarn --cwd ./web run rimraf node_modules && npm_config_target=14.17.3 npm_config_runtime=node yarn --cwd ./web setup && npm --prefix ./web rebuild && yarn --cwd ./web bundle:desktop",
"build:all:arm64": "yarn bundle:arm64 && yarn build:dir:arm64 && yarn build:appimage:arm64 && yarn build:snap:arm64 && yarn build:deb:arm64 && yarn build:write-sums",
"build:dir:arm64": "node scripts/build.mjs dir-arm64",
"build:appimage:arm64": "node scripts/build.mjs appimage-arm64",
"build:snap:arm64": "node scripts/build.mjs snap-arm64",
"build:deb:arm64": "node scripts/build.mjs deb-arm64",
"bundle": "yarn run lint && yarn clean:build && yarn run build:web && webpack --config webpack.prod.js",
"clean": "npm-run-all --parallel clean:*",
"build": "yarn lint && yarn build:web && yarn run webpack --config webpack.prod.js",
"change-version": "node scripts/change-version.mjs",
"clean:build": "rimraf app/dist/",
"clean:tests": "rimraf test/data/tmp/",
"dev": "NODE_ENV=development webpack --config webpack.dev.js --watch",
"clean": "npm-run-all --parallel clean:*",
"dev:web": "cd web && yarn run watch:desktop",
"dev": "NODE_ENV=development webpack --config webpack.dev.js --watch",
"format": "prettier --write .",
"change-version": "node scripts/change-version.mjs",
"lint": "npm-run-all --parallel lint:*",
"lint:formatting": "prettier --check .",
"lint:eslint": "eslint app/index.ts app/application.ts app/javascripts/**/*.ts",
"lint:formatting": "prettier --check .",
"lint:types": "tsc --noEmit",
"release:draft": "node scripts/create-draft-release.mjs",
"lint": "npm-run-all --parallel lint:*",
"postinstall": "electron-builder install-app-deps",
"release": "node scripts/build.mjs mainstream",
"setup": "yarn --ignore-engines && yarn --ignore-engines --cwd ./app && git submodule update --init && yarn --ignore-engines --cwd ./web",
"start": "electron ./app --enable-logging --icon _icon/icon.png",
"test": "rimraf test/data/tmp && ava",
"update-web": "cd web && git checkout main && git pull && cd ..",
"postinstall": "electron-builder install-app-deps"
"update-web": "cd web && git checkout main && git pull && cd .."
},
"dependencies": {
"compare-versions": "^4.1.2",
Expand Down

0 comments on commit b4454cc

Please sign in to comment.