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
430
8
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Grunt: The JavaScript Task Runner
Slides for my talk at Front-end Developers User Group (Singapore)
Sebastiaan Deckers
February 25, 2013
More Decks by Sebastiaan Deckers
See All by Sebastiaan Deckers
Commons Host: Building a CDN for the rest of the world
sebdeckers
1
160
SVG Reality
sebdeckers
5
180
About Sebastiaan
sebdeckers
0
170
Frontend 100
sebdeckers
1
530
Frontend 101
sebdeckers
4
570
Frontend 102
sebdeckers
3
530
Frontend 103
sebdeckers
2
530
Frontend Testing
sebdeckers
3
370
Other Decks in Programming
See All in Programming
AIと壁打ちしながら進めるコスト管理
fufuhu
2
1.8k
[PyCon KR 2026] More Variants, More Diversity for AI Accelerators
achimnol
0
120
「寝てても仕事が進む」Claude Codeで組む第二の脳
tomoyafujita2016
0
370
進化を続けるGo toolsの現在地 / The Current State of Ever-Evolving Go Tools
hond0413
0
270
Loosening the Reins: Go Generics Get More Flexible
kuro_kurorrr
0
350
生成AIで帳票OCRが「簡単に」作れる時代になった?
kon_shou
0
1.2k
ソフトウェアラスタライザ
fadis
1
730
片田舎のおっさん、 Swift Buildのダイアモンド問題解決の不具合修正PRを出すが、解決方法がキャッシュをしないようにすることであり、ビルド時間が伸びると言われてマージされないので高速化もする/swiftbuild
yimajo
0
320
React本体のコードリーディング
high_g_engineer
1
160
AI時代に学ぶ 好きなルール 嫌いなルール Linter編
shorty5121
0
200
仕様書を書く前にハーネスを作る - Agent Native開発は「探索を速く、判定を固く」
gotalab555
5
1.8k
承認済みなのに差戻しできてしまうバグ、型で潰せます
shinchit
0
120
Featured
See All Featured
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
260
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2.1k
Automating Front-end Workflow
addyosmani
1369
210k
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
220
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
480
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
220
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
56k
HDC tutorial
michielstock
2
820
A Tale of Four Properties
chriscoyier
163
24k
For a Future-Friendly Web
brad_frost
183
10k
Everyday Curiosity
cassininazir
0
300
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
260
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