reaction-cli
Advanced tools
Comparing version 0.3.7 to 0.3.8
@@ -30,3 +30,2 @@ #!/usr/bin/env node | ||
}).alias('v', 'version').describe('v', 'Show the current version of Reaction CLI').command('init', 'Create a new Reaction app (will create a new folder)', function () { | ||
(0, _utils.checkMeteor)(); | ||
return _yargs2.default.option('b', { | ||
@@ -38,31 +37,33 @@ alias: 'branch', | ||
}, function (argv) { | ||
return (0, _commands.init)(argv); | ||
return (0, _utils.checkDeps)(['meteor'], function () { | ||
return (0, _commands.init)(argv); | ||
}); | ||
}).command('run', 'Start Reaction in development mode', function (options) { | ||
(0, _utils.checkApp)(); | ||
(0, _utils.checkMeteor)(); | ||
(0, _commands.run)(options); | ||
(0, _utils.checkDeps)(['app', 'meteor'], function () { | ||
return (0, _commands.run)(options); | ||
}); | ||
}).command('debug', 'Start Reaction in debug mode', function (options) { | ||
(0, _utils.checkApp)(); | ||
(0, _utils.checkMeteor)(); | ||
(0, _commands.run)(options); | ||
(0, _utils.checkDeps)(['app', 'meteor'], function () { | ||
return (0, _commands.run)(options); | ||
}); | ||
}).command('test', 'Run integration or unit tests', function (options) { | ||
(0, _utils.checkApp)(); | ||
(0, _utils.checkMeteor)(); | ||
(0, _commands.test)(options); | ||
(0, _utils.checkDeps)(['app', 'meteor'], function () { | ||
return (0, _commands.test)(options); | ||
}); | ||
}).command('pull', 'Pull Reaction updates from Github and install NPM packages', function () { | ||
(0, _utils.checkApp)(); | ||
(0, _utils.checkMeteor)(); | ||
(0, _commands.pull)(); | ||
(0, _utils.checkDeps)(['app', 'meteor'], function () { | ||
return (0, _commands.pull)(); | ||
}); | ||
}).command('update', 'Update Atmosphere and NPM packages', function () { | ||
(0, _utils.checkApp)(); | ||
(0, _utils.checkMeteor)(); | ||
(0, _commands.update)(); | ||
(0, _utils.checkDeps)(['app', 'meteor'], function () { | ||
return (0, _commands.update)(); | ||
}); | ||
}).command('up', 'Update Atmosphere and NPM packages', function () { | ||
(0, _utils.checkApp)(); | ||
(0, _utils.checkMeteor)(); | ||
(0, _commands.update)(); | ||
(0, _utils.checkDeps)(['app', 'meteor'], function () { | ||
return (0, _commands.update)(); | ||
}); | ||
}).command('reset', 'Reset the database and (optionally) delete build files', function () { | ||
(0, _utils.checkApp)(); | ||
(0, _utils.checkMeteor)(); | ||
(0, _commands.reset)(); | ||
(0, _utils.checkDeps)(['app', 'meteor'], function () { | ||
return (0, _commands.reset)(); | ||
}); | ||
}).help('h').alias('h', 'help').showHelpOnFail(false).argv; | ||
@@ -72,5 +73,5 @@ | ||
if (!args._.length && !args.h && !args.help) { | ||
(0, _utils.checkApp)(); | ||
(0, _utils.checkMeteor)(); | ||
(0, _commands.run)(_yargs2.default); | ||
(0, _utils.checkDeps)(['app', 'meteor'], function () { | ||
return (0, _commands.run)(_yargs2.default); | ||
}); | ||
} |
@@ -7,7 +7,9 @@ 'use strict'; | ||
exports.default = function () { | ||
exports.default = function (callback) { | ||
var meteorInstalled = !!(0, _shelljs.which)('meteor'); | ||
var blue = _logger2.default.blue; | ||
if (!meteorInstalled) { | ||
_logger.Log.warn('Oops! You don\'t have Meteor installed yet! \n'); | ||
_logger2.default.warn('\nOops! You don\'t have Meteor installed yet! \n'); | ||
@@ -21,11 +23,14 @@ _inquirer2.default.prompt([{ | ||
if (answers.meteor) { | ||
_logger.Log.info('Installing Meteor...\n'); | ||
_logger2.default.info('Installing Meteor...\n'); | ||
(0, _shelljs.exec)('curl https://install.meteor.com/ | sh'); | ||
_logger.Log.success('Meteor successfully installed!'); | ||
_logger2.default.success('Meteor successfully installed!'); | ||
callback(); | ||
} else { | ||
(0, _shelljs.echo)('\nOk, try running this command again once you have Meteor installed.'); | ||
(0, _shelljs.echo)('Learn more at: ' + _logger.info.underline('http://www.meteor.com')); | ||
_logger2.default.info('\nOk, try running this command again once you have Meteor installed.'); | ||
_logger2.default.info('Learn more at: ' + blue.bold.underline('http://www.meteor.com') + '\n'); | ||
process.exit(1); | ||
} | ||
}); | ||
} else { | ||
callback(); | ||
} | ||
@@ -42,2 +47,4 @@ }; | ||
var _logger2 = _interopRequireDefault(_logger); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } |
@@ -61,2 +61,11 @@ 'use strict'; | ||
var _check_deps = require('./check_deps'); | ||
Object.defineProperty(exports, 'checkDeps', { | ||
enumerable: true, | ||
get: function get() { | ||
return _interopRequireDefault(_check_deps).default; | ||
} | ||
}); | ||
var _check_meteor = require('./check_meteor'); | ||
@@ -63,0 +72,0 @@ |
{ | ||
"name": "reaction-cli", | ||
"version": "0.3.7", | ||
"version": "0.3.8", | ||
"description": "A command line tool for working with the Reaction Commerce e-commerce platform.", | ||
@@ -14,3 +14,3 @@ "main": "./dist/main.js", | ||
"engines": { | ||
"node": ">=0.12.0" | ||
"node": ">=4.0.0" | ||
}, | ||
@@ -17,0 +17,0 @@ "bin": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
29118
22
535