This is an example of how to use the inject
parameter of the task build.scripts.concat.
This parameter lets you inject JS files in others.
Inject is inactive by default in the ui-gulp_tasks, you need to activate it
var buildConcat = require('ui-gulp_tasks/tasks/build.scripts.concat');
buildConcat(gulp, paths, bundles, {
'inject': true,
'injectBasePath': './src/scripts/'
})
injectBasePath
: This is the base path where inject with look for files.
For example, if you have this in your js file:
inject('components/filea');
Inject with look the file here:
./src/scripts/components/filea.js
2) Inject files: Example
inject('components/filea');
Do not put the .js extension.
The path is absolute starting from injectBasePath
.
npm run build