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
420
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
510
Frontend Testing
sebdeckers
3
350
Other Decks in Programming
See All in Programming
Kubernetesでセルフホストが簡単なNewSQLを求めて / Seeking a NewSQL Database That's Simple to Self-Host on Kubernetes
nnaka2992
0
170
米国のサイバーセキュリティタイムラインと見る Goの暗号パッケージの進化
tomtwinkle
2
620
ベクトル検索のフィルタを用いた機械学習モデルとの統合 / python-meetup-fukuoka-06-vector-attr
monochromegane
2
490
Understanding Apache Lucene - More than just full-text search
spinscale
0
130
Angular-Apps smarter machen mit Gen AI: Lokal und offlinefähig - Hands-on Workshop!
christianliebel
PRO
0
120
SourceGeneratorのマーカー属性問題について
htkym
0
200
Agentic AI: Evolution oder Revolution
mobilelarson
PRO
0
190
PHPのバージョンアップ時にも役立ったAST(2026年版)
matsuo_atsushi
0
190
ポーリング処理廃止によるイベント駆動アーキテクチャへの移行
seitarof
3
1.1k
Symfony + NelmioApiDocBundle を使った スキーマ駆動開発 / Schema Driven Development with NelmioApiDocBundle
okashoi
0
200
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
830
どんと来い、データベース信頼性エンジニアリング / Introduction to DBRE
nnaka2992
1
310
Featured
See All Featured
Navigating Team Friction
lara
192
16k
Documentation Writing (for coders)
carmenintech
77
5.3k
Skip the Path - Find Your Career Trail
mkilby
1
86
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
380
For a Future-Friendly Web
brad_frost
183
10k
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
64
52k
BBQ
matthewcrist
89
10k
Testing 201, or: Great Expectations
jmmastey
46
8.1k
Designing Experiences People Love
moore
143
24k
Git: the NoSQL Database
bkeepers
PRO
432
66k
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
320
Everyday Curiosity
cassininazir
0
170
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