diff --git a/.eslintrc b/.eslintrc index 6b6f93a..49e3ae3 100644 --- a/.eslintrc +++ b/.eslintrc @@ -1,27 +1,35 @@ { - "env": { - "node": true, - "mocha": true, - "es6": true - }, - "extends": "eslint:recommended", - "rules": { - "indent": [ - "error", - 2, - { "VariableDeclarator": 2 } - ], - "linebreak-style": [ - "error", - "unix" - ], - "quotes": [ - "error", - "single" - ], - "semi": [ - "error", - "always" - ] - } -} \ No newline at end of file + "env": { + "node": true, + "mocha": true + }, + + "rules": { + // Possible errors + "no-cond-assign": 0, + "no-console": 0, + "no-extra-parens": 2, + + // Best practices + "block-scoped-var": 2, + "eqeqeq": [2, "smart"], + "no-else-return": 2, + "no-floating-decimal": 2, + "wrap-iife": [2, "inside"], + + // Variables + "no-use-before-define": 1, + + // Stylistic issues + "brace-style": 2, + "camelcase": 2, + "new-cap": 2, + "no-lonely-if": 2, + "no-underscore-dangle": 2, + "space-after-keywords": 2, + "space-in-brackets": 0, + "space-infix-ops": 2, + "one-var": 2, + "quotes": [2, "single"] + } +} diff --git a/.gitignore b/.gitignore index 51af743..1ca9571 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,2 @@ -# Deps -node_modules - -# Runtime -*.log -.DS_Store +node_modules/ +npm-debug.log diff --git a/.npmignore b/.npmignore new file mode 100644 index 0000000..9e17589 --- /dev/null +++ b/.npmignore @@ -0,0 +1,10 @@ +.gitignore + +node_modules/ + +test/ +.travis.yml + +gulpfile.js + +demo.gif diff --git a/.travis.yml b/.travis.yml index a6de395..ffb8b39 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,6 @@ sudo: false language: node_js node_js: - - 4 - - 5 + - iojs + - "0.12" + - "0.10" diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index 2ebc13b..0000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,115 +0,0 @@ -# Change Log - -## [Unreleased](https://github.com/seaneking/postcss-responsive-type/tree/HEAD) - -[Full Changelog](https://github.com/seaneking/postcss-responsive-type/compare/v1.0.0...HEAD) - -**Closed issues:** - -- Publish v1.0.0 on npm registry [\#29](https://github.com/seaneking/postcss-responsive-type/issues/29) - -## [v1.0.0](https://github.com/seaneking/postcss-responsive-type/tree/v1.0.0) (2017-07-07) -[Full Changelog](https://github.com/seaneking/postcss-responsive-type/compare/v0.6.0...v1.0.0) - -## [v0.6.0](https://github.com/seaneking/postcss-responsive-type/tree/v0.6.0) (2017-07-07) -[Full Changelog](https://github.com/seaneking/postcss-responsive-type/compare/v0.5.1...v0.6.0) - -**Merged pull requests:** - -- Upgrade postcss and misc dependencies [\#28](https://github.com/seaneking/postcss-responsive-type/pull/28) ([perrin4869](https://github.com/perrin4869)) - -## [v0.5.1](https://github.com/seaneking/postcss-responsive-type/tree/v0.5.1) (2017-02-13) -[Full Changelog](https://github.com/seaneking/postcss-responsive-type/compare/v0.5.0...v0.5.1) - -**Closed issues:** - -- error in Chrome Develop Tool's mobile debug [\#25](https://github.com/seaneking/postcss-responsive-type/issues/25) - -**Merged pull requests:** - -- Adds support for negative values [\#26](https://github.com/seaneking/postcss-responsive-type/pull/26) ([toreholmberg](https://github.com/toreholmberg)) - -## [v0.5.0](https://github.com/seaneking/postcss-responsive-type/tree/v0.5.0) (2016-11-25) -[Full Changelog](https://github.com/seaneking/postcss-responsive-type/compare/v0.4.0...v0.5.0) - -**Closed issues:** - -- README example --- incorrect [\#21](https://github.com/seaneking/postcss-responsive-type/issues/21) -- Support responsive line-height [\#18](https://github.com/seaneking/postcss-responsive-type/issues/18) - -**Merged pull requests:** - -- incorrect syntax -- fixes \#21 [\#22](https://github.com/seaneking/postcss-responsive-type/pull/22) ([artisin](https://github.com/artisin)) - -## [v0.4.0](https://github.com/seaneking/postcss-responsive-type/tree/v0.4.0) (2016-06-17) -[Full Changelog](https://github.com/seaneking/postcss-responsive-type/compare/v0.3.4...v0.4.0) - -**Merged pull requests:** - -- Add support for responsive line height + bonuses [\#20](https://github.com/seaneking/postcss-responsive-type/pull/20) ([perrin4869](https://github.com/perrin4869)) - -## [v0.3.4](https://github.com/seaneking/postcss-responsive-type/tree/v0.3.4) (2016-06-11) -[Full Changelog](https://github.com/seaneking/postcss-responsive-type/compare/v0.3.3...v0.3.4) - -**Closed issues:** - -- pixrem / cssnext incompatibility ? [\#16](https://github.com/seaneking/postcss-responsive-type/issues/16) -- Use 'em' instead of 'px' for 'font-range' [\#13](https://github.com/seaneking/postcss-responsive-type/issues/13) -- Fallback with media queries [\#12](https://github.com/seaneking/postcss-responsive-type/issues/12) -- Responsive 'px' restriction is not working [\#10](https://github.com/seaneking/postcss-responsive-type/issues/10) - -**Merged pull requests:** - -- Add em related tests and explanation [\#19](https://github.com/seaneking/postcss-responsive-type/pull/19) ([perrin4869](https://github.com/perrin4869)) - -## [v0.3.3](https://github.com/seaneking/postcss-responsive-type/tree/v0.3.3) (2016-02-18) -[Full Changelog](https://github.com/seaneking/postcss-responsive-type/compare/v0.3.2...v0.3.3) - -**Merged pull requests:** - -- Fix regex for font-size matching [\#11](https://github.com/seaneking/postcss-responsive-type/pull/11) ([adam-beck](https://github.com/adam-beck)) - -## [v0.3.2](https://github.com/seaneking/postcss-responsive-type/tree/v0.3.2) (2015-12-05) -[Full Changelog](https://github.com/seaneking/postcss-responsive-type/compare/v0.3.1...v0.3.2) - -**Closed issues:** - -- Calc sizing not working in Chrome [\#8](https://github.com/seaneking/postcss-responsive-type/issues/8) - -**Merged pull requests:** - -- Removed space in rules.responsive to prevent breaking in chrome\(v47+\) [\#7](https://github.com/seaneking/postcss-responsive-type/pull/7) ([croesike](https://github.com/croesike)) -- Update docs so responsive-type gets executed [\#5](https://github.com/seaneking/postcss-responsive-type/pull/5) ([quintenvk](https://github.com/quintenvk)) -- Corrected the formula in the documentation [\#4](https://github.com/seaneking/postcss-responsive-type/pull/4) ([aeyoll](https://github.com/aeyoll)) - -## [v0.3.1](https://github.com/seaneking/postcss-responsive-type/tree/v0.3.1) (2015-09-15) -[Full Changelog](https://github.com/seaneking/postcss-responsive-type/compare/v0.3.0...v0.3.1) - -## [v0.3.0](https://github.com/seaneking/postcss-responsive-type/tree/v0.3.0) (2015-09-06) -[Full Changelog](https://github.com/seaneking/postcss-responsive-type/compare/v0.2.1...v0.3.0) - -**Closed issues:** - -- Move to PostCSS 5.0 [\#2](https://github.com/seaneking/postcss-responsive-type/issues/2) - -## [v0.2.1](https://github.com/seaneking/postcss-responsive-type/tree/v0.2.1) (2015-08-27) -[Full Changelog](https://github.com/seaneking/postcss-responsive-type/compare/v0.2.0...v0.2.1) - -**Fixed bugs:** - -- Regression in IE with new sizing logic [\#3](https://github.com/seaneking/postcss-responsive-type/issues/3) - -## [v0.2.0](https://github.com/seaneking/postcss-responsive-type/tree/v0.2.0) (2015-08-21) -[Full Changelog](https://github.com/seaneking/postcss-responsive-type/compare/v0.1.1...v0.2.0) - -**Closed issues:** - -- Support rem units [\#1](https://github.com/seaneking/postcss-responsive-type/issues/1) - -## [v0.1.1](https://github.com/seaneking/postcss-responsive-type/tree/v0.1.1) (2015-07-26) -[Full Changelog](https://github.com/seaneking/postcss-responsive-type/compare/v0.1.0...v0.1.1) - -## [v0.1.0](https://github.com/seaneking/postcss-responsive-type/tree/v0.1.0) (2015-07-26) - - -\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)* \ No newline at end of file diff --git a/README.md b/README.md index 7946144..375a397 100644 --- a/README.md +++ b/README.md @@ -1,50 +1,25 @@ -# PostCSS Responsive Type -[![NPM version][npm-badge]][npm-url] [![NPM downloads][downloads-badge]][npm-url] [![Build Status][travis-badge]][travis-url] +# postcss-responsive-type +[![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][daviddm-image]][daviddm-url] -Generate automagical fluid typography, with new `responsive` properties for `font-size`, `line-height`, and `letter-spacing`. Built on [PostCSS][postcss]. +[PostCSS] plugin for automagical responsive typography. Adds a `responsive` property to `font-size` that generates complex `calc` and `vw` unit based font sizes. -![Responsive Type Demo][demo] - -Inspired by [this post][post]. - -_Part of [Rucksack - CSS Superpowers](https://github.com/madeleineostoja/rucksack)_ - -### Contents - -- [Usage](#usage) - - [Quick start](#quick-start) - - [Specify parameters](#specify-parameters) - - [Expanded syntax](#expanded-syntax) - - [Responsive `line-height` and `letter-spacing`](#responsive-line-height-and-letter-spacing) -- [Defaults](#defaults) -- [Browser Support](#browser-support) +Inspired by [Typographic][typographic]. -## Usage - -#### Quick start +![Responsive Type Demo][demo] ```css +/* Quick start */ html { font-size: responsive; } -``` - -> **Pro tip:** set a reaponsive font-size on `html` and use `rem` units throughout your project to make your whole UI fluid - -#### Specify parameters -Units can be in px, rem, or em. When using em units, be sure that the `font-range` is specified in em as well. - -```css +/* Specify parameters */ html { font-size: responsive 12px 21px; /* min-size, max-size */ font-range: 420px 1280px; /* viewport widths between which font-size is fluid */ } -``` -#### Expanded syntax - -```css +/* Expanded syntax */ html { font-size: responsive; min-font-size: 12px; @@ -54,99 +29,84 @@ html { } ``` -#### Responsive `line-height` and `letter-spacing` - -PostCSS Responsive Type also allows you to set fluid sizes for the `line-height` and `letter-spacing` properties. They have the same syntax and work the same way as responsive font sizes. - ```css html { - line-height: responsive 1.2em 1.8em; - line-height-range: 420px 1280px; - - /* or extended syntax: */ - line-height: responsive; - min-line-height: 1.2em; - max-line-height: 1.8em; - lower-line-height-range: 420px; - upper-line-height-range: 1280px; + font-size: calc(12px + 9 * ((100vw - 420px) / 860)); } -``` -```css -html { - letter-spacing: responsive 0px 4px; - letter-spacing-range: 420px 1280px; - - /* or extended syntax: */ - letter-spacing: responsive; - min-letter-spacing: 0px; - max-letter-spacing: 4px; - lower-letter-spacing-range: 420px; - upper-letter-spacing-range: 1280px; +@media screen and (max-width: 420px) { + html { + font-size: 12px; + } } -``` - -> **Note:** Unitless line heights are not supported. - -## Defaults -To get started you only need to specify the `responsive` property, all other values have sane defaults. - -##### `font-size` - -- `min-font-size`: 14px -- `max-font-size`: 21px +@media screen and (min-width: 1280px) { + html { + font-size: 21px; + } +} +``` -- `lower-font-range`: 420px +-- -- `upper-font-range`: 1280px +### Defaults +To get started you only need to specify `font-size: responsive;`, all other properties have sane defaults. +`min-font-size`: 14px -##### `line-height` +`max-font-size`: 21px -- `min-line-height`: 1.2em +`lower-font-range`: 420px -- `max-line-height`: 1.8em +`upper-font-range`: 1280px -- `lower-line-height-range`: 420px +-- -- `upper-line-height-range`: 1280px +### Browser Support +`postcss-responsive-type` just uses `calc`, `vw` units, and media queries behind the scenes, so it works on all modern browsers (IE9+). Although Opera Mini is not supported. +Legacy browsers will ignore the `responsive` font-size. You can quite easily provide a simple static fallback: -##### `letter-spacing` +```css +.foo { + font-size: 16px; + font-size: responsive; +} +``` -- `min-letter-spacing`: 0px +Alternatively, if you feel the need to fully support legacy browsers or Opera Mini, there are polyfills that can help! -- `max-letter-spacing`: 4px +- [respond][respond] for media query support. -- `lower-letter-spacing-range`: 420px +- [calc-polyfill][calc-polyfill] for `calc` support. -- `upper-letter-spacing-range`: 1280px +- [vminpoly][vminpoly] for `vw` unit support. +-- -## Browser Support +### Usage -`postcss-responsive-type` just uses calc, vw units, and media queries behind the scenes, so it works on all modern browsers (IE9+). Although Opera Mini is not supported. +```js +postcss([ require('postcss-responsive-type') ]) +``` -Legacy browsers will ignore the output `responsive` font-size. You can easily provide a simple static fallback: +See [PostCSS] docs for examples for your environment. -```css -.foo { - font-size: 16px; - font-size: responsive; -} -``` +-- -*** +### License MIT © [Sean King](https://twitter.com/seaneking) -[npm-badge]: https://img.shields.io/npm/v/postcss-responsive-type.svg +[npm-image]: https://badge.fury.io/js/postcss-responsive-type.svg [npm-url]: https://npmjs.org/package/postcss-responsive-type -[downloads-badge]: https://img.shields.io/npm/dm/postcss-responsive-type.svg -[travis-badge]: https://travis-ci.org/seaneking/postcss-responsive-type.svg?branch=master +[travis-image]: https://travis-ci.org/seaneking/postcss-responsive-type.svg?branch=master [travis-url]: https://travis-ci.org/seaneking/postcss-responsive-type +[daviddm-image]: https://david-dm.org/seaneking/postcss-responsive-type.svg?theme=shields.io +[daviddm-url]: https://david-dm.org/seaneking/postcss-responsive-type [PostCSS]: https://github.com/postcss/postcss [demo]: /demo.gif?raw=true -[post]: http://madebymike.com.au/writing/precise-control-responsive-typography/ -[poststylus]: https://github.com/seaneking/poststylus +[typographic]: https://github.com/corysimmons/typographic +[calc-polyfill]: https://github.com/closingtag/calc-polyfill +[respond]: https://github.com/scottjehl/Respond +[vminpoly]: https://github.com/saabi/vminpoly diff --git a/gulpfile.js b/gulpfile.js new file mode 100644 index 0000000..c5c98fd --- /dev/null +++ b/gulpfile.js @@ -0,0 +1,23 @@ +'use strict'; + +var gulp = require('gulp'), + eslint = require('gulp-eslint'), + mocha = require('gulp-mocha'); + +gulp.task('lint', function () { + return gulp.src(['index.js', 'test/*.js', 'gulpfile.js']) + .pipe(eslint()) + .pipe(eslint.format()) + .pipe(eslint.failAfterError()); +}); + +gulp.task('test', function () { + return gulp.src('test/*.js', { read: false }).pipe(mocha({reporter: 'nyan'})); +}); + +gulp.task('watch', function() { + gulp.watch('**/*.js', ['check'] ); +}); + +gulp.task('check', ['lint', 'test']); +gulp.task('default', ['check', 'watch']); diff --git a/index.js b/index.js index 6d127f5..3b7ee85 100644 --- a/index.js +++ b/index.js @@ -1,245 +1,155 @@ 'use strict'; -const postcss = require('postcss'); - -const DEFAULT_PARAMS = { - 'font-size': { - minSize: '12px', - maxSize: '21px', - minWidth: '420px', - maxWidth: '1280px' - }, - 'line-height': { - minSize: '1.2em', - maxSize: '1.8em', - minWidth: '420px', - maxWidth: '1280px' - }, - 'letter-spacing': { - minSize: '0px', - maxSize: '4px', - minWidth: '420px', - maxWidth: '1280px' - } - }, - PARAM_RANGE = { - 'font-size': 'font-range', - 'line-height': 'line-height-range', - 'letter-spacing': 'letter-spacing-range' - }, - PARAM_DECLS = { - 'font-size': { - minSize: 'min-font-size', - maxSize: 'max-font-size', - minWidth: 'lower-font-range', - maxWidth: 'upper-font-range' - }, - 'line-height': { - minSize: 'min-line-height', - maxSize: 'max-line-height', - minWidth: 'lower-line-height-range', - maxWidth: 'upper-line-height-range' - }, - 'letter-spacing': { - minSize: 'min-letter-spacing', - maxSize: 'max-letter-spacing', - minWidth: 'lower-letter-spacing-range', - maxWidth: 'upper-letter-spacing-range' - } - }; - -// Assign default root size -let rootSize = '16px'; - -/** - * Extract the unit from a string - * @param {String} value value to extract unit from - * @return {String} unit - */ -function getUnit(value) { - var match = value.match(/px|rem|em/); - - if (match) { - return match.toString(); - } - return null; -} - -/** - * Px -> Rem converter - * @param {String} px pixel value - * @return {String} rem value - */ -function pxToRem(px) { - return parseFloat(px) / parseFloat(rootSize) + 'rem'; -} - -function fetchResponsiveSizes(rule, declName, cb) { - rule.walkDecls(declName, decl => { - - if (decl.value.indexOf('responsive') > -1) { - let vals = decl.value.match(/-?\d*\.?\d+(?:\w+)?/g); - - if (vals) { - cb(vals[0], vals[1]); +var postcss = require('postcss'); + +module.exports = postcss.plugin('postcss-responsive-type', function () { + + // Default parameters + var params = { + minSize: '12px', + maxSize: '21px', + minWidth: '420px', + maxWidth: '1280px', + rootSize: '16px' + }; + + // Map expanded declarations to params + var paramDecls = { + minSize: 'min-font-size', + maxSize: 'max-font-size', + minWidth: 'lower-font-range', + maxWidth: 'upper-font-range' + }; + + /** + * Fetch plugin parameters from css rules + * @param {object} rule CSS rule to parse + */ + var fetchParams = function(rule){ + + // Fetch params from shorthand font-size + rule.eachDecl('font-size', function(decl){ + + if (decl.value.indexOf('responsive') > -1) { + var vals = decl.value.match(/([0-9]+\w*)/g); + + if (vals){ + params.minSize = vals[0]; + params.maxSize = vals[1]; + } } + + }); + + // Fetch params from shorthand font-range + rule.eachDecl('font-range', function(decl){ + var vals = decl.value.split(/\s+/); + params.minWidth = vals[0]; + params.maxWidth = vals[1]; + decl.removeSelf(); + }); + + // Fetch parameters from expanded properties + Object.keys(paramDecls).forEach(function(param){ + rule.eachDecl(paramDecls[param], function(decl){ + params[param] = decl.value; + decl.removeSelf(); + }); + }); + + // Check root font-size (for rem units) + if (rule.selector === 'html'){ + rule.eachDecl('font-size', function(decl){ + params.rootSize = decl.value; + }); } - }); -} - -function fetchRangeSizes(rule, declName, cb) { - rule.walkDecls(declName, decl => { - let vals = decl.value.split(/\s+/); - - cb(vals[0], vals[1]); - decl.remove(); - }); -} - -function fetchParams(rule, declName) { - let params = Object.assign({}, DEFAULT_PARAMS[declName]), - rangeDecl; - - // Fetch params from shorthand declName, i.e., font-size or line-height, etc - fetchResponsiveSizes(rule, declName, (minSize, maxSize) => { - params.minSize = minSize; - params.maxSize = maxSize; - }); - - // Fetch params from shorthand font-range or line-height-range - fetchRangeSizes(rule, PARAM_RANGE[declName], (minSize, maxSize) => { - params.minWidth = minSize; - params.maxWidth = maxSize; - }); - - // Fetch parameters from expanded properties - rangeDecl = PARAM_DECLS[declName]; - - Object.keys(rangeDecl).forEach(param => { - rule.walkDecls(rangeDecl[param], decl => { - params[param] = decl.value.trim(); - decl.remove(); + + }; + + /** + * Build new responsive type rules + * @param {object} rule old CSS rule + * @param {object} newRules object to store new CSS rules + * @return {object} object of new CSS rules + */ + var buildRules = function(rule, newRules) { + + // Build the responsive decleration + var sizeDiff = parseFloat(params.maxSize) - parseFloat(params.minSize), + widthDiff = parseFloat(params.maxWidth) - parseFloat(params.minWidth); + + newRules.responsive = 'calc(' + params.minSize + ' + ' + sizeDiff.toString() + ' * ((100vw - ' + params.minWidth + ') / ' + widthDiff.toString() + '))'; + + // Build the media queries + newRules.minMedia = postcss.atRule({ + name: 'media', + params: 'screen and (max-width: ' + params.minWidth + ')', + before: '\n' }); - }); - - return params; -} - -/** - * Build new responsive type rules - * @param {object} rule old CSS rule - * @return {object} object of new CSS rules - */ -function buildRules(rule, declName, params, result) { - let rules = {}, - minSize = params.minSize, - maxSize = params.maxSize, - minWidth, - maxWidth, - sizeUnit = getUnit(params.minSize), - maxSizeUnit = getUnit(params.maxSize), - widthUnit = getUnit(params.minWidth), - maxWidthUnit = getUnit(params.maxWidth), - sizeDiff, - rangeDiff; - - if (sizeUnit === null) { - throw rule.error('sizes with unitless values are not supported'); - } - - if (sizeUnit !== maxSizeUnit && widthUnit !== maxWidthUnit) { - rule.warn(result, 'min/max unit types must match'); - } - - if (sizeUnit === 'rem' && widthUnit === 'px') { - minWidth = pxToRem(params.minWidth); - maxWidth = pxToRem(params.maxWidth); - } else if (sizeUnit === widthUnit || sizeUnit === 'rem' && widthUnit === 'em') { - minWidth = params.minWidth; - maxWidth = params.maxWidth; - } else { - rule.warn(result, 'this combination of units is not supported'); - } - - // Build the responsive type decleration - sizeDiff = parseFloat(maxSize) - parseFloat(minSize); - rangeDiff = parseFloat(maxWidth) - parseFloat(minWidth); - - rules.responsive = 'calc(' + minSize + ' + ' + sizeDiff + ' * ((100vw - ' + minWidth + ') / ' + rangeDiff + '))'; - - // Build the media queries - rules.minMedia = postcss.atRule({ - name: 'media', - params: 'screen and (max-width: ' + params.minWidth + ')' - }); - - rules.maxMedia = postcss.atRule({ - name: 'media', - params: 'screen and (min-width: ' + params.maxWidth + ')' - }); - - // Add the required content to new media queries - rules.minMedia.append({ - selector: rule.selector - }).walkRules(selector => { - selector.append({ - prop: declName, - value: params.minSize + + newRules.maxMedia = postcss.atRule({ + name: 'media', + params: 'screen and (min-width: ' + params.maxWidth + ')', + before: '\n' }); - }); - - rules.maxMedia.append({ - selector: rule.selector - }).walkRules(selector => { - selector.append({ - prop: declName, - value: params.maxSize + + // Add the required content to new media queries + newRules.minMedia.append({ + selector: rule.selector + }).eachRule(function(selector){ + selector.append({ + prop: 'font-size', + value: params.minSize + }); + }); + + newRules.maxMedia.append({ + selector: rule.selector + }).eachRule(function(selector){ + selector.append({ + prop: 'font-size', + value: params.maxSize + }); }); - }); - - return rules; -} - -const plugin = () => ({ - postcssPlugin: 'postcss-responsive-type', - Once(root, { result }) { - root.walkRules(function (rule) { - let thisRule, newRules; - - // Check root font-size (for rem units) - if (rule.selector.indexOf('html') > -1) { - rule.walkDecls('font-size', decl => { - if (decl.value.indexOf('px') > -1) { - rootSize = decl.value; - } - }); - } - rule.walkDecls(/^(font-size|line-height|letter-spacing)$/, decl => { - let params; + return newRules; + }; - // If decl doesn't contain responsve keyword, exit - if (decl.value.indexOf('responsive') === -1) { + // Do it! + return function (css) { + css.eachRule(function(rule){ + + var thisRule, + newRules = {}; + + rule.eachDecl('font-size', function(decl){ + + // If rule doesn't contain responsve keyword, exit + if (!decl.value.indexOf('responsive') > -1) { return; } + // Otherwise store the rul in a var thisRule = decl.parent; - params = fetchParams(thisRule, decl.prop); - newRules = buildRules(thisRule, decl.prop, params, result); - // Insert the base responsive decleration + }); + + fetchParams(rule); + + buildRules(rule, newRules); + + // Insert the base responsive decleration + rule.eachDecl('font-size', function(decl){ if (decl.value.indexOf('responsive') > -1) { - decl.replaceWith({ prop: decl.prop, value: newRules.responsive }); + decl.replaceWith({prop: decl.prop, value: newRules.responsive }); } - - // Insert the media queries - thisRule.parent.insertAfter(thisRule, newRules.minMedia); - thisRule.parent.insertAfter(thisRule, newRules.maxMedia); }); - }); - } -}); -plugin.postcss = true; + // Insert the media queries + rule.parent.insertAfter(thisRule, newRules.minMedia); + rule.parent.insertAfter(newRules.minMedia, newRules.maxMedia); + + }); + }; -module.exports = plugin; \ No newline at end of file +}); diff --git a/package.json b/package.json index 963a06c..75bec03 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "postcss-responsive-type", - "version": "1.0.0", + "version": "0.1.0", "description": "PostCSS plugin that adds responsive magic to font-size", "keywords": [ "postcss", @@ -25,17 +25,16 @@ "url": "https://github.com/seaneking/postcss-responsive-type/issues" }, "homepage": "https://github.com/seaneking/postcss-responsive-type", - "devDependencies": { - "chai": "^4.0.2", - "eslint": "^4.1.1", - "mocha": "^3.4.2", - "postcss": "^8.4.6" + "dependencies": { + "postcss": "^4.1.9" }, - "peerDependencies": { - "postcss": "^8.4.6" + "devDependencies": { + "gulp-eslint": "^0.12.0", + "gulp-mocha": "^2.0.1", + "chai": "^2.3.0", + "gulp": "^3.8.11" }, "scripts": { - "test": "mocha test", - "posttest": "eslint ." + "test": "gulp check" } } diff --git a/test/fixtures/custom.expected.css b/test/fixtures/custom.expected.css index e4569d0..c90cab6 100644 --- a/test/fixtures/custom.expected.css +++ b/test/fixtures/custom.expected.css @@ -1,13 +1,13 @@ -.foo { - font-size: calc(10px + 20 * ((100vw - 300px) / 600)); -} -@media screen and (min-width: 900px) { + +@media screen and (max-width: 300px) { .foo { - font-size: 30px; + font-size: 10px; } } -@media screen and (max-width: 300px) { +@media screen and (min-width: 900px) { .foo { - font-size: 10px; + font-size: 30px; } +}.foo { + font-size: calc(10px + 20 * ((100vw - 300px) / 600)); } diff --git a/test/fixtures/default.css b/test/fixtures/default.css index a696588..16bfcf2 100644 --- a/test/fixtures/default.css +++ b/test/fixtures/default.css @@ -1,7 +1,3 @@ .foo { font-size: responsive; } - -.bar { - foo: bar; -} diff --git a/test/fixtures/default.expected.css b/test/fixtures/default.expected.css index ae59477..0158549 100644 --- a/test/fixtures/default.expected.css +++ b/test/fixtures/default.expected.css @@ -1,21 +1,13 @@ -.foo { - font-size: calc(12px + 9 * ((100vw - 420px) / 860)); -} - -@media screen and (min-width: 1280px) { - - .foo { - font-size: 21px; - } -} @media screen and (max-width: 420px) { - .foo { font-size: 12px; } } - -.bar { - foo: bar; +@media screen and (min-width: 1280px) { + .foo { + font-size: 21px; + } +}.foo { + font-size: calc(12px + 9 * ((100vw - 420px) / 860)); } diff --git a/test/fixtures/em.css b/test/fixtures/em.css deleted file mode 100644 index 57a4f60..0000000 --- a/test/fixtures/em.css +++ /dev/null @@ -1,4 +0,0 @@ -.foo { - font-size: responsive 1em 3em; - font-range: 20em 45em; -} diff --git a/test/fixtures/em.expected.css b/test/fixtures/em.expected.css deleted file mode 100644 index 73e62f9..0000000 --- a/test/fixtures/em.expected.css +++ /dev/null @@ -1,13 +0,0 @@ -.foo { - font-size: calc(1em + 2 * ((100vw - 20em) / 25)); -} -@media screen and (min-width: 45em) { - .foo { - font-size: 3em; - } -} -@media screen and (max-width: 20em) { - .foo { - font-size: 1em; - } -} diff --git a/test/fixtures/fallback.expected.css b/test/fixtures/fallback.expected.css index 61d5a6a..4567af4 100644 --- a/test/fixtures/fallback.expected.css +++ b/test/fixtures/fallback.expected.css @@ -1,14 +1,14 @@ -.foo { - font-size: 16px; - font-size: calc(12px + 9 * ((100vw - 420px) / 860)); -} -@media screen and (min-width: 1280px) { + +@media screen and (max-width: 420px) { .foo { - font-size: 21px; + font-size: 12px; } } -@media screen and (max-width: 420px) { +@media screen and (min-width: 1280px) { .foo { - font-size: 12px; + font-size: 21px; } +}.foo { + font-size: 16px; + font-size: calc(12px + 9 * ((100vw - 420px) / 860)); } diff --git a/test/fixtures/formatting.css b/test/fixtures/formatting.css deleted file mode 100644 index 104954b..0000000 --- a/test/fixtures/formatting.css +++ /dev/null @@ -1,5 +0,0 @@ -.foo { - font-size:responsive 10px 30px ; - lower-font-range: 300px ; - upper-font-range:900px; -} diff --git a/test/fixtures/formatting.expected.css b/test/fixtures/formatting.expected.css deleted file mode 100644 index e4569d0..0000000 --- a/test/fixtures/formatting.expected.css +++ /dev/null @@ -1,13 +0,0 @@ -.foo { - font-size: calc(10px + 20 * ((100vw - 300px) / 600)); -} -@media screen and (min-width: 900px) { - .foo { - font-size: 30px; - } -} -@media screen and (max-width: 300px) { - .foo { - font-size: 10px; - } -} diff --git a/test/fixtures/letterspacing.css b/test/fixtures/letterspacing.css deleted file mode 100644 index 65118af..0000000 --- a/test/fixtures/letterspacing.css +++ /dev/null @@ -1,4 +0,0 @@ -.foo { - letter-spacing: responsive 10px 30px; - letter-spacing-range: 300px 900px; -} diff --git a/test/fixtures/letterspacing.expected.css b/test/fixtures/letterspacing.expected.css deleted file mode 100644 index 7ce0127..0000000 --- a/test/fixtures/letterspacing.expected.css +++ /dev/null @@ -1,13 +0,0 @@ -.foo { - letter-spacing: calc(10px + 20 * ((100vw - 300px) / 600)); -} -@media screen and (min-width: 900px) { - .foo { - letter-spacing: 30px; - } -} -@media screen and (max-width: 300px) { - .foo { - letter-spacing: 10px; - } -} diff --git a/test/fixtures/letterspacing_extended.css b/test/fixtures/letterspacing_extended.css deleted file mode 100644 index 6b245ff..0000000 --- a/test/fixtures/letterspacing_extended.css +++ /dev/null @@ -1,6 +0,0 @@ -.foo { - letter-spacing: responsive; - min-letter-spacing: 10px; - max-letter-spacing: 30px; - letter-spacing-range: 300px 900px; -} diff --git a/test/fixtures/letterspacing_extended.expected.css b/test/fixtures/letterspacing_extended.expected.css deleted file mode 100644 index 7ce0127..0000000 --- a/test/fixtures/letterspacing_extended.expected.css +++ /dev/null @@ -1,13 +0,0 @@ -.foo { - letter-spacing: calc(10px + 20 * ((100vw - 300px) / 600)); -} -@media screen and (min-width: 900px) { - .foo { - letter-spacing: 30px; - } -} -@media screen and (max-width: 300px) { - .foo { - letter-spacing: 10px; - } -} diff --git a/test/fixtures/letterspacing_negative.css b/test/fixtures/letterspacing_negative.css deleted file mode 100644 index bed90c6..0000000 --- a/test/fixtures/letterspacing_negative.css +++ /dev/null @@ -1,4 +0,0 @@ -.foo { - letter-spacing: responsive -10px -30px; - letter-spacing-range: 300px 900px; -} diff --git a/test/fixtures/letterspacing_negative.expected.css b/test/fixtures/letterspacing_negative.expected.css deleted file mode 100644 index 9e3511b..0000000 --- a/test/fixtures/letterspacing_negative.expected.css +++ /dev/null @@ -1,13 +0,0 @@ -.foo { - letter-spacing: calc(-10px + -20 * ((100vw - 300px) / 600)); -} -@media screen and (min-width: 900px) { - .foo { - letter-spacing: -30px; - } -} -@media screen and (max-width: 300px) { - .foo { - letter-spacing: -10px; - } -} diff --git a/test/fixtures/lineheight.css b/test/fixtures/lineheight.css deleted file mode 100644 index 188376d..0000000 --- a/test/fixtures/lineheight.css +++ /dev/null @@ -1,4 +0,0 @@ -.foo { - line-height: responsive 10px 30px; - line-height-range: 300px 900px; -} diff --git a/test/fixtures/lineheight.expected.css b/test/fixtures/lineheight.expected.css deleted file mode 100644 index 368dcb5..0000000 --- a/test/fixtures/lineheight.expected.css +++ /dev/null @@ -1,13 +0,0 @@ -.foo { - line-height: calc(10px + 20 * ((100vw - 300px) / 600)); -} -@media screen and (min-width: 900px) { - .foo { - line-height: 30px; - } -} -@media screen and (max-width: 300px) { - .foo { - line-height: 10px; - } -} diff --git a/test/fixtures/lineheight_extended.css b/test/fixtures/lineheight_extended.css deleted file mode 100644 index c87d2c2..0000000 --- a/test/fixtures/lineheight_extended.css +++ /dev/null @@ -1,6 +0,0 @@ -.foo { - line-height: responsive; - min-line-height: 10px; - max-line-height: 30px; - line-height-range: 300px 900px; -} diff --git a/test/fixtures/lineheight_extended.expected.css b/test/fixtures/lineheight_extended.expected.css deleted file mode 100644 index 368dcb5..0000000 --- a/test/fixtures/lineheight_extended.expected.css +++ /dev/null @@ -1,13 +0,0 @@ -.foo { - line-height: calc(10px + 20 * ((100vw - 300px) / 600)); -} -@media screen and (min-width: 900px) { - .foo { - line-height: 30px; - } -} -@media screen and (max-width: 300px) { - .foo { - line-height: 10px; - } -} diff --git a/test/fixtures/mixed.css b/test/fixtures/mixed.css deleted file mode 100644 index 129c658..0000000 --- a/test/fixtures/mixed.css +++ /dev/null @@ -1,14 +0,0 @@ -.foo { - font-size: responsive 1rem 3rem; - font-range: 420px 1280px; -} - -.bar { - font-size: responsive 1rem 3rem; - font-range: 20em 60em; -} - -.baz { - font-size: responsive 1em 3em; - font-range: 420px 1280px; -} diff --git a/test/fixtures/mixed.expected.css b/test/fixtures/mixed.expected.css deleted file mode 100644 index 97a2be7..0000000 --- a/test/fixtures/mixed.expected.css +++ /dev/null @@ -1,53 +0,0 @@ -.foo { - font-size: calc(1rem + 2 * ((100vw - 26.25rem) / 53.75)); -} - -@media screen and (min-width: 1280px) { - - .foo { - font-size: 3rem; - } -} - -@media screen and (max-width: 420px) { - - .foo { - font-size: 1rem; - } -} - -.bar { - font-size: calc(1rem + 2 * ((100vw - 20em) / 40)); -} - -@media screen and (min-width: 60em) { - - .bar { - font-size: 3rem; - } -} - -@media screen and (max-width: 20em) { - - .bar { - font-size: 1rem; - } -} - -.baz { - font-size: calc(1em + 2 * ((100vw - undefined) / NaN)); -} - -@media screen and (min-width: 1280px) { - - .baz { - font-size: 3em; - } -} - -@media screen and (max-width: 420px) { - - .baz { - font-size: 1em; - } -} diff --git a/test/fixtures/rem.css b/test/fixtures/rem.css new file mode 100644 index 0000000..048d9db --- /dev/null +++ b/test/fixtures/rem.css @@ -0,0 +1,7 @@ +html { + font-size: 10px; +} + +.foo { + font-size: responsive 1.2rem 2.1rem; +} diff --git a/test/fixtures/root.expected.css b/test/fixtures/rem.expected.css similarity index 55% rename from test/fixtures/root.expected.css rename to test/fixtures/rem.expected.css index e5cd1a8..8e2a7bb 100644 --- a/test/fixtures/root.expected.css +++ b/test/fixtures/rem.expected.css @@ -3,19 +3,17 @@ html { } .foo { - font-size: calc(1.6rem + 3.1999999999999997 * ((100vw - 42rem) / 86)); + font-size: calc(1.2rem + 9 * ((100vw - 420px) / 860)); } -@media screen and (min-width: 1280px) { - +@media screen and (max-width: 420px) { .foo { - font-size: 4.8rem; + font-size: 1.2rem; } } -@media screen and (max-width: 420px) { - +@media screen and (min-width: 1280px) { .foo { - font-size: 1.6rem; + font-size: 2.1rem; } } diff --git a/test/fixtures/root.css b/test/fixtures/root.css deleted file mode 100644 index 46569b4..0000000 --- a/test/fixtures/root.css +++ /dev/null @@ -1,8 +0,0 @@ -html { - font-size: 10px; -} - -.foo { - font-size: responsive 1.6rem 4.8rem; - font-range: 420px 1280px; -} diff --git a/test/fixtures/shorthand.expected.css b/test/fixtures/shorthand.expected.css index e4569d0..c90cab6 100644 --- a/test/fixtures/shorthand.expected.css +++ b/test/fixtures/shorthand.expected.css @@ -1,13 +1,13 @@ -.foo { - font-size: calc(10px + 20 * ((100vw - 300px) / 600)); -} -@media screen and (min-width: 900px) { + +@media screen and (max-width: 300px) { .foo { - font-size: 30px; + font-size: 10px; } } -@media screen and (max-width: 300px) { +@media screen and (min-width: 900px) { .foo { - font-size: 10px; + font-size: 30px; } +}.foo { + font-size: calc(10px + 20 * ((100vw - 300px) / 600)); } diff --git a/test/fixtures/unitless_lineheight.css b/test/fixtures/unitless_lineheight.css deleted file mode 100644 index 2c958d0..0000000 --- a/test/fixtures/unitless_lineheight.css +++ /dev/null @@ -1,3 +0,0 @@ -.foo { - line-height: responsive 1.5 2; -} diff --git a/test/fixtures/unitless_lineheight.expected.css b/test/fixtures/unitless_lineheight.expected.css deleted file mode 100644 index 8a84350..0000000 --- a/test/fixtures/unitless_lineheight.expected.css +++ /dev/null @@ -1,13 +0,0 @@ -.foo { - line-height: calc(1.5 + 0.5 * ((100vw - undefined) / NaN)); -} -@media screen and (min-width: 1280px) { - .foo { - line-height: 2; - } -} -@media screen and (max-width: 420px) { - .foo { - line-height: 1.5; - } -} diff --git a/test/mocha.opts b/test/mocha.opts deleted file mode 100644 index d9a95e8..0000000 --- a/test/mocha.opts +++ /dev/null @@ -1 +0,0 @@ ---reporter nyan diff --git a/test/test.js b/test/test.js index 57087fa..89ceab5 100644 --- a/test/test.js +++ b/test/test.js @@ -1,17 +1,14 @@ +/*eslint no-unused-expressions: 0, block-scoped-var: 0, no-undef: 0*/ 'use strict'; -const postcss = require('postcss'); -const expect = require('chai').expect; -const fs = require('fs'); -const path = require('path'); -const plugin = require('../'); +var postcss = require('postcss'), + expect = require('chai').expect, + fs = require('fs'), + path = require('path'), + plugin = require('../'); -function compareWarnings(warnings, expected) { - warnings.forEach((warning, i) => expect(warning).to.contain(expected[i])); -} - -function test(fixture, opts, warnings, done) { - let input = fixture + '.css', +var test = function (fixture, opts, done) { + var input = fixture + '.css', expected = fixture + '.expected.css'; input = fs.readFileSync(path.join(__dirname, 'fixtures', input), 'utf8'); @@ -19,70 +16,36 @@ function test(fixture, opts, warnings, done) { postcss([ plugin(opts) ]) .process(input) - .then(result => { + .then(function (result) { expect(result.css).to.eql(expected); - - if (warnings.length > 0) { - compareWarnings(result.warnings(), warnings); - } else { - expect(result.warnings()).to.be.empty; - } - - done(); - }).catch(done); -} - -describe('postcss-responsive-type', () => { - - it('builds responsive type with defaults', done => test('default', {}, [], done)); - - it('applies custom parameters', done => test('custom', {}, [], done)); - - it('works with shorthand properties', done => test('shorthand', {}, [], done)); - - it('handles mixed units', done => { - test('mixed', {}, [{ - type: 'warning', - text: 'this combination of units is not supported', - line: 11, - column: 1 - }], done); + expect(result.warnings()).to.be.empty; + done(); + }).catch(function (error) { + done(error); }); - it('handles em units', done => test('em', {}, [], done)); +}; - it('properly calculates rem from root font size', done => test('root', {}, [], done)); +describe('postcss-responsive-type', function () { - it('doesn\'t kill fallbacks/duplicate properties', done => test('fallback', {}, [], done)); - - it('sanitizes inputs', done => test('formatting', {}, [], done)); - - describe('line height', () => { - it('sets responsive line-height', done => test('lineheight', {}, [], done)); - - it('sets responsive line-height with extended syntax', done => test('lineheight_extended', {}, [], done)); - - it('warns about responsive unitless line-height', done => { - test('unitless_lineheight', {}, [], error => { - expect(error).to.contain({ - name: 'CssSyntaxError', - reason: 'sizes with unitless values are not supported', - plugin: 'postcss-responsive-type', - source: '.foo {\n line-height: responsive 1.5 2;\n}\n', - line: 1, - column: 1 - }); + it('builds responsive type with defaults', function (done) { + test('default', {}, done); + }); - done(); - }); - }); + it('applies custom parameters', function (done) { + test('custom', {}, done); }); - describe('letterspacing', () => { - it('sets responsive letterspacing', done => test('letterspacing', {}, [], done)); + it('works with shorthand properties', function (done) { + test('shorthand', {}, done); + }); - it('sets responsive letterspacing with extended syntax', done => test('letterspacing_extended', {}, [], done)); + it('doesn\'t kill fallbacks/duplicate properties', function (done) { + test('fallback', {}, done); + }); - it('sets responsive letterspacing with negative values', done => test('letterspacing_negative', {}, [], done)); + it('works with rem units', function (done) { + test('rem', {}, done); }); + }); diff --git a/yarn.lock b/yarn.lock deleted file mode 100644 index eeb9c2a..0000000 --- a/yarn.lock +++ /dev/null @@ -1,972 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -acorn-jsx@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-3.0.1.tgz#afdf9488fb1ecefc8348f6fb22f464e32a58b36b" - dependencies: - acorn "^3.0.4" - -acorn@^3.0.4: - version "3.3.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-3.3.0.tgz#45e37fb39e8da3f25baee3ff5369e2bb5f22017a" - -acorn@^5.0.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.1.1.tgz#53fe161111f912ab999ee887a90a0bc52822fd75" - -ajv-keywords@^1.0.0: - version "1.5.1" - resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-1.5.1.tgz#314dd0a4b3368fad3dfcdc54ede6171b886daf3c" - -ajv@^4.7.0: - version "4.11.8" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.11.8.tgz#82ffb02b29e662ae53bdc20af15947706739c536" - dependencies: - co "^4.6.0" - json-stable-stringify "^1.0.1" - -ajv@^5.2.0: - version "5.2.2" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-5.2.2.tgz#47c68d69e86f5d953103b0074a9430dc63da5e39" - dependencies: - co "^4.6.0" - fast-deep-equal "^1.0.0" - json-schema-traverse "^0.3.0" - json-stable-stringify "^1.0.1" - -ansi-escapes@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-2.0.0.tgz#5bae52be424878dd9783e8910e3fc2922e83c81b" - -ansi-regex@^2.0.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" - -ansi-regex@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" - -ansi-styles@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" - -ansi-styles@^3.1.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.0.tgz#c159b8d5be0f9e5a6f346dab94f16ce022161b88" - dependencies: - color-convert "^1.9.0" - -argparse@^1.0.7: - version "1.0.9" - resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.9.tgz#73d83bc263f86e97f8cc4f6bae1b0e90a7d22c86" - dependencies: - sprintf-js "~1.0.2" - -array-union@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39" - dependencies: - array-uniq "^1.0.1" - -array-uniq@^1.0.1: - version "1.0.3" - resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" - -arrify@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" - -assertion-error@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.0.2.tgz#13ca515d86206da0bac66e834dd397d87581094c" - -babel-code-frame@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.22.0.tgz#027620bee567a88c32561574e7fd0801d33118e4" - dependencies: - chalk "^1.1.0" - esutils "^2.0.2" - js-tokens "^3.0.0" - -balanced-match@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" - -brace-expansion@^1.1.7: - version "1.1.8" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.8.tgz#c07b211c7c952ec1f8efd51a77ef0d1d3990a292" - dependencies: - balanced-match "^1.0.0" - concat-map "0.0.1" - -browser-stdout@1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.0.tgz#f351d32969d32fa5d7a5567154263d928ae3bd1f" - -caller-path@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/caller-path/-/caller-path-0.1.0.tgz#94085ef63581ecd3daa92444a8fe94e82577751f" - dependencies: - callsites "^0.2.0" - -callsites@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/callsites/-/callsites-0.2.0.tgz#afab96262910a7f33c19a5775825c69f34e350ca" - -chai@^4.0.2: - version "4.1.1" - resolved "https://registry.yarnpkg.com/chai/-/chai-4.1.1.tgz#66e21279e6f3c6415ff8231878227900e2171b39" - dependencies: - assertion-error "^1.0.1" - check-error "^1.0.1" - deep-eql "^2.0.1" - get-func-name "^2.0.0" - pathval "^1.0.0" - type-detect "^4.0.0" - -chalk@^1.1.0, chalk@^1.1.1, chalk@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" - dependencies: - ansi-styles "^2.2.1" - escape-string-regexp "^1.0.2" - has-ansi "^2.0.0" - strip-ansi "^3.0.0" - supports-color "^2.0.0" - -chalk@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.0.1.tgz#dbec49436d2ae15f536114e76d14656cdbc0f44d" - dependencies: - ansi-styles "^3.1.0" - escape-string-regexp "^1.0.5" - supports-color "^4.0.0" - -check-error@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82" - -circular-json@^0.3.1: - version "0.3.3" - resolved "https://registry.yarnpkg.com/circular-json/-/circular-json-0.3.3.tgz#815c99ea84f6809529d2f45791bdf82711352d66" - -cli-cursor@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5" - dependencies: - restore-cursor "^2.0.0" - -cli-width@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.1.0.tgz#b234ca209b29ef66fc518d9b98d5847b00edf00a" - -co@^4.6.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" - -color-convert@^1.9.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.0.tgz#1accf97dd739b983bf994d56fec8f95853641b7a" - dependencies: - color-name "^1.1.1" - -color-name@^1.1.1: - version "1.1.3" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" - -commander@2.9.0: - version "2.9.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.9.0.tgz#9c99094176e12240cb22d6c5146098400fe0f7d4" - dependencies: - graceful-readlink ">= 1.0.0" - -concat-map@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" - -concat-stream@^1.6.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.0.tgz#0aac662fd52be78964d5532f694784e70110acf7" - dependencies: - inherits "^2.0.3" - readable-stream "^2.2.2" - typedarray "^0.0.6" - -core-util-is@~1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" - -cross-spawn@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" - dependencies: - lru-cache "^4.0.1" - shebang-command "^1.2.0" - which "^1.2.9" - -debug@2.6.8, debug@^2.6.8: - version "2.6.8" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.8.tgz#e731531ca2ede27d188222427da17821d68ff4fc" - dependencies: - ms "2.0.0" - -deep-eql@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-2.0.2.tgz#b1bac06e56f0a76777686d50c9feb75c2ed7679a" - dependencies: - type-detect "^3.0.0" - -deep-is@~0.1.3: - version "0.1.3" - resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" - -del@^2.0.2: - version "2.2.2" - resolved "https://registry.yarnpkg.com/del/-/del-2.2.2.tgz#c12c981d067846c84bcaf862cff930d907ffd1a8" - dependencies: - globby "^5.0.0" - is-path-cwd "^1.0.0" - is-path-in-cwd "^1.0.0" - object-assign "^4.0.1" - pify "^2.0.0" - pinkie-promise "^2.0.0" - rimraf "^2.2.8" - -diff@3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/diff/-/diff-3.2.0.tgz#c9ce393a4b7cbd0b058a725c93df299027868ff9" - -doctrine@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.0.0.tgz#c73d8d2909d22291e1a007a395804da8b665fe63" - dependencies: - esutils "^2.0.2" - isarray "^1.0.0" - -escape-string-regexp@1.0.5, escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" - -eslint-scope@^3.7.1: - version "3.7.1" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-3.7.1.tgz#3d63c3edfda02e06e01a452ad88caacc7cdcb6e8" - dependencies: - esrecurse "^4.1.0" - estraverse "^4.1.1" - -eslint@^4.1.1: - version "4.3.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-4.3.0.tgz#fcd7c96376bbf34c85ee67ed0012a299642b108f" - dependencies: - ajv "^5.2.0" - babel-code-frame "^6.22.0" - chalk "^1.1.3" - concat-stream "^1.6.0" - cross-spawn "^5.1.0" - debug "^2.6.8" - doctrine "^2.0.0" - eslint-scope "^3.7.1" - espree "^3.4.3" - esquery "^1.0.0" - estraverse "^4.2.0" - esutils "^2.0.2" - file-entry-cache "^2.0.0" - functional-red-black-tree "^1.0.1" - glob "^7.1.2" - globals "^9.17.0" - ignore "^3.3.3" - imurmurhash "^0.1.4" - inquirer "^3.0.6" - is-resolvable "^1.0.0" - js-yaml "^3.8.4" - json-stable-stringify "^1.0.1" - levn "^0.3.0" - lodash "^4.17.4" - minimatch "^3.0.2" - mkdirp "^0.5.1" - natural-compare "^1.4.0" - optionator "^0.8.2" - path-is-inside "^1.0.2" - pluralize "^4.0.0" - progress "^2.0.0" - require-uncached "^1.0.3" - semver "^5.3.0" - strip-json-comments "~2.0.1" - table "^4.0.1" - text-table "~0.2.0" - -espree@^3.4.3: - version "3.4.3" - resolved "https://registry.yarnpkg.com/espree/-/espree-3.4.3.tgz#2910b5ccd49ce893c2ffffaab4fd8b3a31b82374" - dependencies: - acorn "^5.0.1" - acorn-jsx "^3.0.0" - -esprima@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.0.tgz#4499eddcd1110e0b218bacf2fa7f7f59f55ca804" - -esquery@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.0.0.tgz#cfba8b57d7fba93f17298a8a006a04cda13d80fa" - dependencies: - estraverse "^4.0.0" - -esrecurse@^4.1.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.2.0.tgz#fa9568d98d3823f9a41d91e902dcab9ea6e5b163" - dependencies: - estraverse "^4.1.0" - object-assign "^4.0.1" - -estraverse@^4.0.0, estraverse@^4.1.0, estraverse@^4.1.1, estraverse@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13" - -esutils@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" - -external-editor@^2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-2.0.4.tgz#1ed9199da9cbfe2ef2f7a31b2fde8b0d12368972" - dependencies: - iconv-lite "^0.4.17" - jschardet "^1.4.2" - tmp "^0.0.31" - -fast-deep-equal@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-1.0.0.tgz#96256a3bc975595eb36d82e9929d060d893439ff" - -fast-levenshtein@~2.0.4: - version "2.0.6" - resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" - -figures@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/figures/-/figures-2.0.0.tgz#3ab1a2d2a62c8bfb431a0c94cb797a2fce27c962" - dependencies: - escape-string-regexp "^1.0.5" - -file-entry-cache@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-2.0.0.tgz#c392990c3e684783d838b8c84a45d8a048458361" - dependencies: - flat-cache "^1.2.1" - object-assign "^4.0.1" - -flat-cache@^1.2.1: - version "1.2.2" - resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-1.2.2.tgz#fa86714e72c21db88601761ecf2f555d1abc6b96" - dependencies: - circular-json "^0.3.1" - del "^2.0.2" - graceful-fs "^4.1.2" - write "^0.2.1" - -fs.realpath@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" - -functional-red-black-tree@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" - -get-func-name@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.0.tgz#ead774abee72e20409433a066366023dd6887a41" - -glob@7.1.1: - version "7.1.1" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.1.tgz#805211df04faaf1c63a3600306cdf5ade50b2ec8" - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.2" - once "^1.3.0" - path-is-absolute "^1.0.0" - -glob@^7.0.3, glob@^7.0.5, glob@^7.1.2: - version "7.1.2" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.4" - once "^1.3.0" - path-is-absolute "^1.0.0" - -globals@^9.17.0: - version "9.18.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a" - -globby@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/globby/-/globby-5.0.0.tgz#ebd84667ca0dbb330b99bcfc68eac2bc54370e0d" - dependencies: - array-union "^1.0.1" - arrify "^1.0.0" - glob "^7.0.3" - object-assign "^4.0.1" - pify "^2.0.0" - pinkie-promise "^2.0.0" - -graceful-fs@^4.1.2: - version "4.1.11" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" - -"graceful-readlink@>= 1.0.0": - version "1.0.1" - resolved "https://registry.yarnpkg.com/graceful-readlink/-/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725" - -growl@1.9.2: - version "1.9.2" - resolved "https://registry.yarnpkg.com/growl/-/growl-1.9.2.tgz#0ea7743715db8d8de2c5ede1775e1b45ac85c02f" - -has-ansi@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" - dependencies: - ansi-regex "^2.0.0" - -has-flag@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" - -has-flag@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-2.0.0.tgz#e8207af1cc7b30d446cc70b734b5e8be18f88d51" - -iconv-lite@^0.4.17: - version "0.4.18" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.18.tgz#23d8656b16aae6742ac29732ea8f0336a4789cf2" - -ignore@^3.3.3: - version "3.3.3" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.3.tgz#432352e57accd87ab3110e82d3fea0e47812156d" - -imurmurhash@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" - -inflight@^1.0.4: - version "1.0.6" - resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" - dependencies: - once "^1.3.0" - wrappy "1" - -inherits@2, inherits@^2.0.3, inherits@~2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" - -inquirer@^3.0.6: - version "3.2.1" - resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-3.2.1.tgz#06ceb0f540f45ca548c17d6840959878265fa175" - dependencies: - ansi-escapes "^2.0.0" - chalk "^2.0.0" - cli-cursor "^2.1.0" - cli-width "^2.0.0" - external-editor "^2.0.4" - figures "^2.0.0" - lodash "^4.3.0" - mute-stream "0.0.7" - run-async "^2.2.0" - rx-lite "^4.0.8" - rx-lite-aggregates "^4.0.8" - string-width "^2.1.0" - strip-ansi "^4.0.0" - through "^2.3.6" - -is-fullwidth-code-point@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" - -is-path-cwd@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-1.0.0.tgz#d225ec23132e89edd38fda767472e62e65f1106d" - -is-path-in-cwd@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-path-in-cwd/-/is-path-in-cwd-1.0.0.tgz#6477582b8214d602346094567003be8a9eac04dc" - dependencies: - is-path-inside "^1.0.0" - -is-path-inside@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-1.0.0.tgz#fc06e5a1683fbda13de667aff717bbc10a48f37f" - dependencies: - path-is-inside "^1.0.1" - -is-promise@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.1.0.tgz#79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa" - -is-resolvable@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-resolvable/-/is-resolvable-1.0.0.tgz#8df57c61ea2e3c501408d100fb013cf8d6e0cc62" - dependencies: - tryit "^1.0.1" - -isarray@^1.0.0, isarray@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" - -isexe@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" - -js-tokens@^3.0.0: - version "3.0.2" - resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" - -js-yaml@^3.8.4: - version "3.9.1" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.9.1.tgz#08775cebdfdd359209f0d2acd383c8f86a6904a0" - dependencies: - argparse "^1.0.7" - esprima "^4.0.0" - -jschardet@^1.4.2: - version "1.5.0" - resolved "https://registry.yarnpkg.com/jschardet/-/jschardet-1.5.0.tgz#a61f310306a5a71188e1b1acd08add3cfbb08b1e" - -json-schema-traverse@^0.3.0: - version "0.3.1" - resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz#349a6d44c53a51de89b40805c5d5e59b417d3340" - -json-stable-stringify@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af" - dependencies: - jsonify "~0.0.0" - -json3@3.3.2: - version "3.3.2" - resolved "https://registry.yarnpkg.com/json3/-/json3-3.3.2.tgz#3c0434743df93e2f5c42aee7b19bcb483575f4e1" - -jsonify@~0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" - -levn@^0.3.0, levn@~0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" - dependencies: - prelude-ls "~1.1.2" - type-check "~0.3.2" - -lodash._baseassign@^3.0.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/lodash._baseassign/-/lodash._baseassign-3.2.0.tgz#8c38a099500f215ad09e59f1722fd0c52bfe0a4e" - dependencies: - lodash._basecopy "^3.0.0" - lodash.keys "^3.0.0" - -lodash._basecopy@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz#8da0e6a876cf344c0ad8a54882111dd3c5c7ca36" - -lodash._basecreate@^3.0.0: - version "3.0.3" - resolved "https://registry.yarnpkg.com/lodash._basecreate/-/lodash._basecreate-3.0.3.tgz#1bc661614daa7fc311b7d03bf16806a0213cf821" - -lodash._getnative@^3.0.0: - version "3.9.1" - resolved "https://registry.yarnpkg.com/lodash._getnative/-/lodash._getnative-3.9.1.tgz#570bc7dede46d61cdcde687d65d3eecbaa3aaff5" - -lodash._isiterateecall@^3.0.0: - version "3.0.9" - resolved "https://registry.yarnpkg.com/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz#5203ad7ba425fae842460e696db9cf3e6aac057c" - -lodash.create@3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/lodash.create/-/lodash.create-3.1.1.tgz#d7f2849f0dbda7e04682bb8cd72ab022461debe7" - dependencies: - lodash._baseassign "^3.0.0" - lodash._basecreate "^3.0.0" - lodash._isiterateecall "^3.0.0" - -lodash.isarguments@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz#2f573d85c6a24289ff00663b491c1d338ff3458a" - -lodash.isarray@^3.0.0: - version "3.0.4" - resolved "https://registry.yarnpkg.com/lodash.isarray/-/lodash.isarray-3.0.4.tgz#79e4eb88c36a8122af86f844aa9bcd851b5fbb55" - -lodash.keys@^3.0.0: - version "3.1.2" - resolved "https://registry.yarnpkg.com/lodash.keys/-/lodash.keys-3.1.2.tgz#4dbc0472b156be50a0b286855d1bd0b0c656098a" - dependencies: - lodash._getnative "^3.0.0" - lodash.isarguments "^3.0.0" - lodash.isarray "^3.0.0" - -lodash@^4.0.0, lodash@^4.17.4, lodash@^4.3.0: - version "4.17.4" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" - -lru-cache@^4.0.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.1.tgz#622e32e82488b49279114a4f9ecf45e7cd6bba55" - dependencies: - pseudomap "^1.0.2" - yallist "^2.1.2" - -mimic-fn@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.1.0.tgz#e667783d92e89dbd342818b5230b9d62a672ad18" - -minimatch@^3.0.2, minimatch@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" - dependencies: - brace-expansion "^1.1.7" - -minimist@0.0.8: - version "0.0.8" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" - -mkdirp@0.5.1, mkdirp@^0.5.1: - version "0.5.1" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" - dependencies: - minimist "0.0.8" - -mocha@^3.4.2: - version "3.5.0" - resolved "https://registry.yarnpkg.com/mocha/-/mocha-3.5.0.tgz#1328567d2717f997030f8006234bce9b8cd72465" - dependencies: - browser-stdout "1.3.0" - commander "2.9.0" - debug "2.6.8" - diff "3.2.0" - escape-string-regexp "1.0.5" - glob "7.1.1" - growl "1.9.2" - json3 "3.3.2" - lodash.create "3.1.1" - mkdirp "0.5.1" - supports-color "3.1.2" - -ms@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" - -mute-stream@0.0.7: - version "0.0.7" - resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" - -nanoid@^3.2.0: - version "3.3.1" - resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.1.tgz#6347a18cac88af88f58af0b3594b723d5e99bb35" - integrity sha512-n6Vs/3KGyxPQd6uO0eH4Bv0ojGSUvuLlIHtC3Y0kEO23YRge8H9x1GCzLn28YX0H66pMkxuaeESFq4tKISKwdw== - -natural-compare@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" - -object-assign@^4.0.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" - -once@^1.3.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" - dependencies: - wrappy "1" - -onetime@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/onetime/-/onetime-2.0.1.tgz#067428230fd67443b2794b22bba528b6867962d4" - dependencies: - mimic-fn "^1.0.0" - -optionator@^0.8.2: - version "0.8.2" - resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.2.tgz#364c5e409d3f4d6301d6c0b4c05bba50180aeb64" - dependencies: - deep-is "~0.1.3" - fast-levenshtein "~2.0.4" - levn "~0.3.0" - prelude-ls "~1.1.2" - type-check "~0.3.2" - wordwrap "~1.0.0" - -os-tmpdir@~1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" - -path-is-absolute@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" - -path-is-inside@^1.0.1, path-is-inside@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" - -pathval@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.0.tgz#b942e6d4bde653005ef6b71361def8727d0645e0" - -picocolors@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c" - integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ== - -pify@^2.0.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" - -pinkie-promise@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" - dependencies: - pinkie "^2.0.0" - -pinkie@^2.0.0: - version "2.0.4" - resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" - -pluralize@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-4.0.0.tgz#59b708c1c0190a2f692f1c7618c446b052fd1762" - -postcss@^8.4.6: - version "8.4.6" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.6.tgz#c5ff3c3c457a23864f32cb45ac9b741498a09ae1" - integrity sha512-OovjwIzs9Te46vlEx7+uXB0PLijpwjXGKXjVGGPIGubGpq7uh5Xgf6D6FiJ/SzJMBosHDp6a2hiXOS97iBXcaA== - dependencies: - nanoid "^3.2.0" - picocolors "^1.0.0" - source-map-js "^1.0.2" - -prelude-ls@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" - -process-nextick-args@~1.0.6: - version "1.0.7" - resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3" - -progress@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.0.tgz#8a1be366bf8fc23db2bd23f10c6fe920b4389d1f" - -pseudomap@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" - -readable-stream@^2.2.2: - version "2.3.3" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.3.tgz#368f2512d79f9d46fdfc71349ae7878bbc1eb95c" - dependencies: - core-util-is "~1.0.0" - inherits "~2.0.3" - isarray "~1.0.0" - process-nextick-args "~1.0.6" - safe-buffer "~5.1.1" - string_decoder "~1.0.3" - util-deprecate "~1.0.1" - -require-uncached@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/require-uncached/-/require-uncached-1.0.3.tgz#4e0d56d6c9662fd31e43011c4b95aa49955421d3" - dependencies: - caller-path "^0.1.0" - resolve-from "^1.0.0" - -resolve-from@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-1.0.1.tgz#26cbfe935d1aeeeabb29bc3fe5aeb01e93d44226" - -restore-cursor@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf" - dependencies: - onetime "^2.0.0" - signal-exit "^3.0.2" - -rimraf@^2.2.8: - version "2.6.1" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.1.tgz#c2338ec643df7a1b7fe5c54fa86f57428a55f33d" - dependencies: - glob "^7.0.5" - -run-async@^2.2.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.3.0.tgz#0371ab4ae0bdd720d4166d7dfda64ff7a445a6c0" - dependencies: - is-promise "^2.1.0" - -rx-lite-aggregates@^4.0.8: - version "4.0.8" - resolved "https://registry.yarnpkg.com/rx-lite-aggregates/-/rx-lite-aggregates-4.0.8.tgz#753b87a89a11c95467c4ac1626c4efc4e05c67be" - dependencies: - rx-lite "*" - -rx-lite@*, rx-lite@^4.0.8: - version "4.0.8" - resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-4.0.8.tgz#0b1e11af8bc44836f04a6407e92da42467b79444" - -safe-buffer@~5.1.0, safe-buffer@~5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853" - -semver@^5.3.0: - version "5.4.1" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.4.1.tgz#e059c09d8571f0540823733433505d3a2f00b18e" - -shebang-command@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" - dependencies: - shebang-regex "^1.0.0" - -shebang-regex@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" - -signal-exit@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" - -slice-ansi@0.0.4: - version "0.0.4" - resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-0.0.4.tgz#edbf8903f66f7ce2f8eafd6ceed65e264c831b35" - -source-map-js@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c" - integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw== - -sprintf-js@~1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" - -string-width@^2.0.0, string-width@^2.1.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" - dependencies: - is-fullwidth-code-point "^2.0.0" - strip-ansi "^4.0.0" - -string_decoder@~1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.0.3.tgz#0fc67d7c141825de94282dd536bec6b9bce860ab" - dependencies: - safe-buffer "~5.1.0" - -strip-ansi@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" - dependencies: - ansi-regex "^2.0.0" - -strip-ansi@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" - dependencies: - ansi-regex "^3.0.0" - -strip-json-comments@~2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" - -supports-color@3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.1.2.tgz#72a262894d9d408b956ca05ff37b2ed8a6e2a2d5" - dependencies: - has-flag "^1.0.0" - -supports-color@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" - -supports-color@^4.0.0: - version "4.2.1" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-4.2.1.tgz#65a4bb2631e90e02420dba5554c375a4754bb836" - dependencies: - has-flag "^2.0.0" - -table@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/table/-/table-4.0.1.tgz#a8116c133fac2c61f4a420ab6cdf5c4d61f0e435" - dependencies: - ajv "^4.7.0" - ajv-keywords "^1.0.0" - chalk "^1.1.1" - lodash "^4.0.0" - slice-ansi "0.0.4" - string-width "^2.0.0" - -text-table@~0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" - -through@^2.3.6: - version "2.3.8" - resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" - -tmp@^0.0.31: - version "0.0.31" - resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.31.tgz#8f38ab9438e17315e5dbd8b3657e8bfb277ae4a7" - dependencies: - os-tmpdir "~1.0.1" - -tryit@^1.0.1: - version "1.0.3" - resolved "https://registry.yarnpkg.com/tryit/-/tryit-1.0.3.tgz#393be730a9446fd1ead6da59a014308f36c289cb" - -type-check@~0.3.2: - version "0.3.2" - resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" - dependencies: - prelude-ls "~1.1.2" - -type-detect@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-3.0.0.tgz#46d0cc8553abb7b13a352b0d6dea2fd58f2d9b55" - -type-detect@^4.0.0: - version "4.0.3" - resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.3.tgz#0e3f2670b44099b0b46c284d136a7ef49c74c2ea" - -typedarray@^0.0.6: - version "0.0.6" - resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" - -util-deprecate@~1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" - -which@^1.2.9: - version "1.3.0" - resolved "https://registry.yarnpkg.com/which/-/which-1.3.0.tgz#ff04bdfc010ee547d780bec38e1ac1c2777d253a" - dependencies: - isexe "^2.0.0" - -wordwrap@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" - -wrappy@1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" - -write@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/write/-/write-0.2.1.tgz#5fc03828e264cea3fe91455476f7a3c566cb0757" - dependencies: - mkdirp "^0.5.1" - -yallist@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52"