A mixin for writing @font-face rules in SASS.
Create a font face rule. Embedded OpenType, WOFF2, WOFF, TrueType, and SVG files are automatically sourced.
@include font-face(Samplino, fonts/Samplino);
// If you don't use underscore.js, use it (http://documentcloud.github.com/underscore/) | |
// Then, use underscore's mixin method to extend it with all your other utility methods | |
// like so: | |
_.mixin({ | |
escapeHtml: function () { | |
return this.replace(/&/g,'&') | |
.replace(/>/g,'>') | |
.replace(/</g,'<') | |
.replace(/"/g,'"') | |
.replace(/'/g,'''); |
jasmine.Matchers.prototype.toBeTypeOf = function(expected) { | |
var actual, notText, objType; | |
actual = this.actual; | |
notText = this.isNot ? 'not ' : ''; | |
objType = actual ? Object.prototype.toString.call(actual) : ''; | |
this.message = function() { | |
return 'Expected ' + actual + notText + ' to be an array'; | |
} |
// with this you can write .end(3) instead of .end().end().end() | |
(function(){ | |
// Define overriding method. | |
jQuery.fn.end = function(no_of_times){ | |
var prevObject = this.prevObject; | |
if (!(arguments.length) || (typeof no_of_times !== "number")) { | |
return this.prevObject || this.constructor(null); | |
} else { |
// List all files in a directory in Node.js recursively in a synchronous fashion | |
var walkSync = function(dir, filelist) { | |
var fs = fs || require('fs'), | |
files = fs.readdirSync(dir); | |
filelist = filelist || []; | |
files.forEach(function(file) { | |
if (fs.statSync(dir + file).isDirectory()) { | |
filelist = walkSync(dir + file + '/', filelist); | |
} | |
else { |
var source = require('vinyl-source-stream'); | |
var gulp = require('gulp'); | |
var gutil = require('gulp-util'); | |
var browserify = require('browserify'); | |
var reactify = require('reactify'); | |
var watchify = require('watchify'); | |
var notify = require("gulp-notify"); | |
var scriptsDir = './scripts'; | |
var buildDir = './build'; |
/** | |
* World's simplest express server | |
* - used to serve index.html from /public | |
*/ | |
var express = require('express'); | |
var serveStatic = require('serve-static'); | |
var app = express(); | |
app.use(serveStatic(__dirname + '/public')); |
'use strict'; | |
// simple express server | |
var express = require('express'); | |
var app = express(); | |
var router = express.Router(); | |
app.use(express.static('public')); | |
app.get('/', function(req, res) { | |
res.sendfile('./public/index.html'); |
var gulp = require('gulp'); | |
var sourcemaps = require('gulp-sourcemaps'); | |
var source = require('vinyl-source-stream'); | |
var buffer = require('vinyl-buffer'); | |
var browserify = require('browserify'); | |
var watchify = require('watchify'); | |
var babel = require('babelify'); | |
function compile(watch) { | |
var bundler = watchify(browserify('./src/index.js', { debug: true }).transform(babel)); |
var gulp = require('gulp'); | |
var gutil = require('gulp-util'); | |
var watchify = require('watchify'); | |
var uglify = require('gulp-uglify'); | |
var buffer = require('vinyl-buffer'); | |
var source = require('vinyl-source-stream'); | |
var browserify = require('browserify'); | |
var browserSync = require('browser-sync'); | |
var sass = require('gulp-ruby-sass'); | |
var filter = require('gulp-filter'); |