A wrapper cookbook to install Node.js and npm configured with the defaults for a G5 development environment.
0.2.0
Add a dependency on g5-nodejs to your cookbook's metadata.rb:
depends 'g5-nodejs'
The cookbook is currently only available via git. We recommend using Berkshelf to manage the installation.
To initialize Berkshelf in your project, if you haven't done so already:
$ cd my-chef-cookbook
$ gem install berkshelf
$ berks init
To reference the git version, simply add the following line to your
Berksfile
:
cookbook 'g5-nodejs', git: '[email protected]:G5/g5-nodejs.git', tag: '0.1.0'
node['nodejs']['npm']['prefix']
- the prefix directory where global npm packages will be installed.
See the wrapped nodejs cookbook for supported attributes.
Globally installs Node.js, npm, ember CLI and bower.
See the wrapped nodejs cookbook for
LWRPs such as nodejs_npm
.
To install Node.js, include the default recipe in one of your cookbook's recipes:
include_recipe 'g5-nodejs::default'
Use the nodejs_npm
LWRP to install additional packages via npm:
nodejs_npm 'grunt'
- Maeve Revels / @maeve
- Fork it
- Set up your development environment
- Create your feature branch (
git checkout -b my-new-feature
) - Write your code and specs
- Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
If you find bugs, have feature requests or questions, please file an issue.
- Clone the repository locally:
$ git clone [email protected]:G5/g5-nodejs.git
$ cd g5-nodejs
- Install required gems using Bundler:
$ bundle install
- Install required cookbooks using Berkshelf:
$ bundle exec berks install
- Provision an instance for testing using test-kitchen:
$ bundle exec kitchen converge
See bundle exec kitchen help
for more test-kitchen commands.
The unit tests use ChefSpec,
and live in the test/unit
directory. To execute the entire
suite:
$ bundle exec rspec
To run the foodcritic linting tool:
$ bundle exec foodcritic .
The integration tests use ServerSpec, and live
in the test/integration/default/serverspec
directory. To execute
the test suite:
$ bundle exec kitchen verify
If you would prefer to automatically monitor the filesystem for changes to execute tests, Guard has been configured:
$ bundle exec guard start
Copyright (c) 2014 G5
MIT License
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.