npmrc-to-env
<p align="center" valign="middle"> <a href="http://npm.im/npmrc-to-env"><img height="20" alt="Version" src="https://img.shields.io/npm/v/npmrc-to-env.svg?style=for-the-badge"></a> <a href="https://travis-ci.org/gtramontina/npmrc-to-env"><img height="2
Last updated 2 years ago by gtramontina .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install npmrc-to-env 
SYNC missed versions from official npm registry.

npmrc-to-env

Version Build Status MIT License Downloads Semantic Release

Why?

If all you have at hand is an .npmrc file, but you need exported environment variables to properly setup CI environments, for example, then this program comes in handy.

How?

$ npmrc-to-env --help

  Usage:
    npmrc-to-env [options]

  Options:
    -s --scope <scope>    Scope from which information will be extracted.

  Examples
    $ cat ~/.npmrc | npmrc-to-env
    $ cat ~/.npmrc | npmrc-to-env -s @myscope

You can, then, export the generated environment variables with:

$ export $(cat ~/.npmrc | npmrc-to-env | xargs)

Although all examples use ~/.npmrc as the source, it can be whatever .npmrc file you have.

Development

This repository holds a standard NodeJS project, so you can run all node-related commands, such as npm install, npm test, and whatnot. We do, however, use yarn do handle the dependencies. This shouldn't be a big deal, though.

Now, if you don't want to have to deal with having the right node version, yarn or whatever else installed locally, and you already have docker, then all you need to do is prefix any command you want to run with make run -- and we'll take care of everything. Like so:

$ make run -- yarn test
$ make run -- yarn test --watch
$ make run -- yarn …
$ make run -- npx …
$ make run -- sh

License

This software is licensed under the MIT license

Current Tags

  • 1.0.0                                ...           latest (2 years ago)

1 Versions

  • 1.0.0                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (2)
Dev Dependencies (10)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |