Skip to content

Commit 92e4c45

Browse files
committed
fix(gulp): rename to gulpPrefixer
1 parent 5cfb19f commit 92e4c45

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

ja/gulp/README.md

+7-6
Original file line numberDiff line numberDiff line change
@@ -55,24 +55,25 @@ gulp.task("sass", function() {
5555

5656
ここでは`gulp-prefixer`という、それぞれのファイルに対して先頭に特定の文字列を追加するgulpプラグインを書いていきます。
5757

58-
同様の名前のプラグインが公式のドキュメントで「プラグインの書き方」の例として紹介されているので合わせてみると良いでしょう
58+
同様の名前のプラグインが公式のドキュメントで「プラグインの書き方」の例として紹介されているので合わせて見ると良いでしょう
5959

60-
- [gulp/docs/writing-a-plugin at master · gulpjs/gulp](https://github.com/gulpjs/gulp/tree/master/docs/writing-a-plugin "gulp/docs/writing-a-plugin at master · gulpjs/gulp")
61-
- [gulp/dealing-with-streams.md at master · gulpjs/gulp](https://github.com/gulpjs/gulp/blob/master/docs/writing-a-plugin/dealing-with-streams.md "gulp/dealing-with-streams.md at master · gulpjs/gulp")
60+
- [gulp/docs/writing-a-plugin](https://github.com/gulpjs/gulp/tree/master/docs/writing-a-plugin "gulp/docs/writing-a-plugin at master · gulpjs/gulp")
61+
- [gulp/dealing-with-streams.md](https://github.com/gulpjs/gulp/blob/master/docs/writing-a-plugin/dealing-with-streams.md "gulp/dealing-with-streams.md at master · gulpjs/gulp")
6262

63-
gulpプラグインは一般的にオプションを受け取り、NodeのStreamを返す関数として実装されます。
63+
多くのgulpプラグインはオプションを受け取り、NodeのStreamを返す関数として実装されます。
6464

6565
[import gulp-prefixer.js](../../src/gulp/gulp-prefixer.js)
6666

6767
ここで実装した`gulp-prefixer`は、gulpのタスクで次のように書くことで利用できます。
6868

6969
[import gulpfile.babel.js](../../src/gulp/gulpfile.babel.js)
7070

71-
この`default`タスクが実行されると次のような処理が行われます
71+
この`default`タスクは次のような処理が行われます
7272

7373
1. `./*.*`にマッチするファイルを取得(全てのファイル)
7474
2. 取得したファイルの先頭に"prefix text"という文字列を追加する
75-
3. 変更したされたファイルを`build/`ディレクトリに出力する
75+
3. 変更したファイルを`build/`ディレクトリに出力する
76+
7677

7778

7879
- [ ] どういう用途に向いている?

src/gulp/gulp-prefixer.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export function prefixStream(prefix) {
1414
});
1515
}
1616

17-
let gulpTransform = function (prefix) {
17+
let gulpPrefixer = function (prefix) {
1818
// enable `objectMode` of the stream for vinyl File objects.
1919
return new Transform({
2020
// Takes in vinyl File objects
@@ -35,4 +35,4 @@ let gulpTransform = function (prefix) {
3535
});
3636
};
3737

38-
export default gulpTransform;
38+
export default gulpPrefixer;

0 commit comments

Comments
 (0)