diff --git a/README.md b/README.md index e9ba296..e98bd5f 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/package.json b/package.json index 9b1376b..e25906c 100644 --- a/package.json +++ b/package.json @@ -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",