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
390
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
100
SVG Reality
sebdeckers
5
130
About Sebastiaan
sebdeckers
0
130
Frontend 100
sebdeckers
1
480
Frontend 101
sebdeckers
4
530
Frontend 102
sebdeckers
3
480
Frontend 103
sebdeckers
2
470
Frontend Testing
sebdeckers
3
330
Other Decks in Programming
See All in Programming
Kotlinを用いたDSL的な設計手法と使用上の注意
kohii00
3
540
もうすぐ新年度、Babylon.jsがお勧めな3個の理由
hideg
0
170
Learning PHP and Static Analysis with PHP Parser
inouehi
1
250
とにかくHTTP3をライトニングに話す / Anyway, I'll talk to Lightning about HTTP3.
seike460
PRO
0
120
RubyVM を PHP で実装する 〜Hello World を出力するまで〜
memory1994
PRO
1
490
Building a Smaller App Binary
kateinoigakukun
2
220
Crafting a Own PHP - ウキウキ手作りミニマリストPHP
uzulla
4
1.1k
Migrating to Signals: A Practical Workshop
manfredsteyer
PRO
0
290
今の SmartHR にエンジニアで入社するとどうなるの?
daisukeshinoku
3
2k
WasmOS: Wasmを実行する自作Microkernel
riru
0
380
自作ソフト(VMagicMirror)がVRMA対応してる話+実装のTips
bakudreameater
0
110
Introduction for Open Source Swift Workshop
giginet
PRO
0
290
Featured
See All Featured
Into the Great Unknown - MozCon
thekraken
10
830
How GitHub Uses GitHub to Build GitHub
holman
467
290k
Pencils Down: Stop Designing & Start Developing
hursman
115
11k
StorybookのUI Testing Handbookを読んだ
zakiyama
10
4.5k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
352
28k
The Straight Up "How To Draw Better" Workshop
denniskardys
227
130k
Optimising Largest Contentful Paint
csswizardry
7
2.3k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
8
8.2k
No one is an island. Learnings from fostering a developers community.
thoeni
14
2k
How To Stay Up To Date on Web Technology
chriscoyier
781
250k
Robots, Beer and Maslow
schacon
PRO
154
7.9k
How to name files
jennybc
62
92k
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