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
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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
LocalStack を使ったサーバーレスアプリケーション開発 / Serverless Development with LocalStack
kakakakakku
1
310
DevelopersIO 2026 知識の地図を描く ─ オントロジーとは何か?
ishikawa_satoru
1
880
Datadog の学び方 - あるいは、オブザーバビリティを学ぶとは何か
mananyuki
1
500
SDDの運用にめげずに向き合った話
sansantech
PRO
1
140
実体験から学ぶ分析エージェントの開発と運⽤
recruitengineers
PRO
7
1.6k
OSC2026on_the-world-is-waiting-for-your-voice.pdf
naruoga
0
360
初対面のメンバーがチームを組み、Claude Codeでゼロからサービスをリリース
mkdev10
1
110
自作バイナリを動かす「入口」8選
puhitaku
1
1.1k
DWH の限界突破! AI エージェント向け爆速リアルタイムデータ基盤 ClickHouse
jozono
1
300
生成AIで高い生産性を求められて、 悩み、乗り越えた話
mot_techtalk
2
130
AIは爆速なのに、私が詰まっていた話 ― 音声入力と鳴くマスコットでボトルネックを削る
yama3133
0
550
BedrockとLambdaで作る リアルタイム進行型推理ゲーム
kawametho
0
210
Featured
See All Featured
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
770
Why Our Code Smells
bkeepers
PRO
340
58k
Writing Fast Ruby
sferik
630
63k
Building the Perfect Custom Keyboard
takai
2
900
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
590
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
390
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
2
720
Measuring & Analyzing Core Web Vitals
bluesmoon
9
1k
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
68
58k
Darren the Foodie - Storyboard
khoart
PRO
4
4k
エンジニアに許された特別な時間の終わり
watany
109
250k
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
2
2.9k
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