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
400
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
130
SVG Reality
sebdeckers
5
140
About Sebastiaan
sebdeckers
0
140
Frontend 100
sebdeckers
1
480
Frontend 101
sebdeckers
4
540
Frontend 102
sebdeckers
3
490
Frontend 103
sebdeckers
2
480
Frontend Testing
sebdeckers
3
330
Other Decks in Programming
See All in Programming
offers_20241022_imakiire.pdf
imakurusu
2
370
Why Spring Matters to Jakarta EE - and Vice Versa
ivargrimstad
0
1.3k
From Subtype Polymorphism To Typeclass-based Ad hoc Polymorphism- An Example
philipschwarz
PRO
0
180
Dev ContainersとGitHub Codespacesの素敵な関係
ymd65536
1
140
Vue.js学習の振り返り
hiro_xre
2
140
Ethereum_.pdf
nekomatu
0
130
Tauriでネイティブアプリを作りたい
tsucchinoko
0
220
CPython 인터프리터 구조 파헤치기 - PyCon Korea 24
kennethanceyer
0
250
CSC509 Lecture 09
javiergs
PRO
0
130
外部システム連携先が10を超えるシステムでのアーキテクチャ設計・実装事例
kiwasaki
1
240
Kubernetes for Data Engineers: Building Scalable, Reliable Data Pipelines
sucitw
1
210
PLoP 2024: The evolution of the microservice architecture pattern language
cer
PRO
0
2k
Featured
See All Featured
Product Roadmaps are Hard
iamctodd
PRO
48
10k
Writing Fast Ruby
sferik
626
61k
Scaling GitHub
holman
458
140k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
46
2.1k
Put a Button on it: Removing Barriers to Going Fast.
kastner
59
3.5k
GitHub's CSS Performance
jonrohan
1030
460k
Designing Experiences People Love
moore
138
23k
5 minutes of I Can Smell Your CMS
philhawksworth
202
19k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
108
49k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
10
690
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
25
1.8k
Git: the NoSQL Database
bkeepers
PRO
427
64k
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