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
530
Frontend Testing
sebdeckers
3
370
Other Decks in Programming
See All in Programming
ソフトウェア設計に溶けるインフラ ― AWS CDK のインフラ認識論
konokenj
3
770
PostgreSQL 18で考えるUUID主キー
kazuhiro1982
0
460
霧の中の代数的エフェクト
funnyycat
1
490
生成AI導入の「期待外れ」を乗り越える ー 開発フロー改革が目指す、真の組織変革
starfish719
0
4.1k
数百円から始めるRuby電子工作
tarosay
0
140
自動化したのに回らないテスト運用の壁ーAI時代の品質責任と生産性
mfunaki
0
130
5分で問診!Composer セキュリティ健康診断
codmoninc
0
910
為什麼你並不需要ViewModel / No, you don't need a ViewModel
lovee
1
480
わからない話を追いかけたら、プログラミング言語を作る側にいた
ydah
3
480
PHP Application における Kubernetes 内 gRPC 通信
ganchiku
0
590
<title><a id="</title>君はこのHTMLをパースできるか"></a></title> #雑LT_study
pizzacat83
0
140
JAWS-UG横浜 #102 AWSサ終供養LT会 成仏できない AWS サービスたち 〜本日、三体供養します〜
maroon1st
0
340
Featured
See All Featured
Utilizing Notion as your number one productivity tool
mfonobong
4
520
Into the Great Unknown - MozCon
thekraken
41
2.7k
エンジニアに許された特別な時間の終わり
watany
108
250k
The SEO identity crisis: Don't let AI make you average
varn
0
530
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
200
A designer walks into a library…
pauljervisheath
211
24k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
690
WENDY [Excerpt]
tessaabrams
11
39k
Discover your Explorer Soul
emna__ayadi
2
1.2k
How to Talk to Developers About Accessibility
jct
2
490
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
160
How to Think Like a Performance Engineer
csswizardry
28
2.7k
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