atticoos / gulp-ng-config

:wrench: Create AngularJS constants from a JSON config file
MIT License
173 stars 35 forks source link

environment: 'production' #74

Open ValenOnish opened 5 years ago

ValenOnish commented 5 years ago

my config.json file with multiple environments: {   "local": {     "EnvironmentConfig": {       "api": "http://localhost/"     }   },   "production": {     "EnvironmentConfig": {       "api": "https://api.production.com/"     }   } } Usage of the plugin: gulpNgConfig('myApp.config', {   environment: 'production' }) Expected output: angular.module('myApp.config', []) .constant('EnvironmentConfig', {"api": "https://api.production.com/"});

But my output configFile.js: angular.module("todoApp.config", []) .constant("local", {"EnvironmentConfig":{"api":"http://localhost/"}}) .constant("production", {"EnvironmentConfig":{"api":"https://api.production.com/"}});


What's wrong? todo.zip