Add support for a registry configuration field (#211)

* Add support for a `registry` configuration field

For those of us using a system-wide private registry, this helps by allowing hyperterm to bypass it when installing/updates plugins.

* Use getDecoratedConfig()

* registry -> npmRegistry

* no message
This commit is contained in:
Jason Miller 2016-07-18 20:50:58 -04:00 committed by Guillermo Rauch
parent 17af6cb85d
commit dc9b4d371f
2 changed files with 4 additions and 0 deletions

View file

@ -51,6 +51,8 @@ module.exports = {
// the shell to run when spawning a new session (i.e. /usr/local/bin/fish)
// if left empty, your system's login shell will be used by default
shell: ''
// for advanced config flags please refer to https://hyperterm.org/#cfg
},
// a list of plugins to fetch and install from npm

View file

@ -191,6 +191,8 @@ function toDependencies (plugins) {
function install (fn) {
shellEnv().then((env) => {
let registry = exports.getDecoratedConfig().npmRegistry;
if (registry) env.NPM_CONFIG_REGISTRY = registry;
exec('npm prune && npm install --production', {
cwd: path,
env: env