Skip to content
This repository has been archived by the owner on Feb 22, 2020. It is now read-only.

updated README with Quick start guide #134

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
58 changes: 57 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

# nwjs-builder-phoenix [![npm version](https://img.shields.io/npm/v/nwjs-builder-phoenix.svg)](https://npmjs.org/package/nwjs-builder-phoenix) [![Standard Version](https://img.shields.io/badge/release-standard%20version-brightgreen.svg)](https://github.com/conventional-changelog/standard-version)

A possible solution to build and package a ready for distribution NW.js app for Windows, macOS and Linux.
Expand Down Expand Up @@ -28,6 +27,63 @@ Although NW.js has much lesser popularity than Electron, and is really troubled
* TODO Code signing
* Ideas appreciated :)

## Quick start

> Let suppose, path to your app is **D:\Users\Projects\NW\myapp** (Windows) and **/Users/Projects/NW/myapp** (Linux/MAC OS X).

1. Open terminal ( CMD/BASH ).

2. Navigate to **myapp** directory using **cd D:\Users\Projects\NW\myapp** (Windows) | **cd /Users/Projects/NW/myapp** (Linux/MAC OS X).

3. Check package.json to have at least `name`, `description`, `version`, `scripts` fields. If you don't have package.json, please create it using **npm init** command (provide proper values as it asks) instead of creating it manually (as using **npm init** will add set most of the keys needed).

Here is the minimal one:

```javascript
{
"name": "generator",
"version": "1.0.0",
"description": "An NW based desktop application",
"scripts": {
"test": "node ./test/test_any.js"
}
}
```

4. Now add **build** key and also update **scripts**.

```javascript
{
"name": "generator",
"version": "1.0.0",
"description": "An NW based desktop application",
"build": {
"nwVersion": "0.35.1"
},
"scripts": {
"test": "node ./test/test_any.js",
"dist": "build --tasks win-x86,win-x64,linux-x86,linux-x64,mac-x64 --mirror https://dl.nwjs.io/ .",
"start": "run --x86 --mirror https://dl.nwjs.io/ ."
}
}
```

5. Install **nwjs-builder-phoenix** locally using **npm install nwjs-builder-phoenix --save-dev**.

```bash
npm install nwjs-builder-phoenix --save-dev
```

6. Finally, run **npm run dist**.

```bash
npm run dist
```

That's it.

**Note:** Just wait for packaging process as it depends on speed of Network and number of selected target platforms.

## Getting Started

* Make sure your NW.js project has a valid `package.json` (e.g. generated by `npm init`), and have basic fields like `name`, `description` and `version` filled.
Expand Down