tmaximini / ionic-gulp-seed

A starting point for Ionic Apps
74 stars 20 forks source link

`gulp --emulate ios` produces broken build. #4

Closed kupuguy closed 9 years ago

kupuguy commented 9 years ago

When you use the --emulate or --run command with an argument this has the effect of setting the build variable to the argument value (e.g. 'ios').

Unfortunately gulp-if treats a string condition as a glob pattern to match on the filename so any test of the form plugins.if(build, ...) regards the condition as false.

The fix is to change the line:

var build = args.build || args.emulate || args.run;

to:

var build = !!(args.build || args.emulate || args.run);

forcing build to a boolean and the rest of the script then runs as expected.

tmaximini commented 9 years ago

thanks @kupuguy - you are right it has to be a forced boolean in this case.