It would be better to throw an error, so that build could exit with non-zero code if incorrect environment was specified. Alternatively this can be made optional, so that it throws only if options.thrownOnBadEnviroment or something like that. is set.
If
options.environment
was set to non existing key in configuration json, then plugin will silently fail and give back unexpected config value, that includes all existing environments. See https://github.com/ajwhite/gulp-ng-config/blob/develop/gulp-ng-config.js#L65It would be better to throw an error, so that build could exit with non-zero code if incorrect environment was specified. Alternatively this can be made optional, so that it throws only if
options.thrownOnBadEnviroment
or something like that. is set.What do you think about it?