A little Node.js dependency installer
npm install depA little Node.js dependency installer with the bare minimum features for module end-users.
###### ToDo
+ Follow the spec of npm's [package-lock.json]
dep is trying to have a similar/same interface of the features with npm, but there are some slightly different implementations internally.
dep install#### dep install
You can install a package as like npm install.
``console`
$ dep install webpack
#### dep install --save={dev|prod} dependencies
You can install the package and save it to either or devDependencies by using --only={dev|prod}.
`console`
$ dep install webpack --save=dev
#### dep install --only={dev|prod}dependencies
You can install either only or devDependencies by using --only={dev|prod}.
`console`
$ dep install --only=prod
ToDo.It will follow the spec of npm's [package-lock.json].
$3
#### dep run [script] --
This command will take the matched key with provided [script] among the scripts field defined in package.json and execute the value.`console
$ dep run test
`You also can provide additional arguments by putting
--.`console
$ dep run build -- dist/bundle.js
`####
dep run
If you do not give an arbitrary [script] to dep run, it lists all of the commands from scripts in a local package.json.`console
$ dep run
Available scripts via dep rundep run build:
webpack src/index.js
dep run test:
tap "test/*.js"
`Usage
`console
$ dep -h
A little Node.js dependency installerCommands:
install Install dependencies defined in package.json [aliases: i]
lock Lock dependencies installed in node_modules [aliases: l]
run Run an arbitrary command from scripts in package.json [aliases: r]
Options:
--help, -h Show help [boolean]
--version, -v Show version information [boolean]
`Concepts
$3
The target user is always module end-user who makes something with node_modules and doesn't make packages. And the goal of this project is to reproduce most of the features that the end-users use to build their stuff on daily basis.$3
Speed and local disk capacity are a trade-off. To take the both benefits, it would be better to have the cache in somewhere proxy layer instead of local.Therefore, dep does not make cache files in a local disc for now.
$3
Stability is a core value. Having a small set makes keeping the green badges easier.[![github-actions][g-img]][g-url]
Installation
Since dep works independently of npm, dep has a standalone script to install.$3
`console
$ curl -L https://github.com/depjs/dep/raw/master/scripts/install.js | node
`$3
`console
$ npm install --global dep
`Uninstallation
Also for uninstallation.$3
`console
$ curl -L https://github.com/depjs/dep/raw/master/scripts/uninstall.js | node
`$3
`console
$ npm uninstall --global dep
``See [CONTRIBUTING.md][] for more info.
[g-img]: https://github.com/depjs/dep/workflows/Node.js%20CI/badge.svg
[g-url]: https://github.com/depjs/dep/actions
[npm]: https://github.com/npm/npm
[git repository]: https://github.com/watilde/emoji-cli
[twitter]: https://twitter.com/watilde
[package-lock.json]: https://github.com/npm/npm/blob/latest/doc/spec/package-lock.md
[CONTRIBUTING.md]: https://github.com/depjs/dep/blob/master/.github/CONTRIBUTING.md
[MIT]: https://github.com/depjs/dep/blob/master/LICENSE