Skip to content

Commit

Permalink
fix(): bundle before build, emulate, run and upload
Browse files Browse the repository at this point in the history
  • Loading branch information
tlancina committed Mar 28, 2016
1 parent a4f3f5a commit c8930b8
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
5 changes: 4 additions & 1 deletion lib/ionic/cordova.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,10 @@ IonicTask.prototype.run = function(ionic, argv) {
})
.then(function(){
// TODO :(
if (argv.v2 && cmdName === 'build'){
if ( argv.v2 &&
!argv.b && !argv.nobundle &&
(cmdName === 'build' || cmdName === 'emulate' || cmdName === 'run' || cmdName === 'upload'))
{
var Build = IonicAppLib.v2.build;
var buildOptions = {
appDirectory: process.cwd(),
Expand Down
19 changes: 15 additions & 4 deletions lib/tasks/cliTasks.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@ var cordovaRunEmulateOptions = {
title: '',
boolean: true
},
'--device|--emulator|--target=FOO': ''
'--device|--emulator|--target=FOO': '',
'--nobundle|-b': {
title: '(v2 only) don\'t bundle JS/Sass before running.',
boolean: true
}
};

var TASKS = [
Expand Down Expand Up @@ -170,8 +174,7 @@ var TASKS = [
{
title: 'build',
name: 'build',
summary: 'Locally build an Ionic project for a given platform.\n' +
'(v2 only) does webpack build before given platform.',
summary: 'Build (prepare + compile) an Ionic project for a given platform.\n',
args: {
'[options]': '',
'<PLATFORM>': ''
Expand All @@ -180,6 +183,10 @@ var TASKS = [
'--nohooks|-n': {
title: 'Do not add default Ionic hooks for Cordova',
boolean: true
},
'--nobundle|-b': {
title: '(v2 only) don\'t bundle JS/Sass before building.',
boolean: true
}
},
module: './ionic/cordova'
Expand Down Expand Up @@ -238,7 +245,11 @@ var TASKS = [
'--email|-e': 'Ionic account email',
'--password|-p': 'Ionic account password',
'--note': 'The note to signify the upload',
'--deploy <channel_tag>': 'Deploys the upload to the given channel. Defaults to the Dev channel'
'--deploy <channel_tag>': 'Deploys the upload to the given channel. Defaults to the Dev channel',
'--nobundle|-b': {
title: '(v2 only) don\'t bundle JS/Sass before uploading.',
boolean: true
}
},
alt: ['up'],
module: './ionic/upload'
Expand Down

0 comments on commit c8930b8

Please sign in to comment.