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
400
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
130
SVG Reality
sebdeckers
5
140
About Sebastiaan
sebdeckers
0
150
Frontend 100
sebdeckers
1
490
Frontend 101
sebdeckers
4
550
Frontend 102
sebdeckers
3
490
Frontend 103
sebdeckers
2
490
Frontend Testing
sebdeckers
3
340
Other Decks in Programming
See All in Programming
Strategic Design (DDD)for the Frontend @DDD Meetup Stuttgart
manfredsteyer
PRO
0
170
Building a macOS screen saver with Kotlin (Android Makers 2025)
zsmb
1
160
趣味全開のAITuber開発
kokushin
0
200
Enterprise Web App. Development (1): Build Tool Training Ver. 5
knakagawa
1
120
KANNA Android の技術的課題と取り組み
watabee
0
110
ASP.NETアプリケーションのモダナイゼーションについて
tomokusaba
0
120
Make Parsers Compatible Using Automata Learning
makenowjust
2
5.4k
note の Elasticsearch 更新系を支える技術
tchov
0
150
小田原でみんなで一句詠みたいな #phpcon_odawara
stefafafan
0
350
監視 やばい
syossan27
11
10k
Cursor/Devin全社導入の理想と現実
saitoryc
23
17k
Vibe Codingをせずに Clineを使っている
watany
17
6.3k
Featured
See All Featured
Bash Introduction
62gerente
611
210k
Documentation Writing (for coders)
carmenintech
69
4.7k
Making Projects Easy
brettharned
116
6.1k
Rebuilding a faster, lazier Slack
samanthasiow
80
8.9k
Why Our Code Smells
bkeepers
PRO
336
57k
Building Applications with DynamoDB
mza
94
6.3k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.2k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
The Power of CSS Pseudo Elements
geoffreycrofte
75
5.8k
Measuring & Analyzing Core Web Vitals
bluesmoon
7
400
How GitHub (no longer) Works
holman
314
140k
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