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
Grunt.js
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Matias Singers
January 29, 2014
Programming
180
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Grunt.js
Matias Singers
January 29, 2014
Other Decks in Programming
See All in Programming
golang-bob.pdf
iwatsukayura
0
150
個人開発者よ、Honoを使え(おじさんver)
tanahiro2010
2
290
AIが生成したコードは読むべきか?抽象化設計とコードの品質保証 / abstraction-design-and-quality
minodriven
11
7.2k
全ての永続トークンを、生まれる前に消し去りたい!
sylph01
2
1.5k
當我們開始不讀 Code - AI Agent 時代,Code Review 與 Clean Code 還剩下什麼?
jame2408
1
340
Next.js: The final boss of Web Performance
guaca
0
350
Optunaを作ったときにやりたかったこと、その後 (2026/10/16, Optuna Meetup #3)
iwiwi
4
1.3k
Seven New Principles of Software Engineering
yegor256
0
370
Agentic Software Factoryに、すごく賢いIF文を。 / super smart IF statement into the Agentic Software Factory.
rkaga
8
2.4k
最近”作らせてる” ローカルAIアプリの話
akit37
0
510
TanStack Vue Query と Pinia Colada から学ぶ非同期状態の型設計
aoshi
0
350
AIがコードを書いてくれる時代、我々は何を確かめるのか
yosuke_furukawa
PRO
13
5.1k
Featured
See All Featured
Visualization
eitanlees
153
17k
Marketing to machines
jonoalderson
1
5.9k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
203
77k
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
720
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
50
10k
What does AI have to do with Human Rights?
axbom
PRO
1
2.5k
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
1
590
Facilitating Awesome Meetings
lara
57
7.2k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
33
5.4k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
570
How to make the Groovebox
asonas
2
2.5k
Transcript
None
Grunt
$ npm install -g grunt-cli Installation
Setup + Gruntfile.js package.json
$ npm init $ npm install grunt --save-dev $ npm
install grunt-contrib-connect --save-dev $ npm install grunt-contrib-watch --save-dev $ npm install grunt-contrib-sass --save-dev $ npm install load-grunt-tasks --save-dev Install Grunt plugins
1 { 2 "name": "my-project", 3 "version": "0.1.0", 4 "devDependencies":
{ 5 "grunt": "~0.4.2", 6 "grunt-contrib-connect": "~0.6.0", 7 "grunt-contrib-watch": "~0.5.3", 8 "grunt-contrib-sass": "~0.7.0", 9 "load-grunt-tasks": "~0.3.0" 10 } 11 } package.json https://npmjs.org/doc/json.html
• Loading Grunt plugins and tasks • "wrapper" function •
Project and task configuration • Custom tasks Gruntfile.js http://gruntjs.com/getting-started
1 module.exports = function(grunt) { 2 // instead of having
multiple grunt.loadNpmTasks(''); 3 require('load-grunt-tasks')(grunt); 4 5 // Do grunt-related things in here 6 }; Gruntfile.js - wrapper http://gruntjs.com/getting-started
1 module.exports = function(grunt) { 2 require('load-grunt-tasks')(grunt); 3 4 grunt.initConfig({
5 connect: { 6 options: { 7 port: 9001, 8 open: true, 9 hostname: 'localhost' 10 }, 11 server: { 12 // specific configs for the server task 13 } 14 }, 15 }); 16 }; Gruntfile.js - task configuration http://gruntjs.com/getting-started
1 // Default task(s). 2 grunt.registerTask('default', ['connect:server']); Gruntfile.js - custom
tasks http://gruntjs.com/getting-started
1 // Default task(s). 2 grunt.registerTask('default', ['connect:server']); Gruntfile.js - custom
tasks 1 // A very basic default task. 2 grunt.registerTask('default', 'Logger', function() { 3 grunt.log.write('Logging...').ok(); 4 }); http://gruntjs.com/getting-started
Gruntfile.js - custom tasks 1 grunt.registerTask('server', [ 2 'clean:server', 3
'sass:server', 4 'connect:server', 5 'watch' 6 ]); http://gruntjs.com/getting-started
http://gruntjs.com/plugins
http://gruntjs.com/plugins
None
Concatenating 1 concat: { 2 'js/main.js': [ 3 'js/controllers/events.js', 4
'js/controllers/login.js', 5 'js/controllers/menu.js' 6 ] 7 } module: grunt-contrib-concat
Concatenating module: grunt-contrib-concat grunt-usemin + 1 <!-- build:js js/main.js -->
2 <script src="js/controllers/events.js"></script> 3 <script src="js/controllers/login.js"></script> 4 <script src="js/controllers/menu.js"></script> 5 <!-- endbuild -->
Watching files 1 watch: { 2 sass: { 3 files:
['styles/**/*.{scss,sass}'], 4 tasks: ['sass:server'] 5 }, 6 livereload: { 7 files: [ 8 'views/**/*.html', 9 'scripts/**/*.js', 10 'styles/**/*.css', 11 'img/**/*.{png,jpg,jpeg,gif,webp,svg}' 12 ], 13 options: { 14 livereload: true 15 } 16 } 17 } module: grunt-contrib-watch
Watching files module: grunt-contrib-watch - Waiting... OK >> File "public/styles/main.sass"
changed. ! Running "sass:app" (sass) task ! Done, without errors. ... Reload public/styles/main.css ... Completed in 0.178s at Tue Jan 28 2014 12:22:51 GMT+0800 (MYT)
None
enjoy your automated workflow!
Advantages
@matiassingers github.com/matiassingers Thank you! Any questions?