Skip to content
This repository has been archived by the owner on Dec 2, 2020. It is now read-only.

Extract and use version from package.json #49

Open
wereHamster opened this issue Aug 6, 2015 · 1 comment
Open

Extract and use version from package.json #49

wereHamster opened this issue Aug 6, 2015 · 1 comment

Comments

@wereHamster
Copy link

It would be nice if there was a way to automatically install the correct nodejs version by extracting the version from a projects package.json file. I'm thinking about something like this:

nodejs::project { '/path/to/some/project': }

which would expand to:

nodejs::local { '/path/to/some/project':
  version => $version_from_package_json
}

That way I could keep the source of truth in the project repo, because there are other tools which read the version from the package.json file (e.g. when deploying to heroku).

@bgerstle
Copy link

I just got https://github.com/nodenv/nodenv-package-json-engine working, which you can setup in your manifest(s) via:

nodejs::nodenv::plugin { 'nodenv-package-json-engine':
  ensure => 'v1.0.0',
  source => 'nodenv/nodenv-package-json-engine'
}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants