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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Sebastiaan Deckers
February 25, 2013
Programming
8
420
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
160
Frontend 100
sebdeckers
1
510
Frontend 101
sebdeckers
4
560
Frontend 102
sebdeckers
3
510
Frontend 103
sebdeckers
2
510
Frontend Testing
sebdeckers
3
350
Other Decks in Programming
See All in Programming
Smart Handoff/Pickup ガイド - Claude Code セッション管理
yukiigarashi
0
130
登壇資料を作る時に意識していること #登壇資料_findy
konifar
4
1k
「ブロックテーマでは再現できない」は本当か?
inc2734
0
770
FOSDEM 2026: STUNMESH-go: Building P2P WireGuard Mesh Without Self-Hosted Infrastructure
tjjh89017
0
150
組織で育むオブザーバビリティ
ryota_hnk
0
170
CSC307 Lecture 06
javiergs
PRO
0
680
dchart: charts from deck markup
ajstarks
3
990
コントリビューターによるDenoのすゝめ / Deno Recommendations by a Contributor
petamoriken
0
200
今から始めるClaude Code超入門
448jp
8
8.5k
AI & Enginnering
codelynx
0
110
カスタマーサクセス業務を変革したヘルススコアの実現と学び
_hummer0724
0
650
React 19でつくる「気持ちいいUI」- 楽観的UIのすすめ
himorishige
11
6k
Featured
See All Featured
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
60
42k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
3.9k
From π to Pie charts
rasagy
0
120
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
9.9k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
120
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
250
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
Believing is Seeing
oripsolob
1
53
エンジニアに許された特別な時間の終わり
watany
106
230k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
1
300
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
62
Building a Modern Day E-commerce SEO Strategy
aleyda
45
8.6k
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