This commit is contained in:
Iuri Matias 2017-10-14 06:06:09 -04:00
parent f450bf2e6a
commit 704a1ff517
2 changed files with 6 additions and 10 deletions

View File

@ -1,8 +1,5 @@
let program = require('commander');
let colors = require('colors');
let shelljs = require('shelljs');
let promptly = require('promptly');
let path = require('path');
const program = require('commander');
const promptly = require('promptly');
const Embark = require('../lib/index');
let embark = new Embark;
@ -30,11 +27,11 @@ class Cmd {
program.parse(args);
}
newApp(name) {
newApp() {
let validateName = function (value) {
try {
if (value.match(/^[a-zA-Z\s\-]+$/)) return value;
if (value.match(/^[a-zA-Z\s-]+$/)) return value;
} catch (e) {
throw new Error('Name must be only letters, spaces, or dashes');
}
@ -79,7 +76,7 @@ class Cmd {
program
.command('build [environment]')
.description('deploy and build dapp at dist/ (default: development)')
.action(function (env, options) {
.action(function (env, _options) {
embark.build({env: env || 'development'});
});
}
@ -150,7 +147,7 @@ class Cmd {
program
.command('upload [platform] [environment]')
.description('upload your dapp to a decentralized storage. possible options: ipfs, swarm (e.g embark upload swarm)')
.action(function (platform, env, options) {
.action(function (platform, env, _options) {
// TODO: get env in cmd line as well
embark.initConfig(env || 'development', {
embarkConfig: 'embark.json', interceptLogs: false

View File

@ -1,4 +1,3 @@
var colors = require('colors');
var shelljs = require('shelljs');
var fs = require('../../core/fs.js');