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
350
Other Decks in Programming
See All in Programming
『毎日の移動』を支えるGoバックエンド内製開発
yutautsugi
2
210
2分台で1500examples完走!爆速CIを支える環境構築術 - Kaigi on Rails 2025
falcon8823
3
3.4k
uniqueパッケージの内部実装を支えるweak pointerの話
magavel
0
940
Goで実践するドメイン駆動開発 AIと歩み始めた新規プロダクト開発の現在地
imkaoru
4
760
CSC305 Lecture 03
javiergs
PRO
0
240
iOSエンジニア向けの英語学習アプリを作る!
yukawashouhei
0
180
あなたの知らない「動画広告」の世界 - iOSDC Japan 2025
ukitaka
0
430
Pull-Requestの内容を1クリックで動作確認可能にするワークフロー
natmark
2
480
私はどうやって技術力を上げたのか
yusukebe
43
18k
アメ車でサンノゼを走ってきたよ!
s_shimotori
0
200
CSC305 Lecture 06
javiergs
PRO
0
210
複雑化したリポジトリをなんとかした話 pipenvからuvによるモノレポ構成への移行
satoshi256kbyte
1
850
Featured
See All Featured
Docker and Python
trallard
46
3.6k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
114
20k
Navigating Team Friction
lara
189
15k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
15k
Reflections from 52 weeks, 52 projects
jeffersonlam
352
21k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
189
55k
Producing Creativity
orderedlist
PRO
347
40k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
16k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.6k
Learning to Love Humans: Emotional Interface Design
aarron
274
40k
4 Signs Your Business is Dying
shpigford
185
22k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
140
34k
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