Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Introduction to gruntjs
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Sam Mason
September 24, 2013
Technology
280
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Introduction to gruntjs
A short talk given at Untangle the web on 24/09/2013 @ Skills Matter Exchange
Sam Mason
September 24, 2013
More Decks by Sam Mason
See All by Sam Mason
Working with Gulp, Neat & Bourbon
samjbmason
0
1.2k
Git & Github 101
samjbmason
5
220
First steps in the web - Wordpress as a CMS
samjbmason
2
120
Other Decks in Technology
See All in Technology
現場を動かすAIエージェント#2_製造業現場でのAI活用から見た、ハマる罠と実践知
kintotechdev
2
180
eBPF 簡介 2026 版
shunghsiyu
0
190
bpf_arenaとstruct_opsを使うのが難しかった話
masu_mi
0
210
公共システムAdventCalendar2026
toru_kubota
0
270
TSKaigi Sendai 2026 - tsgo時代のTypeScript Playgroundはどう動くか
teamlab
PRO
0
110
サボる子はいねぇがー!AgentCoreハーネスの脆弱性に学ぶ、エージェントの入力バリデーション
iwamot
PRO
5
290
Content Mapper APIの応用例~CSS Modules、言語ファイル~
uhyo
2
620
あなたのDartコードは丸見えかもしれない ~reFlutterで暴くFlutterアプリの中身と多層防御~
zozotech
PRO
0
780
デザインレビューは自動化できるのか?─ Flutter × Figma で UI 品質保証を考える
techiro
2
800
企画からFlutter実装まで、1つの機能を一貫して開発したプロセスと成果物
khiroyuki1003
1
160
令和の今、あらためて IAM を考える。アクセスキーを「無くせない現実」との向き合い方
kazzpapa3
0
330
HQ駆動開発で最高のAI-Contextを作ろう
sansantech
PRO
1
110
Featured
See All Featured
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
450
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
970
Fireside Chat
paigeccino
43
4.1k
Scaling GitHub
holman
464
140k
Bootstrapping a Software Product
garrettdimon
PRO
306
120k
Fantastic passwords and where to find them - at NoRuKo
philnash
53
4k
Why Our Code Smells
bkeepers
PRO
340
58k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
6
1.3k
Deep Space Network (abreviated)
tonyrice
0
410
Building AI with AI
inesmontani
PRO
1
1.4k
Claude Code のすすめ
schroneko
67
230k
A better future with KSS
kneath
240
18k
Transcript
Intro to grunt
Hi I’m Sam Mason, a Developer at Benchmark @samjbmason http:/
/mason.io
Intro to grunt
What is grunt? Not this This
Runs all the tasks grunt.initConfig({ Buy Presents: { for girlfriend:
{ Price: >£100 }, for sister: { Price: <£10 } } });
grunt loves git The configuration is just a javascript file
so it can be added to git and shared
install node Go to http://nodejs.org/ Install the correct package. Fin!
install grunt-cli `npm install -g grunt-cli` In the terminal, type
To actually install grunt part 1 package.json In your project
folder, create Gruntfile.js &
To actually install grunt part 2 package.json { "name": "my-project-name",
"version": "1.0.0" } Then run in terminal npm install grunt --save-dev
grunt is installed in your project package.json { "name": "your-project",
"version": "1.0.0", "devDependencies": { "grunt": "~0.4.1" } }
install the grunt-contrib plugin Terminal npm install grunt-contrib --save-dev
grunt is installed in your project package.json { "name": "your-project",
"version": "1.0.0", "devDependencies": { "grunt": "~0.4.1", "grunt-contrib": "~0.7.0" } }
the gruntfile - wrapper function Gruntfile.js module.exports = function(grunt) {
// All your code goes in between here };
the gruntfile - load plugin Gruntfile.js module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib'); };
the gruntfile - configuration wrapper Gruntfile.js grunt.initConfig({ // All your
configuration goes in here });
the gruntfile - configuration wrapper Gruntfile.js grunt.initConfig({ sass: { dist:
{ options: { style: 'compressed' }, files: { 'css/main.css': 'css/main.scss' } } } });
the gruntfile - register tasks Gruntfile.js grunt.registerTask('default', ['sass']);
Setting up multiple tasks Gruntfile.js grunt.registerTask('default', ['sass']); grunt.registerTask('prod', ['sass','uglify']);
the gruntfile Gruntfile.js module.exports = function(grunt) { grunt.initConfig({ sass: {
dist: { options: { style: 'compressed' }, files: { 'css/main.css': 'css/main.scss' } } } }); grunt.loadNpmTasks('grunt-contrib'); grunt.registerTask('default', ['sass']); }
the gruntfile - configuration wrapper Gruntfile.js grunt.initConfig({ uglify: { my_target:
{ files: { 'js/main.min.js': ['js/main.js'] } } } });
Run the task Terminal - from your project folder grunt
Thanks for listening @samjbmason http:/ /mason.io