Skip to content

Commit 4864bbd

Browse files
committed
Adds packer as default dep and updates readme
1 parent 4179c58 commit 4864bbd

File tree

3 files changed

+64
-2
lines changed

3 files changed

+64
-2
lines changed

README.md

+31-1
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,41 @@ npm run dev
2323
npm start
2424
```
2525

26-
## Installation & Resources for learning React NodeGUI
26+
## Installation & Resources for learning React NodeGui
2727

2828
- [Documentation](https://react.nodegui.org) - all of React NodeGui's documentation.
2929
- [NodeGui](https://nodegui.org) - all of NodeGui's documentation.
3030

31+
## Packaging app as a distributable
32+
33+
In order to distribute your finished app, you can use [@nodegui/packer](https://github.com/nodegui/packer)
34+
35+
### Step 1: (_**Run this command only once**_)
36+
37+
```sh
38+
npx nodegui-packer --init MyAppName
39+
```
40+
41+
This will produce the deploy directory containing the template. You can modify this to suite your needs. Like add icons, change the name, description and add other native features or dependencies. Make sure you commit this directory.
42+
43+
### Step 2: (_**Run this command every time you want to build a new distributable**_)
44+
45+
Next you can run the pack command:
46+
47+
```sh
48+
npm run build
49+
```
50+
51+
This will produce the js bundle along with assets inside the `./dist` directory
52+
53+
```sh
54+
npx nodegui-packer --pack ./dist
55+
```
56+
57+
This will build the distributable using @nodegui/packer based on your template. The output of the command is found under the build directory. You should gitignore the build directory.
58+
59+
More details about packer can be found here: https://github.com/nodegui/packer
60+
3161
## License
3262

3363
MIT

package-lock.json

+30
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
"scripts": {
99
"build": "webpack -p",
1010
"dev": "webpack --mode=development",
11-
"start": "qode --inspect ./dist/index.js"
11+
"start": "qode ./dist/index.js",
12+
"debug": "qode --inspect ./dist/index.js"
1213
},
1314
"dependencies": {
1415
"@nodegui/nodegui": "^0.15.2",
@@ -21,6 +22,7 @@
2122
"@babel/preset-env": "^7.8.7",
2223
"@babel/preset-react": "^7.8.3",
2324
"@babel/preset-typescript": "^7.8.3",
25+
"@nodegui/packer": "^1.2.0-alpha-7",
2426
"@types/node": "^12.12.29",
2527
"@types/react": "^16.9.23",
2628
"@types/webpack-env": "^1.15.1",

0 commit comments

Comments
 (0)