manager | dist | manifest | export | ignore | include | entry |
---|---|---|---|---|---|---|
npm | npm | package.json | cjs | .npmignore | #main | |
bower | git | bower.json | umd | #ignore | #main | |
component | git | component.json | umd | #files | #main | |
spm | git | package.json#spm | umd | .spmignore | #output | #main |
packagist | git | composer.json | umd | |||
ender | npm | package.json | cjs | .npmignore | #ender | |
dojo | ??? | package.json#dojoBuild | umd | #dojoBuild | ||
jspm | npm/git | package.json#jspm | any | #ignore | #files | #main |
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
directory = ARGV.shift || Dir.pwd | |
$dont_get_into = ['.','..'] | |
$allowed = { | |
'Ruby' => '.rb', | |
'Ruby HTML Templates' => '.html.erb', | |
'YAML' => '.yml', | |
'RDoc' => '.rdoc', | |
'HTML' => '.html', | |
'Javascript' => '.js', | |
'CSS' => '.css', |
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 SimpleMap() { | |
this._data = {}; | |
} | |
SimpleMap.prototype = { | |
get: function(key) { | |
return this.has(key) ? this._data[key] : null; | |
}, |
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 $(a,b){return(b||document)['querySelector'+(b=/\:first$/,b.test(a)?'':'All')](a.replace(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
<head> | |
// If the user has a cookie don't render the critical css to the page | |
// Ensure it matches the md5 hash of our critical css so we can cache bust | |
- if cookies[:inline_css_cached] == critical_css_ref | |
// Instead get the styles from local storage | |
<script> |
Tools that read through a directory, stream or tree and create an Application Cache manifest for you.
AppCache is still a douche but luckily there are tools available to take the pain out of generating your initial manifest files:
- Grunt: grunt-manifest is currently the de facto option, but the project lead is looking for a new maintainer. In light of that grunt-appcache is an alternative in case you're looking for more active support.
- Gulp: gulp-manifest is inspired by grunt-manifest and has a similar set of options.
- Broccoli: broccoli-manifest brings manifest file compilation based on trees.
Do review what is generated. As with any automation tooling, be careful that what is being generated is what you actually intend on being cached. I generally rel
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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>iOS 8 scrolls</title> | |
<meta name="viewport" content="width=device-width"> | |
</head> | |
<body style="min-height: 20000px;"> | |
<div class="scroller" style="text-align: center; line-height: 4em; position: fixed; top: 0; left: 0; right: 0; height: 4em; background: red; color: #fff; font-family: sans-serif;">We’re here.</div> | |
<script> |
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 Q = require('Q'); | |
var fs = require('fs'); | |
var generator = Q.async(function* () { | |
yield 10 | |
console.log('yielded 10'); | |
yield 20 | |
console.log('yielded 20'); | |
yield 30 |
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 Style = React.createClass({ | |
render: function() { | |
var style = assign({}, this.props); | |
delete style.children; | |
return React.createElement( | |
'div', | |
{style: style, children: this.props.children} | |
); | |
} |
OlderNewer