Chef cookbook to install Yarn package manager
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
attributes
libraries
recipes
resources
script
test/smoke/default
.editorconfig
.gitignore
.kitchen.yml
Berksfile
Berksfile.lock
Gemfile
Gemfile.lock
LICENSE
README.md
chefignore
metadata.rb

README.md

yarn-cookbook

Chef cookbook license
WIP
Chef cookbook to install Yarn package manager.

Recipes

yarn::default

Install or upgrade (default action) Yarn (it depends on node['yarn']['package']['upgrade'] attribute, which defaults to true).

yarn::install_package

Install Yarn.

yarn::upgrade_package

Install the latest version of Yarn.

Resources

yarn_install

Install all dependencies for a project.

yarn_install '/var/projects/test' do
  user 'vagrant'
  action :run
end

yarn_run

Run a defined package script.

yarn_run 'knex' do
  user 'vagrant'
  dir '/var/projects/test'
  args ['migrate:latest']
  action :run
end

Disclaimer

  1. This cookbook is under development. Use at your own risk.
  2. This cookbook doesn't install Node.js itself, it presupposes that Node.js is installed on your system. Any method of installing Node.js on your system should work. E.g. by using the nodejs cookbook.
  3. This cookbook should work on modern Debian and RHEL based systems.

Testing

Run script/bootstrap to install necessary Ruby Gems.

Run script/test to perform KitchenCI tests.

License

MIT @ Alexander Pyatkin