Gist to serve as template for future TDD D3 blocks
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
license: gpl-3.0 | |
redirect: https://observablehq.com/@d3/d3-collapsible-tree |
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
license: gpl-3.0 |
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
license: gpl-3.0 |
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
license: gpl-3.0 |
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
license: mit |
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
license: mit |
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
gulp.task('critical', function() { | |
var request = require('request'); | |
var path = require( 'path' ); | |
var criticalcss = require("criticalcss"); | |
var fs = require('fs'); | |
var tmpDir = require('os').tmpdir(); | |
var cssUrl = 'http://PROJECT.dev/app/themes/sage/dist/styles/main-3c29b398.css'; | |
var cssPath = path.join( tmpDir, 'style.css' ); | |
var includePath = path.join( 'dist/styles/', 'critical.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
<?php | |
namespace Roots\Sage\LazyStyles; | |
use Roots\Sage\Assets; | |
/** | |
* Load theme scripts in the footer | |
* Ref: http://gomakethings.com/inlining-critical-css-for-better-web-performance/ | |
*/ | |
function load_theme_files() { |
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
/** | |
* @summary Generates a testObjectBuilder example object | |
* @requires underscore, requirejs/commonjs | |
*/ | |
var testObjectBuilder = function(require) { | |
'use strict'; | |
var _ = require('underscore'), | |
OrderModel = require('./order_model'); |
NewerOlder