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 JS Intro
Search
cbishop
September 12, 2014
Programming
2
43
Grunt JS Intro
Short intro to GruntJS
cbishop
September 12, 2014
Tweet
Share
Other Decks in Programming
See All in Programming
TypeScriptとGraphQLで実現する 型安全なAPI実装 / TSKaigi 2024
hokaccha
5
2.6k
スタックトレース始めてみた
kuro_kurorrr
4
970
Implementing Design Systems in Swift
seyfoyun
2
520
WinActorの勉強を継続する方法
tamai_63
0
130
Fragment Composition of GraphQL
quramy
14
1.7k
RaaP
ksss
0
140
Goのmultiple errorsについて (2024年4月版)
syumai
4
1.3k
Let's learn code review
riofujimon
2
630
株式会社ゼネテック
genetec
0
120
Balkan Ruby 2024 — How and why to run SQLite on Rails in production
fractaledmind
0
110
JavaScript Closure
asoluka
0
1.9k
Going beyond Apache Parquet's default settings
xhochy
0
150
Featured
See All Featured
A Modern Web Designer's Workflow
chriscoyier
689
190k
Stop Working from a Prison Cell
hatefulcrawdad
266
19k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
226
51k
Designing on Purpose - Digital PM Summit 2013
jponch
111
6.5k
Git: the NoSQL Database
bkeepers
PRO
423
63k
Done Done
chrislema
178
15k
jQuery: Nuts, Bolts and Bling
dougneiner
60
7.2k
The Invisible Customer
myddelton
114
12k
Intergalactic Javascript Robots from Outer Space
tanoku
266
26k
Documentation Writing (for coders)
carmenintech
60
4k
10 Git Anti Patterns You Should be Aware of
lemiorhan
649
58k
Typedesign – Prime Four
hannesfritz
36
2.1k
Transcript
INTRO TO Better than CodeKit
GRUNT IN A NUTSHELL • Javascript task runner • Runs
on the command line • Runs on Node.js • Thousands of plugins
WHY USE GRUNT • Automation • Open Source • Ease
of Use • Large community • Efficient & Flexible • Multi-platform • Free (take that CodeKit)
WHAT CAN YOU DO WITH GRUNT? • CSS Preprocessing •
JS Linting • Minification & Concatenation • Image Optimization • JS Testing • Almost Anything http://gruntjs.com/plugins
GRUNT SETUP • Download Node.js and NPM www.nodejs.org • Install
Grunt CLI • Prepare package.json and Gruntfile.js
INSTALL GRUNT CLI npm install -g grunt-cli Uninstall Grunt Globally
npm uninstall -g grunt
package.json ! ! { "name": "grunt-intro", "version": "0.1.0", "devDependencies": {
} }
Gruntfile.js ! ! module.exports = function(grunt) { ! // Grunt
Code ! }; Grunt Wrapper
Gruntfile.js ! ! grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), ! // Plugin configuration
! }); Task Configuration
Gruntfile.js ! ! grunt.loadNpmTasks(''); Load Plugins and Tasks
Gruntfile.js ! ! grunt.registerTask('default', ['']); Custom Tasks
! ! module.exports = function(grunt) { ! grunt.initConfig({ pkg: grunt.file.readJSON('package.json'),
! }); ! grunt.loadNpmTasks(''); ! grunt.registerTask('default', ['']); ! };