イナヅマTVログ

Gulp 始めてみましたのメモ – 6 – Globbing patterns, Glob options

| 0件のコメント

gulp の話というより Node.js の話です。
gulp.src で指定する ファイル・パターン と task に指定できる Node option の Document, サンプルです。

Node.js の理解度を上げないと…

Gulp 始めてみましたのメモ – 1 – 導入からCompass
Gulp 始めてみましたのメモ – 2 – CSSをminify
Gulp 始めてみましたのメモ – 3 – JavaScriptをconcat, minify, source mapとYUIDoc
Gulp 始めてみましたのメモ – 4 – taskを順に実行
Gulp 始めてみましたのメモ – 5 – コピーと削除, ファイル・ディレクトリ
の続き。

npm del Document から抜粋してます。

Globbing patterns

sindresorhus/multimatch

sindresorhus/multimatch
Globbing patterns
最低限知っておくべきことらしいです。

Just a quick overview.

* matches any number of characters, but not /
? matches a single character, but not /
** matches any number of characters, including /, as long as it’s the only thing in a path part
{} allows for a comma-separated list of “or” expressions
! at the beginning of a pattern will negate the match

isaacs/minimatch

github: isaacs/minimatch

isaacs/minimatch usage

var minimatch = require("minimatch")
 
minimatch("bar.foo", "*.foo") // true!
minimatch("bar.foo", "*.bar") // false!
minimatch("bar.foo", "*.+(bar|foo)", { debug: true }) // true, and noisy!

Glob options

isaacs/node-glob

github: isaacs/node-glob

isaacs/node-glob options

コメントを残す

必須欄は * がついています


このサイトはスパムを低減するために Akismet を使っています。コメントデータの処理方法の詳細はこちらをご覧ください