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> | |
<head> | |
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js?1.29.5"></script> | |
<script type="text/javascript" src="http://polymaps.org/polymaps.min.js?2.5.0"></script> | |
<style type="text/css"> | |
html, body { | |
height: 100%; | |
background: #E6E6E6; |
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($) { | |
$.fn.iframeScale = function() { | |
this.each(function() { | |
var $iframe = $(this).find("iframe"); | |
var scaleFactor = $(this).width() / $iframe.width(); | |
$iframe.css({ | |
webkitTransform: "scale(" + scaleFactor + ")", | |
mozTransform: "scale(" + scaleFactor + ")", | |
msTransform: "scale(" + scaleFactor + ")", | |
transform: "scale(" + scaleFactor + ")" |
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 Code | |
.selector { | |
// This mixin's content block will be wrapped in this media query: | |
// `@media (min-width: 540px)` | |
@include size-class(regular) { | |
width: span(5); | |
@include font-size(auto, vw) { | |
// Will output a font-size property and value within a media query: |
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
{ | |
"plugins": [ | |
"stylelint-scss" | |
], | |
"extends": [ | |
"stylelint-config-sass-guidelines", | |
"stylelint-config-standard" | |
], | |
"rules": { | |
"indentation": 2, |
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
{ | |
"parser": "babel-eslint", | |
"extends": [ | |
"airbnb" | |
], | |
"rules": { | |
"import/newline-after-import": "off" | |
} | |
} |
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
Show hidden characters
{ | |
"presets": [ | |
["latest", { "modules": false }], | |
"react", | |
"stage-2" | |
], | |
"env": { | |
"development": { | |
"plugins": [ | |
"react-hot-loader/babel" |
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
$ yarn run test | |
yarn run v0.24.6 | |
$ NODE_ENV=test jest | |
PASS src/__tests__/Storyshots.test.js | |
● Console | |
console.info node_modules/@storybook/react/dist/server/babel_config.js:67 | |
=> Loading custom .babelrc | |
PASS src/components/standard/Figure/__tests__/Figure.test.jsx |
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
$ yarn run test -- src/__tests__/Storyshots.test.js | |
yarn run v0.24.6 | |
$ NODE_ENV=test jest src/__tests__/Storyshots.test.js | |
PASS src/__tests__/Storyshots.test.js | |
Storyshots | |
Figure | |
✓ with all props (story) (22ms) | |
✓ with a Picture (story) (8ms) | |
Test Suites: 1 passed, 1 total |
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
import React from 'react'; | |
import { storiesOf } from '@storybook/react'; | |
import withPaidPostArticle from '../../../../../.storybook/withPaidPostArticle'; | |
import withPlacement from '../../../../../.storybook/withPlacement'; | |
import Figure from '../Figure'; | |
import { paragraphs as lipsum } from '../../../../utils/placeholders/lorem-ipsum.json'; | |
import breakpoints from '../../../../utils/layout/breakpoints.json'; | |
const srcObj = { |
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
import React, { Component } from 'react'; | |
// A "global" promise for the runtime library. | |
const runtimePromise; | |
export default RuntimeSingletonComponent extends Component { | |
componentDidMount() { | |
// Have we previously loaded the runtime library? | |
if (!runtimePromise) { | |
// import() the runtime library for the first time. |
OlderNewer