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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Sebastiaan Deckers
February 25, 2013
Programming
430
8
Share
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
170
About Sebastiaan
sebdeckers
0
170
Frontend 100
sebdeckers
1
520
Frontend 101
sebdeckers
4
570
Frontend 102
sebdeckers
3
520
Frontend 103
sebdeckers
2
520
Frontend Testing
sebdeckers
3
360
Other Decks in Programming
See All in Programming
新規プロダクトを高速で生み出すハーネスエンジニアリング
seanchas116
15
7.3k
運用エージェントは "作る" から "育てる" へ - 記憶と自己進化の3層設計パターン / self-evolving-agents-three-layer-agent-design
gawa
12
3.2k
関係性から理解する"同一性"の型用語たち
pvcresin
2
610
脅威をエンジニアリングの糧にして――現場編 / Turning Threats into Engineering Fuel — Field Edition
nrslib
0
210
Technical Debt: Understanding it Rightly, Engaging it Rightly #LaravelLiveJP
shogogg
0
170
AIエージェントと協働するCLI開発 — BunとOpenClawで学んだこと
yoshikouki
1
220
GitHub Copilot CLIのいいところ
htkym
2
1.2k
Old Dog, New Tricks: The Java 25 Reinvention - JNation
bazlur_rahman
0
130
ECR拡張スキャンでSBOMを収集して サプライチェーン攻撃の影響調査を 爆速で終わらせてみた
akihisaikeda
2
210
CSC307 Lecture 17
javiergs
PRO
0
260
開発体験を左右するライブラリの API 設計 - GraphQL スキーマ構築ライブラリから考える #tskaigi
izumin5210
2
1.3k
柔軟なPDFレイアウトエディタを支える型システム設計 — Discriminated UnionとConditional Typeの実践
minako__ph
4
1.2k
Featured
See All Featured
The #1 spot is gone: here's how to win anyway
tamaranovitovic
2
1.1k
Designing Experiences People Love
moore
143
24k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
180
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
160
Ruling the World: When Life Gets Gamed
codingconduct
0
240
WCS-LA-2024
lcolladotor
0
610
How GitHub (no longer) Works
holman
316
150k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
820
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
460
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9.1k
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
140
The SEO identity crisis: Don't let AI make you average
varn
0
480
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