@busy-web/cli
Advanced tools
Comparing version 0.2.12 to 0.3.0
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){ | ||
module.exports={ | ||
"name": "@busy-web/cli", | ||
"version": "0.2.11", | ||
"version": "0.2.12", | ||
"description": "Command line tools to enhance web dev tasks", | ||
@@ -94,4 +94,6 @@ "main": "src/index.js", | ||
if (action === 'config') { | ||
var args = arguments; | ||
args.shift(); | ||
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { | ||
args[_key - 1] = arguments[_key]; | ||
} | ||
require('./../helpers/docker-config')(args); | ||
@@ -553,13 +555,15 @@ } | ||
argv.forEach(function (arg) { | ||
var _arg$split = arg.split(':'), | ||
_arg$split2 = _slicedToArray(_arg$split, 2), | ||
em = _arg$split2[0], | ||
dm = _arg$split2[1]; | ||
argv.forEach(function (arg, idx) { | ||
if (arg.hasOwnProperty(idx)) { | ||
var _arg$split = arg.split(':'), | ||
_arg$split2 = _slicedToArray(_arg$split, 2), | ||
em = _arg$split2[0], | ||
dm = _arg$split2[1]; | ||
if (process.env[dm]) { | ||
if (!get(json, em)) { | ||
throw new Error('Error: ' + em + ' not found in ' + envPath); | ||
} else { | ||
set(json, em, process.env[dm]); | ||
if (process.env[dm]) { | ||
if (!get(json, em)) { | ||
throw new Error('Error: ' + em + ' not found in ' + envPath); | ||
} else { | ||
set(json, em, process.env[dm]); | ||
} | ||
} | ||
@@ -566,0 +570,0 @@ } |
{ | ||
"name": "@busy-web/cli", | ||
"version": "0.2.12", | ||
"version": "0.3.0", | ||
"description": "Command line tools to enhance web dev tasks", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -16,6 +16,4 @@ /** | ||
run(action) { | ||
run(action, ...args) { | ||
if (action === 'config') { | ||
const args = arguments; | ||
args.shift(); | ||
require('./../helpers/docker-config')(args); | ||
@@ -22,0 +20,0 @@ } |
@@ -47,9 +47,11 @@ | ||
argv.forEach(function(arg) { | ||
let [ em, dm ] = arg.split(':'); | ||
if (process.env[dm]) { | ||
if (!get(json, em)) { | ||
throw new Error(`Error: ${em} not found in ${envPath}`); | ||
} else { | ||
set(json, em, process.env[dm]); | ||
argv.forEach(function(arg, idx) { | ||
if (arg.hasOwnProperty(idx)) { | ||
let [ em, dm ] = arg.split(':'); | ||
if (process.env[dm]) { | ||
if (!get(json, em)) { | ||
throw new Error(`Error: ${em} not found in ${envPath}`); | ||
} else { | ||
set(json, em, process.env[dm]); | ||
} | ||
} | ||
@@ -56,0 +58,0 @@ } |
160753
1591