An ember-cli addon for developing Ember.js applications with NW.js (formerly node-webkit).
This addon updates your Ember app with the necessary configuration and scripts to make it run in a NW.js environment.
It also provides a convenient command (ember nw
) to both build the app and launch it in a NW.js window.
From the root of your Ember CLI project:
ember install:addon ember-cli-node-webkit
This will do the following:
- Install the addon NPM package (
npm install --save-dev ember-cli-node-webkit
) - Run the addon blueprint (
ember generate node-webkit
)
You can execute ember build --watch
then start up NW.js with a single command:
ember nw
To specify a specific target environment (e.g. development
or production
):
ember nw --environment=<ENV_NAME>
As the app gets rebuilt during development, the NW.js window will automatically reload the current page, so you can see the changes that you made without having to stop and restart the entire process.
This addon is configured to install NW.js from NPM and add it to your project as a local dependency.
To use a different NW.js:
- Remove the
nw
dependency from your project (npm uninstall --save-dev nw
) - Set an environment variable named
NW_PATH
that points to the desired binary. For instance, you may have downloaded the executable from the NW.js website and wish to use that instead. - On Windows, if the location of your
nw.exe
has been added to yourPATH
, then theNW_PATH
environment variable does not need to be set.
See brzpegasus#6.
To install the addon from master
, run the following:
git clone [email protected]:brzpegasus/ember-cli-node-webkit.git
cd ember-cli-node-webkit
npm link
Then, in your Ember CLI project:
- Add
ember-cli-node-webkit
to yourpackage.json
's dev dependencies. The version doesn't really matter. The package just needs to be listed so that Ember CLI can discover and register your addon:
{
"devDependencies": {
"ember-cli-node-webkit": "*"
}
}
- Link to your local
ember-cli-node-webkit
and go through the addon install steps:
npm link ember-cli-node-webkit
ember g node-webkit
To run the addon's test suite:
cd ember-cli-node-webkit
npm install
npm test
This addon was created to help Ember.js developers build applications in NW.js. If you find patterns that work well for you, or would like to suggest ideas to make this addon even better, feel free to open new issues or submit pull requests. I'd love to hear your feedback!