Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
gulp-internal
Search
yiminghe
August 22, 2014
Technology
2
5.4k
gulp-internal
implementation about gulp
yiminghe
August 22, 2014
Tweet
Share
More Decks by yiminghe
See All by yiminghe
小程序终端技术架构
yiminghe
0
260
支付宝小程序的开放架构
yiminghe
0
200
gitc2016 react based architecture
yiminghe
1
180
antd at qcon2016
yiminghe
1
240
react-based architecture
yiminghe
2
180
React Ecosystem At Ant Financial
yiminghe
4
2.3k
ant design preview
yiminghe
1
330
react best practice
yiminghe
3
230
react at alipay
yiminghe
43
4.5k
Other Decks in Technology
See All in Technology
Phase04_ターミナル基礎
overflowinc
0
2.6k
「AIエージェントで変わる開発プロセス―レビューボトルネックからの脱却」
lycorptech_jp
PRO
0
160
TUNA Camp 2026 京都Stage ヒューリスティックアルゴリズム入門
terryu16
0
570
AI時代のシステム開発者の仕事_20260328
sengtor
0
290
Cursor Subagentsはいいぞ
yug1224
2
110
AgentCoreとLINEを使った飲食店おすすめアプリを作ってみた
yakumo
2
260
Phase02_AI座学_応用
overflowinc
0
3.2k
データマネジメント戦略Night - 4社のリアルを語る会
ktatsuya
1
410
タスク管理も1on1も、もう「管理」じゃない - KiroとBedrock AgentCoreで変わった“判断の仕事”
yusukeshimizu
0
130
MIX AUDIO EN BROADCAST
ralpherick
0
110
Phase01_AI座学_基礎
overflowinc
0
4.4k
韓非子に学ぶAI活用術
tomfook
3
1k
Featured
See All Featured
How to train your dragon (web standard)
notwaldorf
97
6.6k
Building Applications with DynamoDB
mza
96
7k
The Curious Case for Waylosing
cassininazir
0
280
We Are The Robots
honzajavorek
0
200
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.2k
Crafting Experiences
bethany
1
94
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
1
160
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
330
sira's awesome portfolio website redesign presentation
elsirapls
0
200
Unsuck your backbone
ammeep
672
58k
Fireside Chat
paigeccino
42
3.9k
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
64
54k
Transcript
Gulp-internal
[email protected]
Gulp • A build system based on stream
sample • gulpfile.js: var gulp = require(‘gulp’) gulp.src(‘lib/**/*.js’) .pipe(concat()) .pipe(rename(‘concat.js’))
.pipe(gulp.dest(‘build’)) • run: gulp
feature • No temporary file • virtual memory file content
transfer • Full stream support • stream. Readable • stream. Writable • stream. Transform • through2
gulp • global cli • local lib • plugins/streams
cli • Depends • liftoff Change cwd require gulpfile require
gulp .start
through2 • Easy to create stream.Transform and compatible with 0.8-
• through2(option, function transform(chunk,encoding,callback){},function flush(){}) • === • var stream = new MyTransform(option); // extends stream.Transform stream._transform = transform; stream._flush = flush; return stream;
Local lib • Api • Gulp.src • Gulp.dest • Gulp.task
• * Gulp.watch • Depends • vinyl • vinyl-fs • orchestrator
vinyl • Virtual file representation • { content: buffer/stream path:
}
Gulp.src • === require(‘vinyl-fs’).src • return stream.Transform({object:true}) • Emit Stream
of vinyl file
Gulp.dest • === require(‘vinyl-fs’).dest • return stream.Transform({object:true}) • Save file
and Emit Stream of saved vinyl file
Orchestrator • A module for sequencing and executing tasks and
dependencies in maximum concurrency • Gulp.task(name, deps, function(){}) • KISSY.add(name,deps,function(){}) • ‘default’
Task end condition • Promise resolved • Callback called •
Stream end • Task(‘x’,function(callback){ • Return promise or stream • Or • Callback() • });
plugins • Return stream.Transform • Operate on vinyl file •
Example • Gulp-concat • Gulp-uglify • Gulp-modulex
• gulp.src(‘./gulp-internal’).pipe(audience()).pipe(thanks())