Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
gulp-internal
Search
yiminghe
August 22, 2014
Technology
2
5.3k
gulp-internal
implementation about gulp
yiminghe
August 22, 2014
Tweet
Share
More Decks by yiminghe
See All by yiminghe
小程序终端技术架构
yiminghe
0
240
支付宝小程序的开放架构
yiminghe
0
190
gitc2016 react based architecture
yiminghe
1
170
antd at qcon2016
yiminghe
1
230
react-based architecture
yiminghe
2
160
React Ecosystem At Ant Financial
yiminghe
4
2.3k
ant design preview
yiminghe
1
310
react best practice
yiminghe
3
220
react at alipay
yiminghe
43
4.4k
Other Decks in Technology
See All in Technology
Entity Framework Core におけるIN句クエリ最適化について
htkym
0
120
AWS運用を効率化する!AWS Organizationsを軸にした一元管理の実践/nikkei-tech-talk-202512
nikkei_engineer_recruiting
0
170
20251222_サンフランシスコサバイバル術
ponponmikankan
2
140
re:Invent2025 3つの Frontier Agents を紹介 / introducing-3-frontier-agents
tomoki10
0
400
シニアソフトウェアエンジニアになるためには
kworkdev
PRO
3
270
アプリにAIを正しく組み込むための アーキテクチャ── 国産LLMの現実と実践
kohju
0
210
AI時代のワークフロー設計〜Durable Functions / Step Functions / Strands Agents を添えて〜
yakumo
3
2.1k
ActiveJobUpdates
igaiga
1
310
Strands Agents × インタリーブ思考 で変わるAIエージェント設計 / Strands Agents x Interleaved Thinking AI Agents
takanorig
4
2k
Next.js 16の新機能 Cache Components について
sutetotanuki
0
170
Oracle Database@AWS:サービス概要のご紹介
oracle4engineer
PRO
1
400
ハッカソンから社内プロダクトへ AIエージェント ko☆shi 開発で学んだ4つの重要要素
leveragestech
0
110
Featured
See All Featured
How to Ace a Technical Interview
jacobian
281
24k
The Limits of Empathy - UXLibs8
cassininazir
1
190
Darren the Foodie - Storyboard
khoart
PRO
0
1.9k
The Cult of Friendly URLs
andyhume
79
6.7k
Product Roadmaps are Hard
iamctodd
PRO
55
12k
Prompt Engineering for Job Search
mfonobong
0
120
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
0
94
Claude Code のすすめ
schroneko
65
200k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
9.8k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
0
130
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
0
300
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
10
750
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())