Skip to content

Commit

Permalink
v0.0.5 -- Change from NPM to Yarn for building
Browse files Browse the repository at this point in the history
  • Loading branch information
belltown committed Mar 21, 2017
1 parent bed5a20 commit 2367196
Show file tree
Hide file tree
Showing 3 changed files with 1,859 additions and 19 deletions.
40 changes: 26 additions & 14 deletions doc/BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,34 +4,46 @@
- All builds are for 64-bit systems
- Building is controlled by the source/package.json file

#### NPM versus Yarn

These build instructions use Yarn rather than NPM (Node Package Manager) for building VioletBug and its distributables.

Yarn is newer, faster, and better than NPM. Yarn was chosen because NPM may generate warnings and/or errors as described in this issue: https://github.com/electron-userland/electron-builder/issues/1344. Read more about Yarn and how it addresses NPM's inadequacies here: https://code.facebook.com/posts/1840075619545360.

If you really want to use NPM rather than Yarn, then replace all references to "yarn" in these build instructions with "npm". Note that you may also need to include in the package.json devDependencies section, a dependency for "ajv" of ">=5.0.3-beta.0" (or whatever version is denoted in the NPM error message as a missing peer dependency for ajv-keywords).


#### Build setup

- Install node.js and npm by following the instructions on https://nodejs.org
- Change into the directory that will contain the violetbug project directory: `cd violetbug`
- Install node.js (and NPM) by following the instructions on https://nodejs.org
- Install Yarn by following the instructions on https://yarnpkg.com/en/docs/install
- Change into the directory that will contain the VioletBug project directory: `cd violetbug`
- Clone the GitHub repository: `git clone https://github.com/belltown/violetbug`
- Change into the `source` directory: `cd violetbug/source`
- Install the npm packages: `npm install` [Note that the development dependency versions listed in package.json are specified as fixed version numbers. Change these if you want more up-to-date versions]
- Run violetbug: `npm start`
- Install the NPM packages: `yarn install` [Note that the development dependency versions listed in package.json are specified as fixed version numbers. Change these if you want more up-to-date versions]
- Run VioletBug: `yarn start`

#### Building from source (only required if generating binary zip files)

*All builds must be run from the `violetbug/source` directory.*

*If using Yarn, you can use `yarn xxxx` instead of `yarn run xxxx`*.

| | |
|---|---
|`npm run build-mac` | Run on **linux or macOS** to generate `/builds/mac`
| `npm run build-linux` | Run on **linux or macOS** to generate `/builds/linux`
| `npm run build-win` | Run on **Windows** to generate `/builds/win`
| `yarn run build-mac` | Run on **linux or macOS** to generate `/builds/mac`
| `yarn run build-linux` | Run on **linux or macOS** to generate `/builds/linux`
| `yarn run build-win` | Run on **Windows** to generate `/builds/win`

#### Generating binary zip files (run on linux or macOS - not on Windows)

*All zips must be run from the `violetbug/source` directory, and require the corresponding build step above to have been run.*

| | |
|---|---
| `npm run zip-mac` | To generate `/dist/violetbug-mac.zip`
| `npm run zip-linux` | To generate `/dist/violetbug-linux.zip`
| `npm run zip-win` | To generate `/dist/violetbug-win.zip`
| `yarn run zip-mac` | To generate `/dist/violetbug-mac.zip`
| `yarn run zip-linux` | To generate `/dist/violetbug-linux.zip`
| `yarn run zip-win` | To generate `/dist/violetbug-win.zip`

#### Generating installers (does not require build from source or binary zip files)

Expand All @@ -43,7 +55,7 @@ The following commands are available to generate installers in `/dist`:

| |
|---
| `npm run dist-appimage`
| `npm run dist-deb`
| `npm run dist-rpm`
| `npm run dist-win`
| `yarn run dist-appimage`
| `yarn run dist-deb`
| `yarn run dist-rpm`
| `yarn run dist-win`
8 changes: 3 additions & 5 deletions source/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "violetbug",
"productName": "VioletBug",
"version": "0.0.4",
"version": "0.0.5",
"private": true,
"description": "VioletBug -- A Roku Debugger Graphical Interface",
"main": "main.js",
Expand Down Expand Up @@ -64,11 +64,9 @@
"bugs": {
"url": "https://github.com/belltown/violetbug/issues"
},
"//": "Need ajv to satisfy broken peer dependency for electron-builder ...",
"devDependencies": {
"ajv": ">=5.0.3-beta.0",
"electron": "1.6.2",
"electron-packager": "8.5.2",
"electron-builder": "15.4.2"
"electron-builder": "15.6.3",
"electron-packager": "8.5.2"
}
}
Loading

0 comments on commit 2367196

Please sign in to comment.