Adds packer as default dep and updates readme

master
Atul R 5 years ago
parent 4179c58c99
commit 4864bbd2cd
  1. 32
      README.md
  2. 30
      package-lock.json
  3. 4
      package.json

@ -23,11 +23,41 @@ npm run dev
npm start npm start
``` ```
## Installation & Resources for learning React NodeGUI ## Installation & Resources for learning React NodeGui
- [Documentation](https://react.nodegui.org) - all of React NodeGui's documentation. - [Documentation](https://react.nodegui.org) - all of React NodeGui's documentation.
- [NodeGui](https://nodegui.org) - all of NodeGui's documentation. - [NodeGui](https://nodegui.org) - all of NodeGui's documentation.
## Packaging app as a distributable
In order to distribute your finished app, you can use [@nodegui/packer](https://github.com/nodegui/packer)
### Step 1: (_**Run this command only once**_)
```sh
npx nodegui-packer --init MyAppName
```
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.
### Step 2: (_**Run this command every time you want to build a new distributable**_)
Next you can run the pack command:
```sh
npm run build
```
This will produce the js bundle along with assets inside the `./dist` directory
```sh
npx nodegui-packer --pack ./dist
```
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.
More details about packer can be found here: https://github.com/nodegui/packer
## License ## License
MIT MIT

30
package-lock.json generated

@ -1098,6 +1098,36 @@
"prebuild-install": "^5.3.3" "prebuild-install": "^5.3.3"
} }
}, },
"@nodegui/packer": {
"version": "1.2.0-alpha-7",
"resolved": "https://registry.npmjs.org/@nodegui/packer/-/packer-1.2.0-alpha-7.tgz",
"integrity": "sha512-QSE7XgeQgG36+LBL7xGp82j6M9EvhPr1CGU463dyvmmHSJUMJkyu3B1h9nkkKFfpnbmpM+RUGVLuN60/CnyFVw==",
"dev": true,
"requires": {
"@nodegui/artifact-installer": "^1.0.0",
"commander": "^4.0.1",
"fs-extra": "^8.1.0"
},
"dependencies": {
"commander": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz",
"integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==",
"dev": true
},
"fs-extra": {
"version": "8.1.0",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz",
"integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==",
"dev": true,
"requires": {
"graceful-fs": "^4.2.0",
"jsonfile": "^4.0.0",
"universalify": "^0.1.0"
}
}
}
},
"@nodegui/qode": { "@nodegui/qode": {
"version": "2.0.4", "version": "2.0.4",
"resolved": "https://registry.npmjs.org/@nodegui/qode/-/qode-2.0.4.tgz", "resolved": "https://registry.npmjs.org/@nodegui/qode/-/qode-2.0.4.tgz",

@ -8,7 +8,8 @@
"scripts": { "scripts": {
"build": "webpack -p", "build": "webpack -p",
"dev": "webpack --mode=development", "dev": "webpack --mode=development",
"start": "qode --inspect ./dist/index.js" "start": "qode ./dist/index.js",
"debug": "qode --inspect ./dist/index.js"
}, },
"dependencies": { "dependencies": {
"@nodegui/nodegui": "^0.15.2", "@nodegui/nodegui": "^0.15.2",
@ -21,6 +22,7 @@
"@babel/preset-env": "^7.8.7", "@babel/preset-env": "^7.8.7",
"@babel/preset-react": "^7.8.3", "@babel/preset-react": "^7.8.3",
"@babel/preset-typescript": "^7.8.3", "@babel/preset-typescript": "^7.8.3",
"@nodegui/packer": "^1.2.0-alpha-7",
"@types/node": "^12.12.29", "@types/node": "^12.12.29",
"@types/react": "^16.9.23", "@types/react": "^16.9.23",
"@types/webpack-env": "^1.15.1", "@types/webpack-env": "^1.15.1",

Loading…
Cancel
Save