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
520
Frontend Testing
sebdeckers
3
370
Other Decks in Programming
See All in Programming
SLOをサービス品質の共通言語にするために 取り組んできたこと
wakana0222
0
460
act1-costs.pdf
sumedhbala
0
210
ECSアプリログをFireLensでコスト削減しようとしたけど諦めた話 in Fargate×Node.js
akihisaikeda
2
4.2k
共通化で考えるべきは、実装より公開する型だった
codeegg
0
190
The Bowling Game- From Imperative to Functional Programming - Part 1
philipschwarz
PRO
0
300
地域 SRE コミュニティ最前線 - ホンマでっかSRE勉強会
tk3fftk
0
220
アルゴリズムは何を圧縮しているのか ─ Haskell から育った「圧縮代数」というメンタルモデル
naoya
15
3.2k
SREは、MCPとSRE Agentをこう使え!
kazumax55
0
150
スマートグラスで並列バイブコーディング
hyshu
0
290
TSKaigi Night Talks 2026_TypeScriptでサプライチェーンの整合性を型に閉じ込める
geekplus_tech
0
440
「正の参照」と 「負の導出」で組む ハーネスエンジニアリング
cottpan
1
130
エンジニアにデザインハーネスを 〜デザインプロセスを規定するためのハーネス〜 / Design harness from an engineer's perspective
rkaga
2
1.3k
Featured
See All Featured
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
370
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
190
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
760
Become a Pro
speakerdeck
PRO
31
6k
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.3k
Build your cross-platform service in a week with App Engine
jlugia
234
18k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
410
30 Presentation Tips
portentint
PRO
1
350
Crafting Experiences
bethany
1
210
Code Reviewing Like a Champion
maltzj
528
40k
Technical Leadership for Architectural Decision Making
baasie
3
440
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
2.9k
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