Project

knitter

0.0
No commit activity in last 3 years
No release in over 3 years
Wraps the Javascript "yarn" command; query and install Javascript packages from Ruby. Reads the package.json file directly to detect packages that are installed, and shells out to `yarn` to initialize and install packages.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.7
~> 2.13
~> 10.0
~> 0.4.5

Runtime

 Project Readme

Knitter

Build Status

A lightweight Ruby Gem wrapper around the node package manager. Allows checking installation status of and installing packages.

Installation

Add this line to your application's Gemfile:

gem 'knitter'

And then execute:

$ bundle

Or install it yourself as:

$ gem install knitter

Usage

require 'knitter'

yarn = Knitter::Yarn.new('my-npm-project-directory')

# create a bare-bones 'package.json' and 'yarn.lock' file
yarn.init

# test with the infamous left-pad.
package = Knitter::Package.new('left-pad', yarn: yarn)

package.installed? # false

package.add

package.installed? # true

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/nathanstitt/npm-wrapper.

License

The gem is available as open source under the terms of the MIT License.