{"id":17134133,"url":"https://github.com/fernandes/puppet-nodenv","last_synced_at":"2025-03-24T05:45:37.986Z","repository":{"id":80491806,"uuid":"174857106","full_name":"fernandes/puppet-nodenv","owner":"fernandes","description":null,"archived":false,"fork":false,"pushed_at":"2019-03-12T11:20:48.000Z","size":161,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-29T11:44:36.049Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Puppet","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fernandes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-03-10T17:29:42.000Z","updated_at":"2019-03-12T11:20:50.000Z","dependencies_parsed_at":null,"dependency_job_id":"f3b14aa3-723b-46d6-9bbe-88dae675c7de","html_url":"https://github.com/fernandes/puppet-nodenv","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fernandes%2Fpuppet-nodenv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fernandes%2Fpuppet-nodenv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fernandes%2Fpuppet-nodenv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fernandes%2Fpuppet-nodenv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fernandes","download_url":"https://codeload.github.com/fernandes/puppet-nodenv/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245217794,"owners_count":20579297,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-14T19:43:59.394Z","updated_at":"2025-03-24T05:45:37.976Z","avatar_url":"https://github.com/fernandes.png","language":"Puppet","readme":"# puppet-nodenv\n\n[![Build Status](https://travis-ci.org/fernandes/puppet-nodenv.png)](https://travis-ci.org/fernandes/puppet-nodenv) [![Puppet Forge](http://img.shields.io/puppetforge/v/jdowning/nodenv.svg?style=flat)](https://forge.puppetlabs.com/jdowning/nodenv)\n\n## Description\n\nThis Puppet module will install and manage [nodenv](https://https://github.com/nodenv/nodenv). By default, it installs\nnodenv for systemwide use, rather than for a user or project. Additionally,\nyou can install different versions of Node, nodenv plugins, and NPM packages.\n\n## Installation\n\n`puppet module install --modulepath /path/to/puppet/modules fernandes-nodenv`\n\n## Usage\nTo use this module, you must declare it in your manifest like so:\n\n    class { 'nodenv': }\n\nIf you wish to install nodenv somewhere other than the default\n(`/usr/local/nodenv`), you can do so by declaring the `install_dir`:\n\n    class { 'nodenv': install_dir =\u003e '/opt/nodenv' }\n\nYou can also ensure nodenv is kept up-to-date:\n\n    class { 'nodenv':\n      install_dir =\u003e '/opt/nodenv'\n      latest      =\u003e true\n    }\n\nThe class will merely setup nodenv on your host. If you wish to install\nnodes, plugins, or packages, you will have to add those declarations to your manifests\nas well.\n\n### Installing Node using node-build\nNode requires additional packages to operate properly. Fortunately, this module\nwill ensure these dependencies are met before installing Node. To install Node\nyou will need the [ruby-build](https://github.com/nodenv/ruby-build) plugin. Once\ninstalled, you can install most any Node. Additionally, you can set the Node to\nbe the global interpreter.\n\n    nodenv::plugin { 'nodenv/node-build': }\n    nodenv::build { '8.1.12': global =\u003e true }\n\n## Plugins\nPlugins can be installed from GitHub using the following definiton:\n\n    nodenv::plugin { 'github_user/github_repo': }\n\nYou can ensure a plugin is kept up-to-date. This is helpful for a plugin like\n`node-build` so that definitions are always available:\n\n    nodenv::plugin { 'nodenv/node-build': latest =\u003e true }\n\n## Packages\n\nPackages can be installed too! You *must* specify the `node_version` you want to\ninstall for.\n\n    nodenv::gem { 'yarn': node_version =\u003e '8.1.12' }\n\n## Full Example\nsite.pp\n\n    class { 'nodenv': }\n    nodenv::plugin { [ 'nodenv/nodenv-vars', 'nodenv/ruby-build' ]: }\n    nodenv::build { '8.1.12': global =\u003e true }\n    nodenv::gem { 'yarn': node_version =\u003e '8.1.12' }\n\n## Testing\nYou can run specs in  this module with rspec:\n\n    bundle install\n    bundle exec rake spec\n\nOr with Docker:\n\n    docker build -t puppet-nodenv .\n\n## Vagrant\n\nYou can also test this module in a Vagrant box. There are two box definitons included in the\nVagrant file for CentOS and Ubuntu testing. You will need to use `librarian-puppet` to setup\ndependencies:\n\n    bundle install\n    bundle exec librarian-puppet install\n\nTo test both boxes:\n\n    vagrant up\n\nTo test one distribution:\n\n    vagrant up [centos|ubuntu]\n\n## Credits\n\nThis is the puppet-nodenv created by [jdowning](https://github.com/jdowning) ported to nodenv. All credits to him","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffernandes%2Fpuppet-nodenv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffernandes%2Fpuppet-nodenv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffernandes%2Fpuppet-nodenv/lists"}