介紹協助提昇 F2E Code Style 的兩個工具。
josephj@faria
(function($,sr){ | |
// debouncing function from John Hann | |
// http://unscriptable.com/index.php/2009/03/20/debouncing-javascript-methods/ | |
var debounce = function (func, threshold, execAsap) { | |
var timeout; | |
return function debounced () { | |
var obj = this, args = arguments; | |
function delayed () { |
// --- | |
// Sass (v3.2.9) | |
// --- | |
/* SASS Training Course | |
Operations | |
*/ |
{ | |
"binary_file_patterns": | |
[ | |
"*.psd" | |
], | |
"close_windows_when_empty": false, | |
"color_scheme": "Packages/Tomorrow Color Schemes/Tomorrow-Night.tmTheme", | |
"detect_indentation": false, | |
"disable_formatted_linebreak": true, | |
"drag_text": false, |
介紹協助提昇 F2E Code Style 的兩個工具。
josephj@faria
#A simple Slideshow module wrapped in a Backbone View
Viewable in action in this jsfiddle
define([ | |
'underscore', | |
'backbone' | |
], | |
function (_, Backbone) { | |
return Backbone.Router.extend({ | |
// Variants of the routes to be automatically bound to. This way you |
/* | |
* 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 | |
* | |
* Usage: | |
* $ casperjs screenshots.js http://example.com | |
*/ | |
var casper = require("casper").create(); |
@import "compass/utilities/sprites"; // Include compass sprite helpers | |
@import "compass/css3/background-size"; // Include helper to calc background size | |
@mixin sprite($name, $hover: false, $active: false) { | |
@include retina-sprite($name, $sprites, $sprites2x, $hover, $active); | |
} | |
// The general purpose retina sprite mixin. | |
// |
$bgcolor: hsl(53,56%,87%); | |
.button-primary { | |
background: $bgcolor; | |
color: if(lightness($bgcolor) < 50%, white, black); | |
} |
'use strict'; | |
var LIVERELOAD_PORT = 35729; | |
var lrSnippet = require('connect-livereload')({port: LIVERELOAD_PORT}); | |
var mountFolder = function (connect, dir) { | |
return connect.static(require('path').resolve(dir)); | |
}; | |
// # Globbing | |
// for performance reasons we're only matching one level down: | |
// 'test/spec/{,*/}*.js' |