This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function(grunt, options) { | |
var path = require('path'); | |
require('load-grunt-config')(grunt, { | |
configPath: path.join(process.cwd(), 'grunt'), //path to task.js files, defaults to grunt dir | |
init: true, //auto grunt.initConfig | |
config: { //additional config vars | |
test: false | |
}, | |
loadGruntTasks: { //can optionally pass options to load-grunt-tasks. If you set to false, it will disable auto loading tasks. | |
config: require('./package.json'), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bundle exec berks install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ---- | |
// Sass (v3.3.0.rc.4) | |
// Compass (v1.0.0.alpha.18) | |
// ---- | |
@function color-diff($color-a, $color-b) { | |
$hue: hue($color-a) - hue($color-b); | |
$saturation: saturation($color-a) - saturation($color-b); | |
$lightness: lightness($color-a) - lightness($color-b); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### | |
css-sprite | |
https://github.com/kazu69/css-sprite | |
Copyright (c) 2014 kazu69 | |
Licensed under the MIT license. | |
### | |
module.exports = (grunt) -> | |
'use strict' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# cson to json | |
node_modules/cson/bin/cson2json data.cson | |
{"abc":["a","b","c"],"a":{"b":"c"}} | |
node_modules/cson/bin/json2cson data.json | |
{ | |
abc: [ | |
"a" | |
"b" | |
"c" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
node_modules/json5/lib/cli.js -c data.json5 | |
cat data.json | |
{ | |
"foo": "bar", | |
"while": true, | |
"this": "is a multi-line string", | |
"here": "is another", | |
"hex": 3735928559, | |
"half": 0.5, | |
"delta": 10, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ---- | |
// Sass (v3.3.0) | |
// Compass (v1.0.0.alpha.18) | |
// ---- | |
.badge { | |
@at-root .info { content: 'info'; } | |
@at-root .info { | |
.page { | |
content: 'page'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function* double(x) { | |
while(true) { | |
x = x * 2; | |
yield x; | |
} | |
} | |
var g = double(2); | |
console.log(g.next()); // # => 4 | |
console.log(g.next()); // # => 8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var koa = require('koa'); | |
var app = koa(); | |
app.use(function *(next){ | |
console.log(1); | |
yield next; | |
console.log(6); | |
}); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var koa = require('koa'); | |
var app = koa(); | |
app.use(function *(next){ | |
try { | |
yield next; | |
} | |
catch (err) { | |
console.log(err); | |
this.status = err.status || 500; |
OlderNewer