Skip to content

Commit

Permalink
removes -t and -f options
Browse files Browse the repository at this point in the history
Removed the `--type` and `--forceNpmInstall` options as they are no
longer a thing.
  • Loading branch information
Matt Hernandez committed Aug 18, 2015
1 parent f267139 commit 1d4d556
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 29 deletions.
8 changes: 3 additions & 5 deletions lib/commands/project.js
Original file line number Diff line number Diff line change
Expand Up @@ -498,16 +498,14 @@ project.create = function (projectName, servoSize, runtime, cb) {
* Deploys a project.
* @param {string} projectName Name of the project to deploy. Specifying this skips prompts.
* @param {string} dir The path to deploy. If not specified defaults to current directory.
* @param {string} projectType The type of application being deployed.
* @param {boolean} includeModules Whether or not to include node_modules directory in upload.
* @param {boolean} forceNpmInstall Value indicating whether to force an npm install.
* @param {string} registry npm registry url.
* @param {boolean} meteorDebug Value indicating whether to override meteor debug mode.
* @param {boolean} withTests Value indicating whether to run tests for the project on deploy.
* @param {function} cb The callback.
*/
//-----------------------------------------------------------------------------
project.deploy = function (projectName, dir, projectType, includeModules, forceNpmInstall, registry, meteorDebug, withTests, cb) {
project.deploy = function (projectName, dir, includeModules, registry, meteorDebug, withTests, cb) {
if (typeof dir !== 'string') {
dir = process.cwd();
}
Expand Down Expand Up @@ -604,7 +602,7 @@ project.deploy = function (projectName, dir, projectType, includeModules, forceN
if (!selectedProject) {
return fn('You must deploy to a project.');
}
projectController.deploy(selectedProject.id, dir, projectType, includeModules, forceNpmInstall, registry, meteorDebug, withTests, function (err, domain) {
projectController.deploy(selectedProject.id, dir, includeModules, registry, meteorDebug, withTests, function (err, domain) {
if (!err) {
modulus.io.success(selectedProject.name + ' running at ' + domain);
fn();
Expand All @@ -620,7 +618,7 @@ project.deploy = function (projectName, dir, projectType, includeModules, forceN
if (status === 'UPLOADING' && uploadTries < uploadTriesMax) {
uploadTries++;
modulus.io.error(util.format('Upload Failed. Retrying. (%s/%s)', uploadTries, uploadTriesMax));
project.deploy(selectedProject.name, dir, projectType, includeModules, forceNpmInstall, registry, meteorDebug, fn);
project.deploy(selectedProject.name, dir, includeModules, registry, meteorDebug, fn);
} else {
fn(err);
}
Expand Down
19 changes: 5 additions & 14 deletions lib/controllers/project.js
Original file line number Diff line number Diff line change
Expand Up @@ -221,21 +221,13 @@ Project.prototype.saveVars = function(projectId, vars, callback) {
};

//-----------------------------------------------------------------------------
Project.prototype.deploy = function(projectId, dir, projectType, includeModules, forceNpmInstall, registry, meteorDebug, withTests, callback) {
Project.prototype.deploy = function(projectId, dir, includeModules, registry, meteorDebug, withTests, callback) {
var projectController = this;
var projectType;

async.waterfall([
function(cb) {
if (projectType) {
projectType = projectType.toUpperCase();
if (Project.types.hasOwnProperty(projectType)) {
cb(null, Project.types[projectType]);
} else {
cb({code:'INVALID_PROJECT_TYPE'});
}
} else {
projectController.detectProjectType(dir, cb);
}
projectController.detectProjectType(dir, cb);
},

function(type, cb) {
Expand Down Expand Up @@ -275,7 +267,7 @@ Project.prototype.deploy = function(projectId, dir, projectType, includeModules,
},

function(path, zipFile, cb) {
projectController._deploy(projectId, zipFile, forceNpmInstall, registry, withTests, function(err, domain) {
projectController._deploy(projectId, zipFile, registry, withTests, function(err, domain) {
fs.unlinkSync(zipFile);

//Removes the .demeteorized folder
Expand Down Expand Up @@ -303,7 +295,7 @@ Project.prototype.deploy = function(projectId, dir, projectType, includeModules,
};

//-----------------------------------------------------------------------------
Project.prototype._deploy = function(projectId, file, forceNpmInstall, registry, withTests, callback) {
Project.prototype._deploy = function(projectId, file, registry, withTests, callback) {
modulus.io.print('Uploading project...');
var status = Project.status.uploading;

Expand All @@ -319,7 +311,6 @@ Project.prototype._deploy = function(projectId, file, forceNpmInstall, registry,

var client = new Uploader(),
options = {
forceNpmInstall: !!forceNpmInstall,
registry: registry,
withTests: !!withTests
};
Expand Down
10 changes: 0 additions & 10 deletions lib/routes/project.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,11 +152,7 @@ module.exports = function (modulus) {
this.line(' options:'.input);
this.line(' -p, --project-name Name of the project to deploy. Prompts are skipped when specified.'.input);
this.line(' -m, --include-modules Flag that indicates whether or not to include the node_modules folder in the bundle.'.input);
this.line(' -f, --force-npm-install Triggers a reinstall of node modules.'.input);
this.line(' -r, --registry Specify a registry to install modules from.'.input);
this.line(' -t, --project-type Specifies type of application you are deploying. Overrides the auto-detection that occurs normally. Acceptable types are listed below.'.input);
this.line(' nodejs A typical Node.js application.'.input);
this.line(' meteor A Meteor application.'.input);
this.line(' -w, --with-tests Specifies that tests should be run before deploying this project.'.input);
this.line(' -D, --meteor-debug Override debug mode for meteor project.'.input);
});
Expand All @@ -166,9 +162,7 @@ module.exports = function (modulus) {
.option('-d, --download', 'Flag that signals to download the logs instead of printing them.')
.option('-o, --output [value]', 'Specifies the file to download to. Must be file type tar.gz')
.option('-m, --include-modules', 'Flag that indicates whether or not to include the node_modules folder in the bundle.')
.option('-f, --force-npm-install', 'Triggers a reinstall of node modules.')
.option('-r, --registry [value]', 'Specify a registry to install modules from', '')
.option('-t, --project-type [value]', 'Specifies the type of application the project is. Ex: "node" or "meteor".')
.option('-w, --with-tests', 'Specifies that tests should be run before deploying this project.')
.option('-D, --meteor-debug', 'Override debug mode for meteor projects.');

Expand All @@ -182,9 +176,7 @@ module.exports = function (modulus) {
[
modulus.program.projectName,
dir,
modulus.program.projectType,
modulus.program.includeModules,
modulus.program.forceNpmInstall,
modulus.program.registry,
modulus.program.meteorDebug,
modulus.program.withTests
Expand All @@ -202,9 +194,7 @@ module.exports = function (modulus) {
[
modulus.program.projectName,
dir,
modulus.program.projectType,
modulus.program.includeModules,
modulus.program.forceNpmInstall,
modulus.program.registry,
modulus.program.meteorDebug,
modulus.program.withTests
Expand Down

0 comments on commit 1d4d556

Please sign in to comment.