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
160
Frontend 100
sebdeckers
1
510
Frontend 101
sebdeckers
4
560
Frontend 102
sebdeckers
3
510
Frontend 103
sebdeckers
2
500
Frontend Testing
sebdeckers
3
350
Other Decks in Programming
See All in Programming
チームをチームにするEM
hitode909
0
420
Context is King? 〜Verifiability時代とコンテキスト設計 / Beyond "Context is King"
rkaga
10
1.5k
AI 駆動開発ライフサイクル(AI-DLC):ソフトウェアエンジニアリングの再構築 / AI-DLC Introduction
kanamasa
11
4.6k
Navigation 3: 적응형 UI를 위한 앱 탐색
fornewid
1
510
Denoのセキュリティに関する仕組みの紹介 (toranoana.deno #23)
uki00a
0
200
Rubyで鍛える仕組み化プロヂュース力
muryoimpl
0
250
Grafana:建立系統全知視角的捷徑
blueswen
0
250
Jetpack XR SDKから紐解くAndroid XR開発と技術選定のヒント / about-androidxr-and-jetpack-xr-sdk
drumath2237
1
220
複雑なUI設計への銀の弾丸 「オブジェクト指向UIデザイン」
teamlab
PRO
2
110
Python札幌 LT資料
t3tra
7
1.1k
愛される翻訳の秘訣
kishikawakatsumi
3
360
JETLS.jl ─ A New Language Server for Julia
abap34
2
470
Featured
See All Featured
Speed Design
sergeychernyshev
33
1.4k
Into the Great Unknown - MozCon
thekraken
40
2.2k
Writing Fast Ruby
sferik
630
62k
Docker and Python
trallard
47
3.7k
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
0
1.8k
Unsuck your backbone
ammeep
671
58k
Abbi's Birthday
coloredviolet
0
4k
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
94
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.2k
Testing 201, or: Great Expectations
jmmastey
46
7.8k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
180
Google's AI Overviews - The New Search
badams
0
880
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