gulp-main-node-files
Allows to get main js files from installed /node_modules
.
var files = ;
Installation
npm i --save-dev gulp-main-node-files
Usage
- Connect in
gulpfile.js
var mainNodeFiles = ;
and than
var mainNodeJsFiles = ;var src = gulp;
- For example, copying js-files from
/node_modules
folder to/build
.
gulp;
Options
You can pass in the options
object to customize function behavior with the following keys:
-
packageJsonPath (default -
'./package.json'
) - a path to yourpackage.json
file. -
nodeModulesPath (default -
'./node_modules'
) - a path tonode_modules
folder. -
overrides (no default value) - this is an object that allows override
main:
section frompackage.json
file.- For example, if package points out to the wrong or not the whole-source file:
- or if you want to return several main files:
- For example, if package points out to the wrong or not the whole-source file:
-
order (no default value) - the object that allows to specify returned main files order. For example, if you further inject returned files into
html
and want to connect jquery before any other libraries. -
skip (no default value) - the object which keys represent packages user wants to skip (value for a key should be truthy, if value is falsy, it's the same situation when key is absent at all - package won't be skipped). For example, if you want to build hybrid angular app, you can bundle AngularJS files with gulp-main-node-files and leave Angular ones as is.