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
420
8
Share
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
150
SVG Reality
sebdeckers
5
170
About Sebastiaan
sebdeckers
0
170
Frontend 100
sebdeckers
1
520
Frontend 101
sebdeckers
4
570
Frontend 102
sebdeckers
3
520
Frontend 103
sebdeckers
2
510
Frontend Testing
sebdeckers
3
360
Other Decks in Programming
See All in Programming
運転動画を検索可能にする〜Cosmos-Embed1とDatabricks Vector Searchで〜/cosmos-embed1-databricks-vector-search
studio_graph
1
650
第3木曜LT会 #28
tinykitten
PRO
0
120
JAWS-UG横浜 #100 祝・第100回スペシャルAWS は VPC レスの時代へ
maroon1st
0
210
Vibe NLP for Applied NLP
inesmontani
PRO
0
600
20260514 - build with ai 2026 - build LINE Bot with Gemini CLI
line_developers_tw
PRO
0
180
[RubyKaigi 2026] Require Hooks
palkan
1
290
エラー処理の温故知新 / history of error handling technic
ryotanakaya
7
1.8k
クラウドネイティブなエンジニアに向ける Raycastの魅力と実際の活用事例
nealle
2
240
PicoRuby for IoT: Connecting to the Cloud with MQTT
yuuu
2
750
「話せることがない」を乗り越える 〜日常業務から登壇テーマをつくる思考法〜
shoheimitani
4
970
Claude CodeでETLジョブ実行テストを自動化してみた
yoshikikasama
0
1.1k
Building on Bluesky's AT Protocol with Ruby
mackuba
0
100
Featured
See All Featured
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.6k
How GitHub (no longer) Works
holman
316
150k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
320
Code Reviewing Like a Champion
maltzj
528
40k
The Limits of Empathy - UXLibs8
cassininazir
1
320
For a Future-Friendly Web
brad_frost
183
10k
Side Projects
sachag
455
43k
The World Runs on Bad Software
bkeepers
PRO
72
12k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
The Cost Of JavaScript in 2023
addyosmani
55
9.9k
Agile that works and the tools we love
rasmusluckow
331
21k
A Soul's Torment
seathinner
6
2.8k
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