Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

tin

jprichardson3120.5.0

Easily manage NPM, component, and bower package files.

manage, packages, package, bower, component, browser, client, browserify, npm

readme

tin

Easily manage NPM, component, and bower package files.

Why?

Managing Node.js and browser side JavaScript packages can be a pain in the ass. Editing multiple fields in package.json (Node.js/NPM), component.json (browser/component), and bower.json (browser/bower) is tedious. Tin makes this easier.

Installation

npm install -g tin

Specs

Usage

Any of the three files package.json, component.json, and bower.json must exist. Tin will not create these files if they don't exist and they're not proper JSON.

Usage: tin [options]

Options:

-h, --help                                    output usage information
-p, --path [path]                             The path that contains the package files. Defaults to the current directory.
--create                                      If any of the files don't exist, it creates them.
--check                                       Check to verify files are valid. Don't use in conjunction with any other options.
-d, --desc [description]                      Update package descriptions.
-k, --keywords [keywords]                     Add to package keywords.
-m, --main [script]                           Update main script file.
-n, --name [name]                             Update name of the package.
-r, --repo [repo]                             Update source repository (GitHub shorthand).
-v, --version [version]                       Update package versions.
-b, --bump [major, minor, patch, prerelease]  Bump package version by increment

create

creates any of the package files if they don't exist:

tin --create

also, if any of the files do exist, it won't overwrite them, can pass other params too:

tin --create -name awesome

check

checks to make sure that the files are JSON parsable, don't use this in conjunction with any other args

tin --check

version

update the packages version:

tin -v 0.0.1

description

update package description:

tin -d "Super cool JavaScript module."

keywords

clear keywords:

tin -k

or

tin -k ""

add to the keywords:

tin -k "file, tcp, processing"

main script

tin -m "lib/awesome-module.js"

name

tin -n "awesome-module"

repo

tin -r "jprichardson/awesome-module"

version

tin -v "0.0.1"

(running tin -v without a parameter, like tin -v results in displaying the current Tin version)

License

(MIT License)

Copyright 2013, JP Richardson jprichardson@gmail.com

changelog

0.5.0 / 2014-05-23

  • added \n to end of file. Closes #13

0.4.0 / 2014-01-14

  • added --bump See #12

0.3.2 / 2013-12-06

  • check shouldn't fail if package file doesn't exist. Closes #9
  • fix bug when keywords array didn't exist. Closes #10

0.3.1 / 2013-11-05

  • Repo now is properly set in component.json if github url is passed. Closes #8

0.3.0 / 2013-11-04

  • exit and output if can't parse a file
  • added --check arg to verify if can parse files
  • ensure that name, version, and description are on top

0.2.0 / 2013-11-01

  • added --create flag, Closes #4

0.1.0 / 2013-10-14

  • Output main according to component spec. Closes #2

0.0.2 / 2013-10-02

  • fixed description bug. Closes #1
  • fixed scripts bug for component.json

0.0.1 / 2013-10-01

  • Initial release.