mirror of
https://github.com/scratchfoundation/gh-pages.git
synced 2024-11-25 00:38:07 -05:00
Merge pull request #59 from tschaub/multiglob
Allow an array of src patterns to be provided.
This commit is contained in:
commit
ea4cbebf8d
3 changed files with 7 additions and 7 deletions
|
@ -3,7 +3,7 @@ var fs = require('fs');
|
||||||
|
|
||||||
var Q = require('q');
|
var Q = require('q');
|
||||||
var wrench = require('wrench');
|
var wrench = require('wrench');
|
||||||
var glob = require('glob');
|
var globby = require('globby');
|
||||||
|
|
||||||
var git = require('./git');
|
var git = require('./git');
|
||||||
|
|
||||||
|
@ -113,7 +113,7 @@ exports.publish = function publish(basePath, config, callback) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var files = glob.sync(options.src, {
|
var files = globby.sync(options.src, {
|
||||||
cwd: basePath,
|
cwd: basePath,
|
||||||
dot: options.dotfiles
|
dot: options.dotfiles
|
||||||
}).filter(function(file) {
|
}).filter(function(file) {
|
||||||
|
@ -125,7 +125,7 @@ exports.publish = function publish(basePath, config, callback) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var only = glob.sync(options.only, {cwd: basePath});
|
var only = globby.sync(options.only, {cwd: basePath});
|
||||||
|
|
||||||
git.exe(options.git);
|
git.exe(options.git);
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"async": "1.5.2",
|
"async": "1.5.2",
|
||||||
"commander": "2.9.0",
|
"commander": "2.9.0",
|
||||||
"glob": "~7.0.0",
|
"globby": "^4.0.0",
|
||||||
"graceful-fs": "4.1.2",
|
"graceful-fs": "4.1.2",
|
||||||
"q": "1.4.1",
|
"q": "1.4.1",
|
||||||
"q-io": "1.13.2",
|
"q-io": "1.13.2",
|
||||||
|
|
|
@ -35,7 +35,7 @@ If a `gh-pages` branch already exists, it will be updated with all commits from
|
||||||
**Note** that any files in the `gh-pages` branch that are *not* in the `src` files **will be removed**. See the [`add` option](#optionsadd) if you don't want any of the existing files removed.
|
**Note** that any files in the `gh-pages` branch that are *not* in the `src` files **will be removed**. See the [`add` option](#optionsadd) if you don't want any of the existing files removed.
|
||||||
|
|
||||||
|
|
||||||
### <a id="optionsbase">`basePath`</a>
|
### <a id="basepath">`basePath`</a>
|
||||||
* type: `string`
|
* type: `string`
|
||||||
|
|
||||||
The base directory for all source files (those listed in the `src` config property).
|
The base directory for all source files (those listed in the `src` config property).
|
||||||
|
@ -68,10 +68,10 @@ The default options work for simple cases cases. The options described below le
|
||||||
|
|
||||||
|
|
||||||
#### <a id="optionssrc">options.src</a>
|
#### <a id="optionssrc">options.src</a>
|
||||||
* type: `string`
|
* type: `string|Array<string>`
|
||||||
* default: `'**/*'`
|
* default: `'**/*'`
|
||||||
|
|
||||||
The [minimatch](https://github.com/isaacs/minimatch) pattern used to select which files should be published.
|
The [minimatch](https://github.com/isaacs/minimatch) pattern or array of patterns used to select which files should be published.
|
||||||
|
|
||||||
|
|
||||||
#### <a id="optionsdotfiles">options.dotfiles</a>
|
#### <a id="optionsdotfiles">options.dotfiles</a>
|
||||||
|
|
Loading…
Reference in a new issue