1 line
4.9 KiB
JSON
1 line
4.9 KiB
JSON
{"name":"nodejs","version":"2.4.4","description":"Installs/Configures node.js & io.js","long_description":"# [nodejs-cookbook](https://github.com/redguide/nodejs)\n[](https://supermarket.getchef.com/cookbooks/nodejs) [](https://travis-ci.org/redguide/nodejs)\n[](https://gitter.im/redguide/nodejs)\n\n## DESCRIPTION\n\nInstalls node.js/io.js and manage npm\n\n## USAGE\n\nInclude the nodejs recipe to install node on your system based on the default installation method:\n```chef\ninclude_recipe \"nodejs\"\n```\n\n### Engine\n\nYou can select different engine by setting `node['nodejs']['engine']`\n```\nnode['nodejs']['engine'] => 'node' # default\nnode['nodejs']['engine'] => 'iojs'\n```\n\nYou can also use recipes `nodejs::nodejs` or `nodejs::iojs`.\n\n### Install methods\n\n#### Package\n\nInstall node from packages:\n\n```chef\nnode['nodejs']['install_method'] = 'package' # Not necessary because it's the default\ninclude_recipe \"nodejs\"\n# Or\ninclude_recipe \"nodejs::nodejs_from_package\"\n```\nNote that only apt (Ubuntu, Debian) appears to have up to date packages available. \nCentos, RHEL, etc are non-functional (try `nodejs_from_binary` for those).\n\n#### Binary\n\nInstall node from official prebuilt binaries:\n```chef\nnode['nodejs']['install_method'] = 'binary'\ninclude_recipe \"nodejs\"\n# Or\ninclude_recipe \"nodejs::nodejs_from_binary\"\n```\n\n#### Source\n\nInstall node from sources:\n```chef\nnode['nodejs']['install_method'] = 'source'\ninclude_recipe \"nodejs\"\n# Or\ninclude_recipe \"nodejs::nodejs_from_source\"\n```\n\n## NPM\n\nNpm is included in nodejs installs by default.\nBy default, we are using it and call it `embedded`.\nAdding recipe `nodejs::npm` assure you to have npm installed and let you choose install method with `node['nodejs']['npm']['install_method']`\n```chef\ninclude_recipe \"nodejs::npm\"\n```\n_Warning:_ This recipe will include the `nodejs` recipe, which by default includes `nodejs::nodejs_from_package` if you did not set `node['nodejs']['install_method']`.\n\n## LWRP\n\n### nodejs_npm\n\n`nodejs_npm` let you install npm packages from various sources:\n* npm registry:\n * name: `attribute :package`\n * version: `attribute :version` (optionnal)\n* url: `attribute :url`\n * for git use `git://{your_repo}`\n* from a json (packages.json by default): `attribute :json`\n * use `true` for default\n * use a `String` to specify json file\n \nPackages can be installed globally (by default) or in a directory (by using `attribute :path`)\n\nYou can specify an `NPM_TOKEN` environment variable for accessing [NPM private modules](https://docs.npmjs.com/private-modules/intro) by using `attribute :npm_token`\n\nYou can append more specific options to npm command with `attribute :options` array : \n * use an array of options (w/ dash), they will be added to npm call.\n * ex: `['--production','--force']` or `['--force-latest']`\n \nThis LWRP attempts to use vanilla npm as much as possible (no custom wrapper).\n\n### Packages\n\n```ruby\nnodejs_npm \"express\"\n\nnodejs_npm \"async\" do\n version \"0.6.2\"\nend\n\nnodejs_npm \"request\" do\n url \"github mikeal/request\"\nend\n\nnodejs_npm \"grunt\" do\n path \"/home/random/grunt\"\n json true\n user \"random\"\nend\n\nnodejs_npm \"my_private_module\" do\n path \"/home/random/myproject\" # The root path to your project, containing a package.json file\n json true\n npm_token \"12345-abcde-e5d4c3b2a1\"\n user \"random\"\n options ['--production'] # Only install dependencies. Skip devDependencies\nend\n```\n[Working Examples](test/cookbooks/nodejs_test/recipes/npm.rb)\n\nOr add packages via attributes (which accept the same attributes as the LWRP above):\n\n```json\n\"nodejs\": {\n \"npm_packages\": [\n {\n \"name\": \"express\"\n },\n {\n \"name\": \"async\",\n \"version\": \"0.6.2\"\n },\n {\n \"name\": \"request\",\n \"url\": \"github mikeal/request\"\n }\n {\n \"name\": \"grunt\",\n \"path\": \"/home/random/grunt\",\n \"json\": true,\n \"user\": \"random\"\n }\n ]\n}\n```\n\n## AUTHORS\n\n* Marius Ducea (marius@promethost.com)\n* Nathan L Smith (nlloyds@gmail.com)\n* Guilhem Lettron (guilhem@lettron.fr)\n* Barthelemy Vessemont (bvessemont@gmail.com)\n","maintainer":"redguide","maintainer_email":"guilhem@lettron.fr","license":"Apache 2.0","platforms":{"debian":">= 0.0.0","ubuntu":">= 0.0.0","centos":">= 0.0.0","redhat":">= 0.0.0","smartos":">= 0.0.0","mac_os_x":">= 0.0.0"},"dependencies":{"yum-epel":">= 0.0.0","build-essential":">= 0.0.0","ark":">= 0.0.0","apt":">= 0.0.0","homebrew":">= 0.0.0"},"recommendations":{},"suggestions":{"application_nodejs":">= 0.0.0"},"conflicting":{"node":">= 0.0.0"},"providing":{},"replacing":{},"attributes":{},"groupings":{},"recipes":{}} |