This file contains hidden or 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 toSpaceCase (string) { | |
return string.replace(/[\W_]+(.|$)/g, function (matches, match) { | |
return match ? ' ' + match : ''; | |
}); | |
} | |
function toCamelCase(string) { | |
string = toSpaceCase(string).replace(/\s(\w)/g, function (matches, letter) { | |
return letter.toUpperCase(); | |
}); |
This file contains hidden or 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
language: node_js | |
node_js: | |
- iojs | |
env: | |
global: | |
# https://docs.saucelabs.com/ci-integrations/travis-ci/ | |
# SAUCE_USERNAME | |
- secure: Daa... |
This file contains hidden or 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
selector { | |
prop: value; | |
} |
This file contains hidden or 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
Renderer.prototype.image = function(href, title, text) { | |
var out = '<img src="' + href + '" alt="' + text + '"'; | |
if (title) { | |
out += ' title="' + title + '"'; | |
} | |
out += this.options.xhtml ? '/>' : '>'; | |
return out; | |
}; |
This file contains hidden or 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
cleanupSvg(svg) { | |
return [ | |
// some useless stuff for us | |
// that svgo doesn't remove | |
/<title>.*<\/title>/gi, | |
// remove hardcoded dimensions | |
/ +width="\d+(\.\d+)?(px)?"/gi, | |
/ +height="\d+(\.\d+)?(px)?"/gi, |
This file contains hidden or 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
// go on you labels pages | |
// eg https://github.com/cssnext/cssnext/labels | |
// paste this script in your console | |
// copy the output and now you can import it using https://github.com/popomore/github-labels ! | |
var labels = []; | |
[].slice.call(document.querySelectorAll(".label-link")) | |
.forEach(function(element) { | |
labels.push({ | |
name: element.textContent.trim(), |
This file contains hidden or 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
--- | |
# babel support more syntax stuff than eslint for now | |
parser: babel-eslint | |
ecmaFeatures: | |
modules: true | |
jsx: true | |
env: | |
es6: true |
This file contains hidden or 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 postcss = require("postcss") | |
alert(postcss.rule({selector: "a"}).source) |
This file contains hidden or 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 (root, factory) { | |
if (typeof exports === 'object') { | |
// CommonJS | |
module.exports = factory(); | |
} else if (typeof define === 'function' && define.amd) { | |
// AMD | |
define([], function () { | |
return (root.BROWSER = factory()); | |
}); | |
} else { |