Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
gulp-internal
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
yiminghe
August 22, 2014
Technology
5.5k
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
gulp-internal
implementation about gulp
yiminghe
August 22, 2014
More Decks by yiminghe
See All by yiminghe
小程序终端技术架构
yiminghe
0
330
支付宝小程序的开放架构
yiminghe
0
260
gitc2016 react based architecture
yiminghe
1
190
antd at qcon2016
yiminghe
1
260
react-based architecture
yiminghe
2
200
React Ecosystem At Ant Financial
yiminghe
4
2.3k
ant design preview
yiminghe
1
360
react best practice
yiminghe
3
250
react at alipay
yiminghe
43
4.6k
Other Decks in Technology
See All in Technology
トークン化預金DCJPYの取り組みと活用ユースケース
finengine
0
190
[JAWS-UG彩の国埼玉#12]そろそろ準備する?re:Invent2026をやさしく解説 / reinvent2026-sainokuni
sh_fk2
1
360
QA4AI 2026-Oct 生成AI時代の品質保証
tokuty
1
900
サブエージェントと Claude Mods で作る独自 Advisor ツールの話
kenichiodo
2
170
日本語に強いオープンな大規模言語モデル「LLM-jp」
odashi
5
1.2k
Browser Spec: Testing Hotwire with Ruby
takahashim
1
130
データエンジニアの次の戦場は "プロセスエンジニアリング"
sansantech
PRO
1
120
パスキーの自動テストはどこまでいけるのか
teamlab
PRO
0
300
会社紹介資料 / Sansan Company Profile
sansan33
PRO
31
430k
Benchmarking Disaggregated Serving on vLLM + Dynamo with a Real Coding-Agent Workload
nttcom
1
200
Rustuna: Rustによる高速なOptuna実装
pfn
PRO
0
200
20261017福岡devIO 「AIは"良いダッシュボード"を作れるか?
jtakeda
0
200
Featured
See All Featured
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
570
The Cost Of JavaScript in 2023
addyosmani
55
10k
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.6k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.4k
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.5k
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
640
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
480
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
570
brightonSEO & MeasureFest 2025 - Winning Strategies for Black Friday CRO & PPC - Christian Goodrich
cargoodrich
3
870
Color Theory Basics | Prateek | Gurzu
gurzu
1
490
Ethics towards AI in product and experience design
skipperchong
2
440
Ten Tips & Tricks for a 🌱 transition
stuffmc
1
270
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())