Type: string
Default: filename or "ngConstants"
Overrides: json.name optional
The module name.
This property will override any name property defined in the input json file. The default name when used as a transform stream (i.e. regular plugin) is the passed file name. When options.stream is true the default name is "ngConstants".
options.stream
Type: boolean
Default: false optional
If true it returns a new gulp stream, which can then be piped other gulp plugins
(Example).
Constants to defined in the module.
Can be a JSON string or an Object.
This property extends the one defined in the input json file. If there are
properties with the same name, this properties will override the ones from the
input json file.
options.merge
Type: boolean
Default: false optional
This applies to constants of the Object type.
If true the constants of type Object from the input file and the constants
from the configuration will be merged.
An array that specifies the default dependencies a module should have. To add the constants to an existing module, you can set it to false.
This property will override any deps property defined in the input json file.
A boolean to active or deactive the automatic wrapping.
A string who will wrap the result of file, use the
<%= __ngModule %> variable to indicate where to put the generated
module content.
A string with 'amd' that wraps the module as an AMD module,
compatible with RequireJS
options.wrapHeader
Type: string
Default: null optional
A string that is prepended to the wrapper.
options.wrapFooter
Type: string
Default: null optional
A string that is appended to the wrapper.
options.space
Type: string
Default: null optional
A string that defines how the JSON.stringify method will prettify your code, e.g. '\t', ' '
'use strict';importangularfrom'angular';importenvfrom'env';letapp=angular.module('app',[env.name]).factory('someRepository',function($http,ENV){//Just to illustrate$http.get(ENV.API_URL);});exportdefaultapp;
请发表评论