├── .gitignore
├── README.md
├── package.json
├── src
└── index.js
├── tests
└── index.js
└── yarn.lock
/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | dist/*
3 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # css-template
2 | Reduce context-switching when defining `style` in React Component.
3 |
4 | To use inline styles in React, you often find yourself writing this type of code:
5 |
6 | ```js
7 | const styles = {
8 | title: {
9 | borderBottomLeftRadius: '10px',
10 | // ^ ^ ^ ^ ^^
11 | // | | | | ||___ annoying trailing comma
12 | // | | | |____|____ annoying JS quotes
13 | // |_____|___|_________________ annoying camel case
14 | //
15 | // (╯°□°)╯︵ ┻━┻ I WANT CSS BACK!!!
16 | }
17 | }
18 | ```
19 |
20 | With `css-template`, those times are gone! Instead of writing this:
21 |
22 | ```js
23 | // THIS IS BAD FOR YOUR EYES
24 | const styles = {
25 | title: {
26 | marginTop: '10px',
27 | fontSize: '120%',
28 | lineHeight: '1.5',
29 | textAlign: 'center',
30 | backgroundColor: 'rgba(100, 255, 100, 0.7)',
31 | },
32 | footer: {
33 | width: 'calc(100% - 16px)',
34 | textAlign: 'right',
35 | marginTop: '20px',
36 | }
37 | };
38 | ```
39 |
40 | you can write something like this
41 |
42 | ```js
43 | // THIS IS BETTER
44 | const styles = {
45 | title: css`{
46 | margin-top: 10px;
47 | font-size: 120%;
48 | line-height: 1.5;
49 | text-align: center;
50 | background-color: rgba(100, 255, 100, 0.7);
51 | }`,
52 | footer: css`{
53 | width: calc(100% - 16px);
54 | text-align: right;
55 | margin-top: 20px;
56 | }`,
57 | };
58 | ```
59 |
60 | # Supported Features
61 |
62 | - translate snake-case to camelCase
63 |
64 | ```js
65 | css`margin-top: 20px` // will be translated to { marginTop: '20px' }
66 | ```
67 |
68 | - multiple lines with optional brackets for better visuals
69 |
70 | ```js
71 | css`{
72 | padding: 10px;
73 | margin: 10px;
74 | }`
75 |
76 | // is equivalent to
77 | css`
78 | padding: 10px;
79 | margin: 10px;
80 | `
81 | ```
82 |
83 | - optional final semicolon
84 |
85 | ```js
86 | css`padding: 10px`
87 |
88 | // is equivalent to
89 | css`padding: 10px;`
90 | ```
91 |
92 | - multiple rules in one line
93 |
94 | ```js
95 | css`padding: 10px; margin: 10px`
96 | ```
97 |
98 | - compose other style objects
99 |
100 | ```js
101 | const bigFont = css`font-size: 200%`
102 | const underlined = css`text-decoration: underline`
103 |
104 | const myStyle = css`{
105 | composes: ${bigFont};
106 | composes: ${underlined};
107 | padding: 10px;
108 | margin: 10px;
109 | }`
110 |
111 | ```
112 |
113 | # Installation
114 |
115 | ```bash
116 | npm i -S css-template
117 | ```
118 |
119 | # Usages
120 |
121 | ```js
122 | import css from 'css-template';
123 |
124 | const COLOR_MAIN = 'white';
125 | const BACKGROUND_MAIN = '#336699';
126 | const awesomeStyles = css`font-size: 200%`;
127 |
128 | const styles = {
129 | header: css`{
130 | padding: 10px 0 20px 10px;
131 | text-align: center;
132 | }`,
133 | main: css`{
134 | composes: ${awesomeStyles};
135 | color: ${COLOR_MAIN};
136 | background-color: ${BACKGROUND_MAIN};
137 | }`
138 | };
139 |
140 | const MyComponent = (props) => (
141 |
142 |
143 | {props.header}
144 |
145 |
146 | {props.main}
147 |
148 |
149 | );
150 | ```
151 |
152 | # ROADMAP
153 |
154 | - [x] `composes: ${otherStyles};` just like postcss composes feature
155 | - [ ] optional auto-prefixer
156 | - [ ] spread numeric values like `padding: ${[10, 20, 0, 10]}px;`
157 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "css-template",
3 | "version": "0.2.3",
4 | "description": "convert css string to style object. Useful for inline styling in React",
5 | "main": "dist/index.js",
6 | "scripts": {
7 | "build": "babel src/index.js --presets babel-preset-es2015 --plugins babel-plugin-transform-remove-console > dist/index.js",
8 | "test": "mocha tests"
9 | },
10 | "repository": {
11 | "type": "git",
12 | "url": "git+https://github.com/tungv/css-template.git"
13 | },
14 | "keywords": [
15 | "css",
16 | "template",
17 | "react",
18 | "styling"
19 | ],
20 | "author": "Tung Vu ",
21 | "license": "ISC",
22 | "bugs": {
23 | "url": "https://github.com/tungv/css-template/issues"
24 | },
25 | "homepage": "https://github.com/tungv/css-template#readme",
26 | "devDependencies": {
27 | "babel-plugin-transform-remove-console": "^6.8.0",
28 | "babel-preset-es2015": "^6.14.0",
29 | "chai": "^3.5.0"
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/src/index.js:
--------------------------------------------------------------------------------
1 | const REGEX_RULE = /([\w\-]+)\s*:\s*([^\;]+)\;/g;
2 |
3 | const toCamel = snake =>
4 | snake.replace(
5 | /\-\w/g,
6 | $1 => $1.slice(1).toUpperCase()
7 | );
8 |
9 | const normalizeAttr = attr => toCamel(attr.trim());
10 |
11 | const normalizeValue = value =>
12 | value.replace(/(\s+)/g, ' ').trim() // remove extra spaces
13 |
14 | const addTrailingCharacter = char => str => str[str.length - 1] === char ? str : (str + char);
15 |
16 | const handleLiteral = literal => {
17 | let match;
18 | let indexStart = -1;
19 | let indexEnd = 0;
20 | const rules = [];
21 |
22 | while(match = REGEX_RULE.exec(literal)) {
23 | const [rule, attr, value] = match;
24 | if (indexStart === -1) {
25 | indexStart = match.index;
26 | }
27 | indexEnd = match.index + rule.length;
28 | rules.push([normalizeAttr(attr), normalizeValue(value)]);
29 | }
30 |
31 |
32 | const prefix = literal.substr(0, indexStart).trim();
33 | const suffix = literal.slice(indexEnd).trimLeft();
34 |
35 | const ret = {
36 | rules,
37 | prefix,
38 | suffix,
39 | };
40 |
41 | return ret;
42 | }
43 |
44 | const isComposes = str => str.match(/(^|\s)composes\s*:\s*$/);
45 | const parseComposes = param => ({
46 | rules: Object.keys(param).map(key => [key, param[key]]),
47 | prefix: '',
48 | suffix: '',
49 | });
50 |
51 | const reduce = (current, param, nextLiteral) => {
52 |
53 | const { rules, prefix, suffix } = current;
54 | const next = handleLiteral(nextLiteral);
55 |
56 | if (!suffix) {
57 | throw new Error('feature: [params as an attr] is not implemented yet')
58 | }
59 |
60 | if (isComposes(suffix)) {
61 | const rules = Object.keys(param).map(key => [key, param[key]]);
62 | }
63 |
64 | const interpolated = isComposes(suffix) ?
65 | parseComposes(param) :
66 | handleLiteral([suffix, param, next.prefix].join(''));
67 |
68 |
69 | return {
70 | rules: [].concat(rules, interpolated.rules, next.rules),
71 | suffix: interpolated.suffix + next.suffix
72 | };
73 | }
74 |
75 | const convertToObject = (array) => array.reduce(
76 | (current, pairs) => (current[pairs[0]] = pairs[1], current), {}
77 | );
78 |
79 | module.exports = (strings, ...params) => {
80 | const reduced = params.reduce(
81 | (acc, param, index) => reduce(acc, param, strings[index + 1]),
82 | handleLiteral(strings[0])
83 | );
84 |
85 | if (reduced.prefix && reduced.prefix !== '{') {
86 | throw new Error(`unexpected starting sequence of "${reduced.prefix}"`);
87 | }
88 |
89 | if (reduced.suffix && reduced.suffix !== '}') {
90 | const finalRule = handleLiteral(addTrailingCharacter(';')(reduced.suffix));
91 | reduced.rules.push(...finalRule.rules);
92 | if (finalRule.suffix && finalRule.suffix[0] !== '}') {
93 | throw new Error(`unexpected ending sequence of ${finalRule.suffix}`);
94 | }
95 | }
96 |
97 | return convertToObject(reduced.rules);
98 | };
99 |
--------------------------------------------------------------------------------
/tests/index.js:
--------------------------------------------------------------------------------
1 | const { assert } = require('chai');
2 | const css = require('../src/index');
3 |
4 | describe('css tag', () => {
5 | it('should work with single rule without `;`', () => {
6 | assert.deepEqual(css`padding: 10px`, { padding: '10px' });
7 | });
8 |
9 | it('should work with single rule with `;`', () => {
10 | assert.deepEqual(css`padding: 10px;`, { padding: '10px' });
11 | });
12 |
13 | it('should work with `%` unit', () => {
14 | assert.deepEqual(css`width: 100%`, { width: '100%' });
15 | });
16 |
17 | it('should work with rgba()', () => {
18 | assert.deepEqual(css`color: rgba(100, 200, 150, 0.1)`, {
19 | color: 'rgba(100, 200, 150, 0.1)'
20 | });
21 | });
22 |
23 | it('should work with multiple rules without final `;`', () => {
24 | assert.deepEqual(css`padding: 10px; margin: 20px`, {
25 | padding: '10px',
26 | margin: '20px'
27 | });
28 | });
29 |
30 | it('should work with multiple rules with final `;`', () => {
31 | assert.deepEqual(css`padding: 10px; margin: 20px;`, {
32 | padding: '10px',
33 | margin: '20px'
34 | });
35 | });
36 |
37 | it('should work with multiple lines without final `;`', () => {
38 | assert.deepEqual(css`
39 | padding: 10px;
40 | margin: 20px
41 | `, {
42 | padding: '10px',
43 | margin: '20px'
44 | });
45 | });
46 |
47 | it('should work with multiple lines with final `;`', () => {
48 | assert.deepEqual(css`
49 | padding: 10px;
50 | margin: 20px;
51 | `, {
52 | padding: '10px',
53 | margin: '20px'
54 | });
55 | });
56 |
57 | it('should convert snakecase to camelCase', () => {
58 | assert.deepEqual(
59 | css`padding-top: 10px; margin-bottom-or-longer: 20px;`, {
60 | paddingTop: '10px',
61 | marginBottomOrLonger: '20px'
62 | });
63 | });
64 |
65 | it('should convert single-value variable', () => {
66 | assert.deepEqual(css`padding: ${100 * 2}px;`, { padding: '200px' });
67 | });
68 |
69 | it('should convert multiple-value variable', () => {
70 | assert.deepEqual(css`padding: 10px ${100 * 2}px;`, { padding: '10px 200px' });
71 | assert.deepEqual(css`padding: ${100 * 2}px 10px;`, { padding: '200px 10px' });
72 | });
73 |
74 | it('should work with extra spaces', () => {
75 | assert.deepEqual(css`padding : 200px `, { padding: '200px' });
76 | });
77 |
78 | it('should remove extra spaces in between values', () => {
79 | assert.deepEqual(css`padding: 20px 10px 30px 40px`, { padding: '20px 10px 30px 40px' });
80 | });
81 |
82 | it('should ignore single-line bounding brackets', () => {
83 | assert.deepEqual(
84 | css`{ color: white; background: black; }`,
85 | { color: 'white', background: 'black' }
86 | );
87 | });
88 |
89 | it('should ignore multiple-line bounding brackets', () => {
90 | assert.deepEqual(
91 | css`{
92 | margin: 0 10px;
93 | width: 100%;
94 | }`,
95 | { width: '100%', margin: '0 10px' }
96 | );
97 | });
98 |
99 | it('should handle composes as the first rule', () => {
100 | const style = { padding: '6px', color: 'red' };
101 | assert.deepEqual(css`{
102 | composes: ${style};
103 | padding: 10px;
104 | margin: 10px;
105 | }`, {
106 | color: 'red',
107 | padding: '10px',
108 | margin: '10px'
109 | });
110 | });
111 |
112 | it('should handle composes as a non-initial rule', () => {
113 | const style = { padding: '6px', color: 'red' };
114 | assert.deepEqual(css`{
115 | padding: 10px;
116 | composes: ${style};
117 | margin: 10px;
118 | }`, {
119 | color: 'red',
120 | padding: '6px',
121 | margin: '10px'
122 | });
123 | });
124 |
125 | // REGRESSIONS
126 | it('REGRESSIONS#1', () => {
127 | const backgroundUrl = '/static/media/background.17f52263.png';
128 | const style = css`{
129 | background-image: url("${backgroundUrl}");
130 | }`;
131 |
132 |
133 | assert.deepEqual(style, {
134 | backgroundImage: 'url("/static/media/background.17f52263.png")',
135 | });
136 | });
137 |
138 | it('REGRESSIONS#2', () => {
139 | const backgroundUrl = '/static/media/background.17f52263.png';
140 | const style = css`
141 | background-image: url("${backgroundUrl}");
142 | height: 100%;
143 | `;
144 |
145 |
146 | assert.deepEqual(style, {
147 | height: '100%',
148 | backgroundImage: 'url("/static/media/background.17f52263.png")',
149 | });
150 | });
151 | });
152 |
--------------------------------------------------------------------------------
/yarn.lock:
--------------------------------------------------------------------------------
1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
2 | # yarn lockfile v1
3 | ansi-regex@^2.0.0:
4 | version "2.0.0"
5 | resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.0.0.tgz#c5061b6e0ef8a81775e50f5d66151bf6bf371107"
6 |
7 | ansi-styles@^2.2.1:
8 | version "2.2.1"
9 | resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe"
10 |
11 | assertion-error@^1.0.1:
12 | version "1.0.2"
13 | resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.0.2.tgz#13ca515d86206da0bac66e834dd397d87581094c"
14 |
15 | babel-code-frame@^6.16.0:
16 | version "6.16.0"
17 | resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.16.0.tgz#f90e60da0862909d3ce098733b5d3987c97cb8de"
18 | dependencies:
19 | chalk "^1.1.0"
20 | esutils "^2.0.2"
21 | js-tokens "^2.0.0"
22 |
23 | babel-helper-call-delegate@^6.8.0:
24 | version "6.8.0"
25 | resolved "https://registry.yarnpkg.com/babel-helper-call-delegate/-/babel-helper-call-delegate-6.8.0.tgz#9d283e7486779b6b0481864a11b371ea5c01fa64"
26 | dependencies:
27 | babel-helper-hoist-variables "^6.8.0"
28 | babel-runtime "^6.0.0"
29 | babel-traverse "^6.8.0"
30 | babel-types "^6.8.0"
31 |
32 | babel-helper-define-map@^6.8.0, babel-helper-define-map@^6.9.0:
33 | version "6.9.0"
34 | resolved "https://registry.yarnpkg.com/babel-helper-define-map/-/babel-helper-define-map-6.9.0.tgz#6629f9b2a7e58e18e8379a57d1e6fbb2969902fb"
35 | dependencies:
36 | babel-helper-function-name "^6.8.0"
37 | babel-runtime "^6.9.0"
38 | babel-types "^6.9.0"
39 | lodash "^4.2.0"
40 |
41 | babel-helper-function-name@^6.8.0:
42 | version "6.8.0"
43 | resolved "https://registry.yarnpkg.com/babel-helper-function-name/-/babel-helper-function-name-6.8.0.tgz#a0336ba14526a075cdf502fc52d3fe84b12f7a34"
44 | dependencies:
45 | babel-helper-get-function-arity "^6.8.0"
46 | babel-runtime "^6.0.0"
47 | babel-template "^6.8.0"
48 | babel-traverse "^6.8.0"
49 | babel-types "^6.8.0"
50 |
51 | babel-helper-get-function-arity@^6.8.0:
52 | version "6.8.0"
53 | resolved "https://registry.yarnpkg.com/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.8.0.tgz#88276c24bd251cdf6f61b6f89f745f486ced92af"
54 | dependencies:
55 | babel-runtime "^6.0.0"
56 | babel-types "^6.8.0"
57 |
58 | babel-helper-hoist-variables@^6.8.0:
59 | version "6.8.0"
60 | resolved "https://registry.yarnpkg.com/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.8.0.tgz#8b0766dc026ea9ea423bc2b34e665a4da7373aaf"
61 | dependencies:
62 | babel-runtime "^6.0.0"
63 | babel-types "^6.8.0"
64 |
65 | babel-helper-optimise-call-expression@^6.8.0:
66 | version "6.8.0"
67 | resolved "https://registry.yarnpkg.com/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.8.0.tgz#4175628e9c89fc36174904f27070f29d38567f06"
68 | dependencies:
69 | babel-runtime "^6.0.0"
70 | babel-types "^6.8.0"
71 |
72 | babel-helper-regex@^6.8.0:
73 | version "6.9.0"
74 | resolved "https://registry.yarnpkg.com/babel-helper-regex/-/babel-helper-regex-6.9.0.tgz#c74265fde180ff9a16735fee05e63cadb9e0b057"
75 | dependencies:
76 | babel-runtime "^6.9.0"
77 | babel-types "^6.9.0"
78 | lodash "^4.2.0"
79 |
80 | babel-helper-replace-supers@^6.14.0, babel-helper-replace-supers@^6.8.0:
81 | version "6.16.0"
82 | resolved "https://registry.yarnpkg.com/babel-helper-replace-supers/-/babel-helper-replace-supers-6.16.0.tgz#21c97623cc7e430855753f252740122626a39e6b"
83 | dependencies:
84 | babel-helper-optimise-call-expression "^6.8.0"
85 | babel-messages "^6.8.0"
86 | babel-runtime "^6.0.0"
87 | babel-template "^6.16.0"
88 | babel-traverse "^6.16.0"
89 | babel-types "^6.16.0"
90 |
91 | babel-messages@^6.8.0:
92 | version "6.8.0"
93 | resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.8.0.tgz#bf504736ca967e6d65ef0adb5a2a5f947c8e0eb9"
94 | dependencies:
95 | babel-runtime "^6.0.0"
96 |
97 | babel-plugin-check-es2015-constants@^6.3.13:
98 | version "6.8.0"
99 | resolved "https://registry.yarnpkg.com/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.8.0.tgz#dbf024c32ed37bfda8dee1e76da02386a8d26fe7"
100 | dependencies:
101 | babel-runtime "^6.0.0"
102 |
103 | babel-plugin-transform-es2015-arrow-functions@^6.3.13:
104 | version "6.8.0"
105 | resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.8.0.tgz#5b63afc3181bdc9a8c4d481b5a4f3f7d7fef3d9d"
106 | dependencies:
107 | babel-runtime "^6.0.0"
108 |
109 | babel-plugin-transform-es2015-block-scoped-functions@^6.3.13:
110 | version "6.8.0"
111 | resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoped-functions/-/babel-plugin-transform-es2015-block-scoped-functions-6.8.0.tgz#ed95d629c4b5a71ae29682b998f70d9833eb366d"
112 | dependencies:
113 | babel-runtime "^6.0.0"
114 |
115 | babel-plugin-transform-es2015-block-scoping@^6.14.0:
116 | version "6.15.0"
117 | resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.15.0.tgz#5b443ca142be8d1db6a8c2ae42f51958b66b70f6"
118 | dependencies:
119 | babel-runtime "^6.9.0"
120 | babel-template "^6.15.0"
121 | babel-traverse "^6.15.0"
122 | babel-types "^6.15.0"
123 | lodash "^4.2.0"
124 |
125 | babel-plugin-transform-es2015-classes@^6.14.0:
126 | version "6.14.0"
127 | resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.14.0.tgz#87d5149ee91fb475922409f9af5b2ba5d1e39287"
128 | dependencies:
129 | babel-helper-define-map "^6.9.0"
130 | babel-helper-function-name "^6.8.0"
131 | babel-helper-optimise-call-expression "^6.8.0"
132 | babel-helper-replace-supers "^6.14.0"
133 | babel-messages "^6.8.0"
134 | babel-runtime "^6.9.0"
135 | babel-template "^6.14.0"
136 | babel-traverse "^6.14.0"
137 | babel-types "^6.14.0"
138 |
139 | babel-plugin-transform-es2015-computed-properties@^6.3.13:
140 | version "6.8.0"
141 | resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.8.0.tgz#f51010fd61b3bd7b6b60a5fdfd307bb7a5279870"
142 | dependencies:
143 | babel-helper-define-map "^6.8.0"
144 | babel-runtime "^6.0.0"
145 | babel-template "^6.8.0"
146 |
147 | babel-plugin-transform-es2015-destructuring@^6.16.0:
148 | version "6.16.0"
149 | resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.16.0.tgz#050fe0866f5d53b36062ee10cdf5bfe64f929627"
150 | dependencies:
151 | babel-runtime "^6.9.0"
152 |
153 | babel-plugin-transform-es2015-duplicate-keys@^6.6.0:
154 | version "6.8.0"
155 | resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-duplicate-keys/-/babel-plugin-transform-es2015-duplicate-keys-6.8.0.tgz#fd8f7f7171fc108cc1c70c3164b9f15a81c25f7d"
156 | dependencies:
157 | babel-runtime "^6.0.0"
158 | babel-types "^6.8.0"
159 |
160 | babel-plugin-transform-es2015-for-of@^6.6.0:
161 | version "6.8.0"
162 | resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.8.0.tgz#82eda139ba4270dda135c3ec1b1f2813fa62f23c"
163 | dependencies:
164 | babel-runtime "^6.0.0"
165 |
166 | babel-plugin-transform-es2015-function-name@^6.9.0:
167 | version "6.9.0"
168 | resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.9.0.tgz#8c135b17dbd064e5bba56ec511baaee2fca82719"
169 | dependencies:
170 | babel-helper-function-name "^6.8.0"
171 | babel-runtime "^6.9.0"
172 | babel-types "^6.9.0"
173 |
174 | babel-plugin-transform-es2015-literals@^6.3.13:
175 | version "6.8.0"
176 | resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-literals/-/babel-plugin-transform-es2015-literals-6.8.0.tgz#50aa2e5c7958fc2ab25d74ec117e0cc98f046468"
177 | dependencies:
178 | babel-runtime "^6.0.0"
179 |
180 | babel-plugin-transform-es2015-modules-amd@^6.8.0:
181 | version "6.8.0"
182 | resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-amd/-/babel-plugin-transform-es2015-modules-amd-6.8.0.tgz#25d954aa0bf04031fc46d2a8e6230bb1abbde4a3"
183 | dependencies:
184 | babel-plugin-transform-es2015-modules-commonjs "^6.8.0"
185 | babel-runtime "^6.0.0"
186 | babel-template "^6.8.0"
187 |
188 | babel-plugin-transform-es2015-modules-commonjs@^6.16.0, babel-plugin-transform-es2015-modules-commonjs@^6.8.0:
189 | version "6.16.0"
190 | resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.16.0.tgz#0a34b447bc88ad1a70988b6d199cca6d0b96c892"
191 | dependencies:
192 | babel-plugin-transform-strict-mode "^6.8.0"
193 | babel-runtime "^6.0.0"
194 | babel-template "^6.16.0"
195 | babel-types "^6.16.0"
196 |
197 | babel-plugin-transform-es2015-modules-systemjs@^6.14.0:
198 | version "6.14.0"
199 | resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-systemjs/-/babel-plugin-transform-es2015-modules-systemjs-6.14.0.tgz#c519b5c73e32388e679c9b1edf41b2fc23dc3303"
200 | dependencies:
201 | babel-helper-hoist-variables "^6.8.0"
202 | babel-runtime "^6.11.6"
203 | babel-template "^6.14.0"
204 |
205 | babel-plugin-transform-es2015-modules-umd@^6.12.0:
206 | version "6.12.0"
207 | resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-umd/-/babel-plugin-transform-es2015-modules-umd-6.12.0.tgz#5d73559eb49266775ed281c40be88a421bd371a3"
208 | dependencies:
209 | babel-plugin-transform-es2015-modules-amd "^6.8.0"
210 | babel-runtime "^6.0.0"
211 | babel-template "^6.8.0"
212 |
213 | babel-plugin-transform-es2015-object-super@^6.3.13:
214 | version "6.8.0"
215 | resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-object-super/-/babel-plugin-transform-es2015-object-super-6.8.0.tgz#1b858740a5a4400887c23dcff6f4d56eea4a24c5"
216 | dependencies:
217 | babel-helper-replace-supers "^6.8.0"
218 | babel-runtime "^6.0.0"
219 |
220 | babel-plugin-transform-es2015-parameters@^6.16.0:
221 | version "6.17.0"
222 | resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.17.0.tgz#e06d30cef897f46adb4734707bbe128a0d427d58"
223 | dependencies:
224 | babel-helper-call-delegate "^6.8.0"
225 | babel-helper-get-function-arity "^6.8.0"
226 | babel-runtime "^6.9.0"
227 | babel-template "^6.16.0"
228 | babel-traverse "^6.16.0"
229 | babel-types "^6.16.0"
230 |
231 | babel-plugin-transform-es2015-shorthand-properties@^6.3.13:
232 | version "6.8.0"
233 | resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.8.0.tgz#f0a4c5fd471630acf333c2d99c3d677bf0952149"
234 | dependencies:
235 | babel-runtime "^6.0.0"
236 | babel-types "^6.8.0"
237 |
238 | babel-plugin-transform-es2015-spread@^6.3.13:
239 | version "6.8.0"
240 | resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-spread/-/babel-plugin-transform-es2015-spread-6.8.0.tgz#0217f737e3b821fa5a669f187c6ed59205f05e9c"
241 | dependencies:
242 | babel-runtime "^6.0.0"
243 |
244 | babel-plugin-transform-es2015-sticky-regex@^6.3.13:
245 | version "6.8.0"
246 | resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.8.0.tgz#e73d300a440a35d5c64f5c2a344dc236e3df47be"
247 | dependencies:
248 | babel-helper-regex "^6.8.0"
249 | babel-runtime "^6.0.0"
250 | babel-types "^6.8.0"
251 |
252 | babel-plugin-transform-es2015-template-literals@^6.6.0:
253 | version "6.8.0"
254 | resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-template-literals/-/babel-plugin-transform-es2015-template-literals-6.8.0.tgz#86eb876d0a2c635da4ec048b4f7de9dfc897e66b"
255 | dependencies:
256 | babel-runtime "^6.0.0"
257 |
258 | babel-plugin-transform-es2015-typeof-symbol@^6.6.0:
259 | version "6.8.0"
260 | resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-typeof-symbol/-/babel-plugin-transform-es2015-typeof-symbol-6.8.0.tgz#84c29eb1219372480955a020fef7a65c44f30533"
261 | dependencies:
262 | babel-runtime "^6.0.0"
263 |
264 | babel-plugin-transform-es2015-unicode-regex@^6.3.13:
265 | version "6.11.0"
266 | resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.11.0.tgz#6298ceabaad88d50a3f4f392d8de997260f6ef2c"
267 | dependencies:
268 | babel-helper-regex "^6.8.0"
269 | babel-runtime "^6.0.0"
270 | regexpu-core "^2.0.0"
271 |
272 | babel-plugin-transform-regenerator@^6.16.0:
273 | version "6.16.1"
274 | resolved "https://registry.yarnpkg.com/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.16.1.tgz#a75de6b048a14154aae14b0122756c5bed392f59"
275 | dependencies:
276 | babel-runtime "^6.9.0"
277 | babel-types "^6.16.0"
278 | private "~0.1.5"
279 |
280 | babel-plugin-transform-remove-console@^6.8.0:
281 | version "6.8.0"
282 | resolved "https://registry.yarnpkg.com/babel-plugin-transform-remove-console/-/babel-plugin-transform-remove-console-6.8.0.tgz#c4162f01ee169491776e64093f4dad8d61125a90"
283 | dependencies:
284 | babel-runtime "^6.0.0"
285 |
286 | babel-plugin-transform-strict-mode@^6.8.0:
287 | version "6.11.3"
288 | resolved "https://registry.yarnpkg.com/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.11.3.tgz#183741325126bc7ec9cf4c0fc257d3e7ca5afd40"
289 | dependencies:
290 | babel-runtime "^6.0.0"
291 | babel-types "^6.8.0"
292 |
293 | babel-preset-es2015@^6.14.0:
294 | version "6.16.0"
295 | resolved "https://registry.yarnpkg.com/babel-preset-es2015/-/babel-preset-es2015-6.16.0.tgz#59acecd1efbebaf48f89404840f2fe78c4d2ad5c"
296 | dependencies:
297 | babel-plugin-check-es2015-constants "^6.3.13"
298 | babel-plugin-transform-es2015-arrow-functions "^6.3.13"
299 | babel-plugin-transform-es2015-block-scoped-functions "^6.3.13"
300 | babel-plugin-transform-es2015-block-scoping "^6.14.0"
301 | babel-plugin-transform-es2015-classes "^6.14.0"
302 | babel-plugin-transform-es2015-computed-properties "^6.3.13"
303 | babel-plugin-transform-es2015-destructuring "^6.16.0"
304 | babel-plugin-transform-es2015-duplicate-keys "^6.6.0"
305 | babel-plugin-transform-es2015-for-of "^6.6.0"
306 | babel-plugin-transform-es2015-function-name "^6.9.0"
307 | babel-plugin-transform-es2015-literals "^6.3.13"
308 | babel-plugin-transform-es2015-modules-amd "^6.8.0"
309 | babel-plugin-transform-es2015-modules-commonjs "^6.16.0"
310 | babel-plugin-transform-es2015-modules-systemjs "^6.14.0"
311 | babel-plugin-transform-es2015-modules-umd "^6.12.0"
312 | babel-plugin-transform-es2015-object-super "^6.3.13"
313 | babel-plugin-transform-es2015-parameters "^6.16.0"
314 | babel-plugin-transform-es2015-shorthand-properties "^6.3.13"
315 | babel-plugin-transform-es2015-spread "^6.3.13"
316 | babel-plugin-transform-es2015-sticky-regex "^6.3.13"
317 | babel-plugin-transform-es2015-template-literals "^6.6.0"
318 | babel-plugin-transform-es2015-typeof-symbol "^6.6.0"
319 | babel-plugin-transform-es2015-unicode-regex "^6.3.13"
320 | babel-plugin-transform-regenerator "^6.16.0"
321 |
322 | babel-runtime@^6.0.0, babel-runtime@^6.11.6, babel-runtime@^6.9.0, babel-runtime@^6.9.1:
323 | version "6.11.6"
324 | resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.11.6.tgz#6db707fef2d49c49bfa3cb64efdb436b518b8222"
325 | dependencies:
326 | core-js "^2.4.0"
327 | regenerator-runtime "^0.9.5"
328 |
329 | babel-template@^6.14.0, babel-template@^6.15.0, babel-template@^6.16.0, babel-template@^6.8.0:
330 | version "6.16.0"
331 | resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.16.0.tgz#e149dd1a9f03a35f817ddbc4d0481988e7ebc8ca"
332 | dependencies:
333 | babel-runtime "^6.9.0"
334 | babel-traverse "^6.16.0"
335 | babel-types "^6.16.0"
336 | babylon "^6.11.0"
337 | lodash "^4.2.0"
338 |
339 | babel-traverse@^6.14.0, babel-traverse@^6.15.0, babel-traverse@^6.16.0, babel-traverse@^6.8.0:
340 | version "6.16.0"
341 | resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.16.0.tgz#fba85ae1fd4d107de9ce003149cc57f53bef0c4f"
342 | dependencies:
343 | babel-code-frame "^6.16.0"
344 | babel-messages "^6.8.0"
345 | babel-runtime "^6.9.0"
346 | babel-types "^6.16.0"
347 | babylon "^6.11.0"
348 | debug "^2.2.0"
349 | globals "^8.3.0"
350 | invariant "^2.2.0"
351 | lodash "^4.2.0"
352 |
353 | babel-types@^6.14.0, babel-types@^6.15.0, babel-types@^6.16.0, babel-types@^6.8.0, babel-types@^6.9.0:
354 | version "6.16.0"
355 | resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.16.0.tgz#71cca1dbe5337766225c5c193071e8ebcbcffcfe"
356 | dependencies:
357 | babel-runtime "^6.9.1"
358 | esutils "^2.0.2"
359 | lodash "^4.2.0"
360 | to-fast-properties "^1.0.1"
361 |
362 | babylon@^6.11.0:
363 | version "6.11.4"
364 | resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.11.4.tgz#75e1f52187efa0cde5a541a7f7fdda38f6eb5bd2"
365 |
366 | chai@^3.5.0:
367 | version "3.5.0"
368 | resolved "https://registry.yarnpkg.com/chai/-/chai-3.5.0.tgz#4d02637b067fe958bdbfdd3a40ec56fef7373247"
369 | dependencies:
370 | assertion-error "^1.0.1"
371 | deep-eql "^0.1.3"
372 | type-detect "^1.0.0"
373 |
374 | chalk@^1.1.0:
375 | version "1.1.3"
376 | resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98"
377 | dependencies:
378 | ansi-styles "^2.2.1"
379 | escape-string-regexp "^1.0.2"
380 | has-ansi "^2.0.0"
381 | strip-ansi "^3.0.0"
382 | supports-color "^2.0.0"
383 |
384 | core-js@^2.4.0:
385 | version "2.4.1"
386 | resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.4.1.tgz#4de911e667b0eae9124e34254b53aea6fc618d3e"
387 |
388 | debug@^2.2.0:
389 | version "2.2.0"
390 | resolved "https://registry.yarnpkg.com/debug/-/debug-2.2.0.tgz#f87057e995b1a1f6ae6a4960664137bc56f039da"
391 | dependencies:
392 | ms "0.7.1"
393 |
394 | deep-eql@^0.1.3:
395 | version "0.1.3"
396 | resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-0.1.3.tgz#ef558acab8de25206cd713906d74e56930eb69f2"
397 | dependencies:
398 | type-detect "0.1.1"
399 |
400 | escape-string-regexp@^1.0.2:
401 | version "1.0.5"
402 | resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"
403 |
404 | esutils@^2.0.2:
405 | version "2.0.2"
406 | resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b"
407 |
408 | globals@^8.3.0:
409 | version "8.18.0"
410 | resolved "https://registry.yarnpkg.com/globals/-/globals-8.18.0.tgz#93d4a62bdcac38cfafafc47d6b034768cb0ffcb4"
411 |
412 | has-ansi@^2.0.0:
413 | version "2.0.0"
414 | resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91"
415 | dependencies:
416 | ansi-regex "^2.0.0"
417 |
418 | invariant@^2.2.0:
419 | version "2.2.1"
420 | resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.1.tgz#b097010547668c7e337028ebe816ebe36c8a8d54"
421 | dependencies:
422 | loose-envify "^1.0.0"
423 |
424 | js-tokens@^1.0.1:
425 | version "1.0.3"
426 | resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-1.0.3.tgz#14e56eb68c8f1a92c43d59f5014ec29dc20f2ae1"
427 |
428 | js-tokens@^2.0.0:
429 | version "2.0.0"
430 | resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-2.0.0.tgz#79903f5563ee778cc1162e6dcf1a0027c97f9cb5"
431 |
432 | jsesc@~0.5.0:
433 | version "0.5.0"
434 | resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d"
435 |
436 | lodash@^4.2.0:
437 | version "4.16.4"
438 | resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.16.4.tgz#01ce306b9bad1319f2a5528674f88297aeb70127"
439 |
440 | loose-envify@^1.0.0:
441 | version "1.2.0"
442 | resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.2.0.tgz#69a65aad3de542cf4ee0f4fe74e8e33c709ccb0f"
443 | dependencies:
444 | js-tokens "^1.0.1"
445 |
446 | ms@0.7.1:
447 | version "0.7.1"
448 | resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.1.tgz#9cd13c03adbff25b65effde7ce864ee952017098"
449 |
450 | private@~0.1.5:
451 | version "0.1.6"
452 | resolved "https://registry.yarnpkg.com/private/-/private-0.1.6.tgz#55c6a976d0f9bafb9924851350fe47b9b5fbb7c1"
453 |
454 | regenerate@^1.2.1:
455 | version "1.3.1"
456 | resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.3.1.tgz#0300203a5d2fdcf89116dce84275d011f5903f33"
457 |
458 | regenerator-runtime@^0.9.5:
459 | version "0.9.5"
460 | resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.9.5.tgz#403d6d40a4bdff9c330dd9392dcbb2d9a8bba1fc"
461 |
462 | regexpu-core@^2.0.0:
463 | version "2.0.0"
464 | resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-2.0.0.tgz#49d038837b8dcf8bfa5b9a42139938e6ea2ae240"
465 | dependencies:
466 | regenerate "^1.2.1"
467 | regjsgen "^0.2.0"
468 | regjsparser "^0.1.4"
469 |
470 | regjsgen@^0.2.0:
471 | version "0.2.0"
472 | resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.2.0.tgz#6c016adeac554f75823fe37ac05b92d5a4edb1f7"
473 |
474 | regjsparser@^0.1.4:
475 | version "0.1.5"
476 | resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.1.5.tgz#7ee8f84dc6fa792d3fd0ae228d24bd949ead205c"
477 | dependencies:
478 | jsesc "~0.5.0"
479 |
480 | strip-ansi@^3.0.0:
481 | version "3.0.1"
482 | resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf"
483 | dependencies:
484 | ansi-regex "^2.0.0"
485 |
486 | supports-color@^2.0.0:
487 | version "2.0.0"
488 | resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7"
489 |
490 | to-fast-properties@^1.0.1:
491 | version "1.0.2"
492 | resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.2.tgz#f3f5c0c3ba7299a7ef99427e44633257ade43320"
493 |
494 | type-detect@^1.0.0:
495 | version "1.0.0"
496 | resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-1.0.0.tgz#762217cc06db258ec48908a1298e8b95121e8ea2"
497 |
498 | type-detect@0.1.1:
499 | version "0.1.1"
500 | resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-0.1.1.tgz#0ba5ec2a885640e470ea4e8505971900dac58822"
501 |
502 |
--------------------------------------------------------------------------------