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
Grunt: The JavaScript Task Runner
Search
Sebastiaan Deckers
February 25, 2013
Programming
8
410
Grunt: The JavaScript Task Runner
Slides for my talk at Front-end Developers User Group (Singapore)
Sebastiaan Deckers
February 25, 2013
Tweet
Share
More Decks by Sebastiaan Deckers
See All by Sebastiaan Deckers
Commons Host: Building a CDN for the rest of the world
sebdeckers
1
140
SVG Reality
sebdeckers
5
140
About Sebastiaan
sebdeckers
0
150
Frontend 100
sebdeckers
1
490
Frontend 101
sebdeckers
4
550
Frontend 102
sebdeckers
3
490
Frontend 103
sebdeckers
2
490
Frontend Testing
sebdeckers
3
340
Other Decks in Programming
See All in Programming
イベントストーミングから始めるドメイン駆動設計
jgeem
4
870
F#で自在につくる静的ブログサイト - 関数型まつり2025
pizzacat83
0
310
都市をデータで見るってこういうこと PLATEAU属性情報入門
nokonoko1203
1
550
Benchmark
sysong
0
230
ドメインモデリングにおける抽象の役割、tagless-finalによるDSL構築、そして型安全な最適化
knih
11
2k
「Cursor/Devin全社導入の理想と現実」のその後
saitoryc
0
110
なぜ適用するか、移行して理解するClean Architecture 〜構造を超えて設計を継承する〜 / Why Apply, Migrate and Understand Clean Architecture - Inherit Design Beyond Structure
seike460
PRO
1
290
エンジニア向け採用ピッチ資料
inusan
0
140
Perplexity Slack Botを作ってAI活用を進めた話 / AI Engineering Summit プレイベント
n3xem
0
670
社内での開発コミュニティ活動とモジュラーモノリス標準化事例のご紹介/xPalette and Introduction of Modular monolith standardization
m4maruyama
1
130
deno-redisの紹介とJSRパッケージの運用について (toranoana.deno #21)
uki00a
0
130
Julia という言語について (FP in Julia « SIDE: F ») for 関数型まつり2025
antimon2
3
970
Featured
See All Featured
Navigating Team Friction
lara
187
15k
Mobile First: as difficult as doing things right
swwweet
223
9.7k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.4k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
48
2.8k
Practical Orchestrator
shlominoach
188
11k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
45
7.4k
We Have a Design System, Now What?
morganepeng
52
7.6k
jQuery: Nuts, Bolts and Bling
dougneiner
63
7.8k
Music & Morning Musume
bryan
46
6.6k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
30
2.1k
BBQ
matthewcrist
89
9.7k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
281
13k
Transcript
The JavaScript Task Runner
What is Grunt? Grunt is like Ant, Make, Rake, SCons,
etc. but, Javascript. NPM.
build script
Automate your build So you can: ... do continuous integration,
... release to production without fear, ... work on more interesting things.
Is Grunt for me? frontend backend mixed Backbone, Ember, Angular
REST/WebSocket API Express.js
Grunt Plugins grunt-contrib: 26 and growing Community: 450+
None
Using Grunt 1. Create package.json 2. Gruntfile.js 3. Run npm
install 4. grunt [task[:target]]
package.json { "name": "hello-world", "version": "0.1.0", "dependencies": { "grunt": "~0.4.0",
"grunt-contrib-jshint": "~0.1.1", "grunt-contrib-uglify": "~0.1.1" } }
Gruntfile.js module.exports = function (grunt) { grunt.initConfig({ uglify: { build:
{ src: 'app.js', dest: 'build/app.min.js' } }, jshint: { all: ['**/*.js'] } }); grunt.loadNpmTasks('grunt-contrib-uglify'); grunt.loadNpmTasks('grunt-contrib-jshint'); grunt.registerTask('default', ['jshint', 'uglify']); };
Have it your way Declarative Imperative
Demo
Poor Man's CI $ sudo -i # crontab -e */5
* * * * cd /var/www/myapp.com && git reset --hard && git pull origin master && npm install && npm test && grunt
I am Sebastiaan I email
[email protected]
I blog ninja.sg I
work cf.sg I code git.io/seb