Code Monkey home page Code Monkey logo

g5-nodejs's Introduction

G5 Node.js

A wrapper cookbook to install Node.js and npm configured with the defaults for a G5 development environment.

Current version

0.2.0

Requirements

Installation

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'

Usage

Attributes

  • node['nodejs']['npm']['prefix'] - the prefix directory where global npm packages will be installed.

See the wrapped nodejs cookbook for supported attributes.

Recipes

default

Globally installs Node.js, npm, ember CLI and bower.

Resources / Providers

See the wrapped nodejs cookbook for LWRPs such as nodejs_npm.

Examples

Default installation

To install Node.js, include the default recipe in one of your cookbook's recipes:

include_recipe 'g5-nodejs::default'

Installing additional packages

Use the nodejs_npm LWRP to install additional packages via npm:

nodejs_npm 'grunt'

Authors

Contributions

  1. Fork it
  2. Set up your development environment
  3. Create your feature branch (git checkout -b my-new-feature)
  4. Write your code and specs
  5. Commit your changes (git commit -am 'Add some feature')
  6. Push to the branch (git push origin my-new-feature)
  7. Create new Pull Request

If you find bugs, have feature requests or questions, please file an issue.

Development Setup

  1. Clone the repository locally:
$ git clone [email protected]:G5/g5-nodejs.git
$ cd g5-nodejs
  1. Install required gems using Bundler:
$ bundle install
  1. Install required cookbooks using Berkshelf:
$ bundle exec berks install
  1. Provision an instance for testing using test-kitchen:
$ bundle exec kitchen converge

See bundle exec kitchen help for more test-kitchen commands.

Specs

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

License

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.