gulp.js - the streaming build system
npm install gulp -g
npm install gulp gulp-util gulp-jade --save-dev
gulp.js - the streaming build system
npm install gulp -g
npm install gulp gulp-util gulp-jade --save-dev
/* | |
Foundation 5 w/ Grunt + Libsass (watch scss/*.scss & .html) | |
Requirement: Chrome LiveReload extension (https://chrome.google.com/webstore/detail/livereload/jnihajbhpnppcggbcgedagnkighmdlei?hl=en). | |
Usage: foundation new project-name --libsass && grunt | |
*/ | |
module.exports = function(grunt) { | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json'), |
(function() { | |
var CSSCriticalPath = function(w, d, opts) { | |
var opt = opts || {}; | |
var css = {}; | |
var pushCSS = function(r) { | |
if(!!css[r.selectorText] === false) css[r.selectorText] = {}; | |
var styles = r.style.cssText.split(/;(?![A-Za-z0-9])/); | |
for(var i = 0; i < styles.length; i++) { | |
if(!!styles[i] === false) continue; | |
var pair = styles[i].split(": "); |
{ | |
"jam": { | |
"packageDir": "public/vendor", | |
"baseUrl": "public", | |
"dependencies": { | |
} | |
} | |
} |
requirejs.config({ | |
baseUrl: '/js', | |
paths: { | |
jquery: ['//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min','jquery.min'], | |
bootstrap: 'bootstrap.min' | |
}, | |
shim: { | |
'bootstrap':{deps: ['jquery']} | |
} | |
}); |
/* | |
* Takes provided URL passed as argument and make screenshots of this page with several viewport sizes. | |
* These viewport sizes are arbitrary, taken from iPhone & iPad specs, modify the array as needed | |
* | |
* Original: | |
* nhoizey / screenshots.js https://gist.github.com/nhoizey/4060568 | |
* | |
* Usage: | |
* $ casperjs screenshots.js http://example.com | |
*/ |