Skip to content

Commit

Permalink
Build a little bit more simple and easy to read/understand.
Browse files Browse the repository at this point in the history
  • Loading branch information
jeandat committed Feb 10, 2016
1 parent bd8ddbb commit 1570566
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
11 changes: 4 additions & 7 deletions grunt/serve.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,9 @@ module.exports = function (grunt) {
// I'm doing that in order to be able to give command line arguments from npm to that parallel task.
grunt.registerTask('run', function (platform) {
if (!platform) {
grunt.fail.fatal('Syntax: grunt shell:run:<platform> [--livereload|-l]');
grunt.fail.fatal('Syntax: grunt shell:run:<platform>');
return;
}
var livereload = grunt.option('livereload') || grunt.option('l');

var config = {
parallel: {
run: {
Expand All @@ -23,7 +21,7 @@ module.exports = function (grunt) {
args: ['chokidar']
}, {
cmd: 'ionic',
args: ['run', platform, '-c', '-s', livereload ? '--livereload' : '']
args: ['run', platform, '-c', '-s', '--livereload']
}]
}
}
Expand All @@ -38,7 +36,6 @@ module.exports = function (grunt) {
// I'm doing that in order to be able to give command line arguments from npm to that parallel task.
grunt.registerTask('serve', function () {

var livereload = grunt.option('livereload') || grunt.option('l');
var lab = grunt.option('lab');

// wrapper for `ionic serve` command which launch a local web server serving `www` folder.
Expand All @@ -53,7 +50,7 @@ module.exports = function (grunt) {
args: ['chokidar']
}, {
cmd: 'ionic',
args: ['serve', '-a', '-c', '-s', '--nogulp', livereload ? '--livereload' : '', lab ? '--lab' : '']
args: ['serve', '-a', '-c', '-s', '--nogulp', '--livereload', lab ? '--lab' : '']
}]
}
}
Expand All @@ -80,4 +77,4 @@ module.exports = function (grunt) {
}

};
};
};
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,13 @@
"prestart": "npm install",
"postinstall": "bower install",
"start": "npm run serve",
"serve": "grunt dev --mock true --proxy true && grunt serve --mock true --proxy true",
"serve": "grunt dev --mock --proxy && grunt serve --mock --proxy",
"android": "grunt dev && ionic run android",
"android-lr": "grunt dev --proxy true && grunt run:android -l --proxy true",
"android-lr": "grunt dev --proxy && grunt run:android --proxy",
"ios": "grunt dev && ionic run ios",
"ios-lr": "grunt dev --proxy true && grunt run:ios -l --proxy true",
"test": "grunt dev --mock true && grunt karma:dev",
"wtest": "grunt dev --mock true && grunt parallel:wtest --mock true",
"ios-lr": "grunt dev --proxy && grunt run:ios --proxy",
"test": "grunt dev --mock && grunt karma:dev",
"wtest": "grunt dev --mock && grunt parallel:wtest --mock",
"doc": "grunt clean:doc groc plato",
"build": "grunt dev && ionic build"
}
Expand Down

0 comments on commit 1570566

Please sign in to comment.