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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Sebastiaan Deckers
February 25, 2013
Programming
430
8
Share
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
170
About Sebastiaan
sebdeckers
0
170
Frontend 100
sebdeckers
1
520
Frontend 101
sebdeckers
4
570
Frontend 102
sebdeckers
3
520
Frontend 103
sebdeckers
2
520
Frontend Testing
sebdeckers
3
360
Other Decks in Programming
See All in Programming
AI 時代のソフトウェア設計の学び方
masuda220
PRO
28
11k
Moments When Things Go Wrong
aurimas
3
120
運用エージェントは "作る" から "育てる" へ - 記憶と自己進化の3層設計パターン / self-evolving-agents-three-layer-agent-design
gawa
12
3.2k
脅威をエンジニアリングの糧にして――現場編 / Turning Threats into Engineering Fuel — Field Edition
nrslib
0
210
~ 秘伝のタレ化した『神スプシ』と戦う ~ 関数型パラダイムで壊れない仕組みへ
h0r15h0
1
140
Swiftのレキシカルスコープ管理
kntkymt
0
200
Oxcを導入して開発体験が向上した話
yug1224
4
250
さぁV100、メモリをお食べ・・・
nilpe
0
110
AIチームを指揮するOSS「TAKT」活用術 / How to Use “TAKT,” an OSS Tool for Orchestrating AI Teams
nrslib
6
740
要はバランスからの卒業 #yumemi_grow
kajitack
0
200
inferと仲良くなる10分間
ryokatsuse
1
270
ユニットテストの先へ:テスト技法で要求・仕様を整理するJava開発実践 / Beyond_Unit_Testing_Practical_Java_Development_Techniques_for_Organizing_Requirements_and_Specifications
shimashima35
0
290
Featured
See All Featured
Test your architecture with Archunit
thirion
1
2.3k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
160
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
710
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.5k
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
1
2k
Mind Mapping
helmedeiros
PRO
1
210
What's in a price? How to price your products and services
michaelherold
247
13k
Information Architects: The Missing Link in Design Systems
soysaucechin
0
940
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
120
sira's awesome portfolio website redesign presentation
elsirapls
0
260
Believing is Seeing
oripsolob
1
130
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
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