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
500
Frontend Testing
sebdeckers
3
350
Other Decks in Programming
See All in Programming
Functional Calisthenics in Kotlin: Kotlinで「関数型エクササイズ」を実践しよう
lagenorhynque
0
110
チーム開発の “地ならし"
konifar
1
240
「10分以内に機能を消せる状態」 の実現のためにやっていること
togishima
1
260
Inside of Swift Export
giginet
PRO
1
530
なんでRustの環境構築してないのにRust製のツールが動くの? / Why Do Rust-Based Tools Run Without a Rust Environment?
ssssota
15
48k
Kotlinで実装するCPU/GPU 「協調的」パフォーマンス管理
matuyuhi
0
350
AI駆動開発カンファレンスAutumn2025 _AI駆動開発にはAI駆動品質保証
autifyhq
0
150
PHPライセンス変更の議論を通じて学ぶOSSライセンスの基礎
matsuo_atsushi
0
140
Honoを技術選定したAI要件定義プラットフォームAcsimでの意思決定
codenote
0
110
自動テストを活かすためのテスト分析・テスト設計の進め方/JaSST25 Shikoku
goyoki
1
530
What's New in Web AI?
christianliebel
PRO
0
120
Flutterアプリ運用の現場で役立った監視Tips 5選
ostk0069
1
290
Featured
See All Featured
Measuring & Analyzing Core Web Vitals
bluesmoon
9
660
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Build your cross-platform service in a week with App Engine
jlugia
234
18k
We Have a Design System, Now What?
morganepeng
54
7.9k
Designing for humans not robots
tammielis
254
26k
Optimising Largest Contentful Paint
csswizardry
37
3.5k
Art, The Web, and Tiny UX
lynnandtonic
303
21k
Six Lessons from altMBA
skipperchong
29
4.1k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
46
7.8k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
34
2.3k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
1.7k
A Tale of Four Properties
chriscoyier
161
23k
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