UNPKG

ember-cli

Version:

Command line tool for developing ambitious ember.js apps

34 lines (28 loc) 845 B
'use strict'; var path = require('path'); var Command = require('../models/command'); module.exports = Command.extend({ name: 'build', description: 'Builds your app and places it into the output path (dist/ by default).', availableOptions: [ { name: 'environment', type: String, default: 'development' }, { name: 'output-path', type: path, default: 'dist/' }, { name: 'watch', type: Boolean, default: false } ], run: function(commandOptions) { var BuildTask = this.taskFor(commandOptions); var buildTask = new BuildTask({ ui: this.ui, analytics: this.analytics, project: this.project }); return buildTask.run(commandOptions); }, taskFor: function(options) { if (options.watch) { return this.tasks.BuildWatch; } else { return this.tasks.Build; } } });