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
150
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
JAWS-UG横浜 #102 AWSサ終供養LT会 成仏できない AWS サービスたち 〜本日、三体供養します〜
maroon1st
0
300
メールのエイリアス機能を履き違えない
isshinfunada
0
210
ソフトウェア設計に溶けるインフラ ― AWS CDK のインフラ認識論
konokenj
3
740
「人を評価する AI」の設計と実装
ryoyanara
0
120
php-fpmのプロセスが枯渇した日-調査・対処・そして本当にやるべきだったこと-
shibuchaaaan
0
200
SREの積み重ねがAI駆動開発のガードレールになった ― 7つの実践/SRE Guardrails The 7
tomoyakitaura
9
6.1k
「寝てても仕事が進む」Claude Codeで組む第二の脳
tomoyafujita2016
0
270
その節約、円になってますか?
isamumumu
1
670
AI時代に設計が 最大の生産性レバーになる 意図駆動開発とデータを消さない設計|Don't Delete Your Data or Your Intent — Design as the Deepest Lever in the AI Era
tomohisa
1
540
yield再入門 #phpcon
o0h
PRO
0
910
今さら聞けない .NET CLI
htkym
0
170
ここ半年くらいでAIに作らせたR用ツール
eitsupi
0
360
Featured
See All Featured
brightonSEO & MeasureFest 2025 - Christian Goodrich - Winning strategies for Black Friday CRO & PPC
cargoodrich
3
760
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.7k
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
420
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.7k
Game over? The fight for quality and originality in the time of robots
wayneb77
1
240
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.4k
Scaling GitHub
holman
464
140k
Odyssey Design
rkendrick25
PRO
2
740
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
430
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
380
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
2.9k
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
340
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