gulp-subinclude

1.0.5 • Public • Published

gulp-subinclude

Allows you to include other gulpfiles and run their tasks directly, inline, without modifying those files or shelling out to a separate process.

Notice: Source is being migrated to a new repository and is temporarily unavailable.

Install

$ npm install --save-dev gulp-subinclude

Usage

require('gulp-subinclude')
  .include('main/src/gulpfile.js', 'main')
  .include('others/**/gulpfile.js');
 
gulp.task('default', ['main-default', 'others-stuff-default']);

API

include(glob, [prefix], [options])

Loads any files specified by glob and imports the gulp tasks. Directories are ignored.

glob

Type: string or string[]
Required

Paths to search for globfiles to load. Any file specified will be loaded and executed, so only include actual globfiles.

prefix

Type: string
Default: undefined

Specifies the prefix to prepend on task names from these sources. If multiple files are loaded and this option is supplied, it's possible to get task name collisions. If this is unspecified or undefined, the prefix will be based on the path to the globfile. A globfile at a/b/c/globfile.js will have tasks prefixed with a-b-c. A globfile at a/b/c/d.js will have tasks prefixed with a-b-c-d.

options

separator

Type: string
Default: '-'

The separator to use between path chunks.

includeList

Type: string[]
Default: undefined

Lists the tasks to include from the loaded file by name. If this is specified, only the tasks listed will be importanted, not their dependencies.

If both excludeList and includeList are supplied, exclude takes precendence.

excludeList

Type: string[]
Default: undefined

Lists the tasks to exclude from the loaded file by name. If this is specified, and task listed will not be imported.

If both excludeList and includeList are supplied, exclude takes precendence.

trace

Type: boolean
Default: false

Module-level flag for tracing. Set to true to enable trace output. This is useful when trying to diagnose a problem with compilation, or when developing the library.

License

The MIT License (MIT)

Copyright (c) 2016 Paul Hounshell paul.hounshell@gmail.com

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Package Sidebar

Install

npm i gulp-subinclude

Weekly Downloads

9

Version

1.0.5

License

MIT

Last publish

Collaborators

  • shaftway