2
2
mirror of https://github.com/Llewellynvdm/nativefier.git synced 2024-12-23 02:28:55 +00:00

Implement script to set up dev environment

This commit is contained in:
Jia Hao 2016-01-22 20:49:37 +08:00
parent 18387854fa
commit c89f6a877b
2 changed files with 24 additions and 0 deletions

View File

@ -177,6 +177,28 @@ If this flag is passed, it will not override the user agent.
A template app with the appropriate event listeners and callbacks set up is included in the `./app` folder. When the `nativefier` command is executed, this folder is copied to a temporary directory with the appropriate parameters in a configuration file, and is packaged into an app with [Electron Packager](https://github.com/maxogden/electron-packager).
## Development
```bash
$ git clone https://github.com/jiahaog/nativefier.git
$ cd nativefier
# Set up dev environment
$ npm run dev-up
# Sets up symlink for local files to global nativefier
$ npm link
# You can then run nativefier with your test parameters
$ nativefier <...>
```
After changing any source files, you need to run the following command to compile them.
```bash
$ npm run build
```
## Notes
Tested mostly on OSX, but should work for windows and linux.

View File

@ -11,6 +11,8 @@
],
"main": "lib/buildApp.js",
"scripts": {
"dev-up": "npm install && (cd app && npm install)",
"postinstall": "mkdir -p app/lib",
"test": "echo \"Error: no test specified\" && exit 1",
"build-app": "browserify app/src/main.js --node --ignore-missing --detect-globals false --debug -o app/lib/main.js && cp app/src/preload.js app/lib/preload.js",
"build-module": "babel src -d lib",