Version information
released Jan 16th 2016
This version is compatible with:
- Darwin
Start using this module
Add this module to your Puppetfile:
mod 'halyard-nodejs', '5.0.4'
Learn more about managing modules with a PuppetfileDocumentation
halyard/nodejs — version 5.0.4 Jan 16th 2016
puppet-nodejs
Module to handle nodejs version management with nodenv for boxen, based on boxen's ruby module
Changes from upstream
- Clean up meta files
- Set up CircleCI builds
- Switch to function bindings vs puppet-module-data
Usage
In your hiera config:
"nodejs::provider": "nodenv"
"nodejs::user": "deploy"
# https://github.com/OiNutter/node-build/releases
"nodejs::build::ensure": "f18b3d67756d1cb25ba6e35044f816fd67211b33"
"nodejs::nodenv::ensure": "v0.2.0"
# nodenv plugins
"nodejs::nodenv::plugins":
"nodenv-vars":
"ensure": "ee42cd9db3f3fca2a77862ae05a410947c33ba09"
"source": "OiNutter/nodenv-vars"
# Environment variables for building specific versions
# You'll want to enable hiera's "deeper" merge strategy
# See http://docs.puppetlabs.com/hiera/1/configuring.html#mergebehavior
"nodejs::version::env":
"0.4.2":
"CC": "gcc"
# Version aliases, commonly used to bless a specific version
# Use the "deeper" merge strategy, as with nodejs::version::env
"nodejs::version::alias":
"0.10": "0.10.36"
"0.12": "0.12.0"
"iojs-1.6": "iojs-1.6.2"
In your manifest:
# Set the global default node (auto-installs it if it can)
class { 'nodejs::global':
version => '0.12'
}
# ensure a certain node version is used in a dir
nodejs::local { '/path/to/some/project':
version => '0.12'
}
# ensure a npm module is installed for a certain node version
# note, you can't have duplicate resource names so you have to name like so
$version = "0.12"
npm_module { "bower for ${version}":
module => 'bower',
version => '~> 1.4.1',
node_version => $version,
}
# ensure a module is installed for all node versions
npm_module { 'bower for all nodes':
module => 'bower',
version => '~> 1.4.1',
node_version => '*',
}
# install a node version
nodejs::version { '0.12.2': }
# Installing nodenv plugin
nodejs::nodenv::plugin { 'nodenv-vars':
ensure => 'ee42cd9db3f3fca2a77862ae05a410947c33ba09',
source => 'OiNutter/nodenv-vars'
}
Required Puppet Modules
Types in this module release
Copyright (c) 2013 GitHub, Inc. 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.