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
150
About Sebastiaan
sebdeckers
0
150
Frontend 100
sebdeckers
1
500
Frontend 101
sebdeckers
4
550
Frontend 102
sebdeckers
3
500
Frontend 103
sebdeckers
2
490
Frontend Testing
sebdeckers
3
340
Other Decks in Programming
See All in Programming
Startups on Rails in Past, Present and Future–Irina Nazarova, RailsConf 2025
irinanazarova
0
210
Azure AI Foundryではじめてのマルチエージェントワークフロー
seosoft
0
200
AIともっと楽するE2Eテスト
myohei
8
2.9k
#kanrk08 / 公開版 PicoRubyとマイコンでの自作トレーニング計測装置を用いたワークアウトの理想と現実
bash0c7
1
910
チームで開発し事業を加速するための"良い"設計の考え方 @ サポーターズCoLab 2025-07-08
agatan
1
460
20250704_教育事業におけるアジャイルなデータ基盤構築
hanon52_
5
920
はじめてのWeb API体験 ー 飲食店検索アプリを作ろうー
akinko_0915
0
140
LT 2025-06-30: プロダクトエンジニアの役割
yamamotok
0
830
NEWT Backend Evolution
xpromx
1
120
なぜ「共通化」を考え、失敗を繰り返すのか
rinchoku
1
670
チームのテスト力を総合的に鍛えて品質、スピード、レジリエンスを共立させる/Testing approach that improves quality, speed, and resilience
goyoki
5
1.1k
MCPを使ってイベントソーシングのAIコーディングを効率化する / Streamlining Event Sourcing AI Coding with MCP
tomohisa
0
160
Featured
See All Featured
Docker and Python
trallard
45
3.5k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
8
830
VelocityConf: Rendering Performance Case Studies
addyosmani
332
24k
Statistics for Hackers
jakevdp
799
220k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
10
970
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
32
2.4k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.7k
What's in a price? How to price your products and services
michaelherold
246
12k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
30
2.1k
It's Worth the Effort
3n
185
28k
Designing for humans not robots
tammielis
253
25k
Agile that works and the tools we love
rasmusluckow
329
21k
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 seb@cf.sg I blog ninja.sg I
work cf.sg I code git.io/seb