From e170cab43684720f82cd0e647c056a6786afea98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Miguel?= Date: Tue, 24 Jul 2018 18:19:40 +0100 Subject: [PATCH] #85 Implement buildData mechanism --- .eslintrc.json | 3 + BesugoComponent.md | 9 +- components/Besugo.jsx | 32 +++-- components/MoreArrow.jsx | 10 +- components/Previews.jsx | 12 +- components/SrcSet.jsx | 20 +-- components/blog/BlogPost.jsx | 12 +- components/partials/EndFooter.jsx | 12 +- components/partials/SVGElements.jsx | 6 +- components/partials/SlideShow.jsx | 6 +- components/partials/SocialIcons.jsx | 4 - components/partials/TopHeader.jsx | 10 +- components/people/Card.jsx | 10 +- components/people/Person.jsx | 12 +- configs/cms.yml | 4 + package.json | 5 + scripts/buildData.js | 36 +++++ scripts/eraseBuildData.js | 25 ++++ scripts/serve.js | 27 ++-- scripts/tasks/buildData.js | 17 +++ scripts/webpack/polyfills.js | 17 +++ webpack.config.js | 17 ++- yarn.lock | 203 +++++++++++++++++++++++++++- 23 files changed, 386 insertions(+), 123 deletions(-) create mode 100644 scripts/buildData.js create mode 100644 scripts/eraseBuildData.js create mode 100644 scripts/tasks/buildData.js create mode 100644 scripts/webpack/polyfills.js diff --git a/.eslintrc.json b/.eslintrc.json index b328241..006db94 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -25,7 +25,10 @@ "wrap-iife": 0 }, + "parser": "babel-eslint", + "settings": { + "import/parser": "babel-eslint", "import/resolver": { "node": { "paths": ["components"] diff --git a/BesugoComponent.md b/BesugoComponent.md index 6890318..f2ccc1d 100644 --- a/BesugoComponent.md +++ b/BesugoComponent.md @@ -30,11 +30,9 @@ A static object that defines this component within our website. All properties a - `styles`: (arr [str]) array of stylesheets, both internal and external, to be loaded into the CMS page. ```js -static get config() { - return { - tag: "Person", - categories: [ "people", "people-pt" ] - }; +static config = { + tag: "Person", + categories: [ "people", "people-pt" ], } ``` @@ -42,6 +40,7 @@ static get config() { ```js constructor(props) { super(props); + ... } ``` Only mandatory if the component expects to be passed any props (i.e. data from attributes in html). Should always have the `super(props)` call as above. diff --git a/components/Besugo.jsx b/components/Besugo.jsx index 09541b4..93f1193 100644 --- a/components/Besugo.jsx +++ b/components/Besugo.jsx @@ -29,14 +29,19 @@ export default class BesugoComponent extends React.Component { // Object.assign(Comp.propTypes, config.propTypes); // } - // If we're in the CMS admin pages, load the necessary components as preview components - // of those content types if (typeof CMS !== 'undefined') { - const cats = Array.isArray(config.categories) ? config.categories : [ config.categories ]; + // Load the necessary components as preview components of those content types. + if (config.categories) { + const cats = Array.isArray(config.categories) ? config.categories : [ config.categories ]; + cats.forEach((cat) => { + CMS.registerPreviewTemplate(cat, Comp); + }); + } - cats.forEach((cat) => { - CMS.registerPreviewTemplate(cat, Comp); - }); + // Custom widgets need to be registered by the appropriate methods as well. + if (config.widget) { + CMS.registerWidget(config.widget.name, Comp, config.widget.preview); + } // This is only needed for CMS Previews currently; on website pages these will ideally // go in the baseof.html file directly. @@ -94,6 +99,7 @@ export default class BesugoComponent extends React.Component { Components.forEach((Comp) => { const { config } = Comp; + if (config.tag) { const nodes = Comp.getChildrenInPlaceholder(domtree, config.tag, parserUtils); nodes.forEach((node) => { @@ -101,9 +107,9 @@ export default class BesugoComponent extends React.Component { const props = Comp.getPropsFromPlaceholder(node); // Replace the placeholder node with a normal div container for our component; - // we need one so that later during hydrate React knows what it's doing, but we - // don't use our original placeholders from now on because they're not exactly - // standard. + // we need one so that later during hydrate React knows what it's doing, + // but we don't use our original placeholders from now on because they're + // not exactly standard. const container = Comp.buildContainer(parserUtils, props); parserUtils.setAttribute(container, 'besugo-component', config.tag); parserUtils.setAttribute(container, 'besugo-props', JSON.stringify(props)); @@ -162,8 +168,8 @@ export default class BesugoComponent extends React.Component { text() { return parserUtils.textOf(child); }, - getChildren(parentNode) { - return BesugoComponent.getChildrenInPlaceholder(child, parentNode, parserUtils); + getChildren(childName) { + return BesugoComponent.getChildrenInPlaceholder(child, childName, parserUtils); }, })); } @@ -198,7 +204,9 @@ export default class BesugoComponent extends React.Component { // .categories - (arr [str]) array of categories that this component will render in the CMS page // .styles - (arr [str]) array of stylesheets, both internal and external, to be // loaded into the CMS page - static get config() { return {}; } + // .widget - (obj { name [str], (opt) preview [Comp] }) if this is a custom controller widget + // to be used in content types with special fields + static config = {} // Non-static methods diff --git a/components/MoreArrow.jsx b/components/MoreArrow.jsx index 4f84300..88e29d8 100644 --- a/components/MoreArrow.jsx +++ b/components/MoreArrow.jsx @@ -2,14 +2,8 @@ import React from 'react'; import BesugoComponent from 'Besugo'; export default class MoreArrow extends BesugoComponent { - constructor(props) { - super(props); - } - - static get config() { - return { - tag: 'MoreArrow', - }; + static config = { + tag: 'MoreArrow', } getData() { diff --git a/components/Previews.jsx b/components/Previews.jsx index b675176..c5cb1d2 100644 --- a/components/Previews.jsx +++ b/components/Previews.jsx @@ -1,12 +1,10 @@ import BesugoComponent from 'Besugo'; export default class Previews extends BesugoComponent { - static get config() { - return { - styles: [ - '/css/app.css', - 'https://fonts.googleapis.com/css?family=Muli:300,400,700', - ], - }; + static config = { + styles: [ + '/css/app.css', + 'https://fonts.googleapis.com/css?family=Muli:300,400,700', + ], } } diff --git a/components/SrcSet.jsx b/components/SrcSet.jsx index 59e53ca..ae8b431 100644 --- a/components/SrcSet.jsx +++ b/components/SrcSet.jsx @@ -18,14 +18,8 @@ const buildSrcSet = (src) => { }; export default class SrcSet extends BesugoComponent { - constructor(props) { - super(props); - } - - static get config() { - return { - tag: 'SrcSet', - }; + static config = { + tag: 'SrcSet', } static buildContainer(parserUtils, props) { @@ -91,6 +85,10 @@ export default class SrcSet extends BesugoComponent { } export class SrcSetBg extends BesugoComponent { + static config = { + tag: 'SrcSetBg', + } + constructor(props) { super(props); @@ -99,12 +97,6 @@ export class SrcSetBg extends BesugoComponent { this._resizeTimer = null; } - static get config() { - return { - tag: 'SrcSetBg', - }; - } - renderDefault() { const data = this.props; diff --git a/components/blog/BlogPost.jsx b/components/blog/BlogPost.jsx index a8a8ef2..69ddb1c 100644 --- a/components/blog/BlogPost.jsx +++ b/components/blog/BlogPost.jsx @@ -7,15 +7,9 @@ import EndFooter from 'partials/EndFooter'; import PersonCard from 'people/Card'; export default class BlogPost extends BesugoComponent { - constructor(props) { - super(props); - } - - static get config() { - return { - tag: 'BlogPost', - categories: [ 'blog_post', 'blog_post-pt' ], - }; + static config = { + tag: 'BlogPost', + categories: [ 'blog_post', 'blog_post-pt' ], } static extraProps(props, xplaceholder) { diff --git a/components/partials/EndFooter.jsx b/components/partials/EndFooter.jsx index 68c9823..08db9fd 100644 --- a/components/partials/EndFooter.jsx +++ b/components/partials/EndFooter.jsx @@ -4,15 +4,9 @@ import SocialIcons from 'partials/SocialIcons'; import SVGElements from 'partials/SVGElements'; export default class EndFooter extends BesugoComponent { - constructor(props) { - super(props); - } - - static get config() { - return { - tag: 'EndFooter', - categories: [ 'footer', 'footer-pt' ], - }; + static config = { + tag: 'EndFooter', + categories: [ 'footer', 'footer-pt' ], } static extraProps(props, xplaceholder) { diff --git a/components/partials/SVGElements.jsx b/components/partials/SVGElements.jsx index 59c1e50..71b438c 100644 --- a/components/partials/SVGElements.jsx +++ b/components/partials/SVGElements.jsx @@ -2,10 +2,8 @@ import React from 'react'; import BesugoComponent from 'Besugo'; export default class SVGElements extends BesugoComponent { - static get config() { - return { - tag: 'SVGElements', - }; + static config = { + tag: 'SVGElements', } render() { diff --git a/components/partials/SlideShow.jsx b/components/partials/SlideShow.jsx index a075b4f..3f6999c 100644 --- a/components/partials/SlideShow.jsx +++ b/components/partials/SlideShow.jsx @@ -13,10 +13,8 @@ const config = { }; export default class SlideShow extends BesugoComponent { - static get config() { - return { - tag: 'SlideShow', - }; + static config = { + tag: 'SlideShow', } static extraProps(props, xplaceholder) { diff --git a/components/partials/SocialIcons.jsx b/components/partials/SocialIcons.jsx index 7bc7cdc..9fa6a43 100644 --- a/components/partials/SocialIcons.jsx +++ b/components/partials/SocialIcons.jsx @@ -2,10 +2,6 @@ import React from 'react'; import BesugoComponent from 'Besugo'; export default class SocialIcons extends BesugoComponent { - constructor(props) { - super(props); - } - getData() { // Set some default props return { diff --git a/components/partials/TopHeader.jsx b/components/partials/TopHeader.jsx index 45c9e3f..c263644 100644 --- a/components/partials/TopHeader.jsx +++ b/components/partials/TopHeader.jsx @@ -2,14 +2,8 @@ import React from 'react'; import BesugoComponent from 'Besugo'; export default class TopHeader extends BesugoComponent { - constructor(props) { - super(props); - } - - static get config() { - return { - tag: 'TopHeader', - }; + static config = { + tag: 'TopHeader', } getData() { diff --git a/components/people/Card.jsx b/components/people/Card.jsx index eb23bfb..1ea06e6 100644 --- a/components/people/Card.jsx +++ b/components/people/Card.jsx @@ -5,14 +5,8 @@ import SocialIcons from 'partials/SocialIcons'; import SrcSet from 'SrcSet'; export default class PersonCard extends BesugoComponent { - constructor(props) { - super(props); - } - - static get config() { - return { - tag: 'PersonCard', - }; + static config = { + tag: 'PersonCard', } static buildContainer(parserUtils) { diff --git a/components/people/Person.jsx b/components/people/Person.jsx index 93ed01f..90bc536 100644 --- a/components/people/Person.jsx +++ b/components/people/Person.jsx @@ -8,15 +8,9 @@ import SVGElements from 'partials/SVGElements'; import TopHeader from 'partials/TopHeader'; export default class Person extends BesugoComponent { - constructor(props) { - super(props); - } - - static get config() { - return { - tag: 'Person', - categories: [ 'people', 'people-pt' ], - }; + static config = { + tag: 'Person', + categories: [ 'people', 'people-pt' ], } getData() { diff --git a/configs/cms.yml b/configs/cms.yml index 45962d2..4a4550b 100644 --- a/configs/cms.yml +++ b/configs/cms.yml @@ -31,6 +31,7 @@ collections: # A list of collections the CMS should be able to edit # 🇬🇧 collections - name: "blog_post" # Used in routes, ie.: /admin/collections/:slug/edit label: "Blog Posts 🇬🇧" # Used in the UI, ie.: "New Post" + label_singular: "Blog Post 🇬🇧" description: > The description is a great place for tone setting, high level information, and editing guidelines that are specific to a collection. @@ -69,6 +70,7 @@ collections: # A list of collections the CMS should be able to edit valueField: "title" - name: "people" # Used in routes, ie.: /admin/collections/:slug/edit label: "People 🇬🇧" # Used in the UI, ie.: "New Post" + label_singular: "Person 🇬🇧" # Used in the UI, ie.: "New Post" description: > The description is a great place for tone setting, high level information, and editing guidelines that are specific to a collection. @@ -133,6 +135,7 @@ collections: # A list of collections the CMS should be able to edit # 🇵🇹 collections - name: "blog_post-pt" # Used in routes, ie.: /admin/collections/:slug/edit label: "Blog Posts 🇵🇹" # Used in the UI, ie.: "New Post" + label_singular: "Blog Post 🇵🇹" # Used in the UI, ie.: "New Post" description: > The description is a great place for tone setting, high level information, and editing guidelines that are specific to a collection. @@ -171,6 +174,7 @@ collections: # A list of collections the CMS should be able to edit valueField: "title" - name: "people-pt" # Used in routes, ie.: /admin/collections/:slug/edit label: "People 🇵🇹" # Used in the UI, ie.: "New Post" + label_singular: "Person 🇵🇹" # Used in the UI, ie.: "New Post" description: > The description is a great place for tone setting, high level information, and editing guidelines that are specific to a collection. diff --git a/package.json b/package.json index e155ec2..dbc3ba7 100644 --- a/package.json +++ b/package.json @@ -44,16 +44,19 @@ "erase:public": "rm -Rf ./public && mkdir ./public", "erase:temp": "rm -Rf ./temp && mkdir ./temp && mkdir ./temp/hugo", "erase:hugoconfig": "rm -Rf ./config.yml", + "erase:data": "node scripts/eraseBuildData.js", "sass:scss-compile": "node-sass scss/ -o temp/css --include-path ./node_modules", "sass:postcss": "postcss temp/css/*.css -d public/css --use autoprefixer --verbose", "sass:postcssnano": "postcss temp/css/*.css -d public/css --use autoprefixer --use cssnano --verbose", "build:sass": "npm-run-all -s sass:scss-compile sass:postcssnano", "build:configs": "node scripts/configs.js", "build:sharp": "node scripts/sharp.js", + "build:data": "node scripts/buildData.js", "compile:webpack": "webpack --watch --display none --mode development & webpack-dev-server --color", "watch:configs": "chokidar 'scripts/configs.js' 'configs/*.yml' -c 'yarn build:configs && yarn dummy:refresh' --silent", "watch:sass": "chokidar 'package.json' 'scss/**/*.scss' -c 'npm-run-all -s sass:scss-compile sass:postcss dummy:refresh' --initial --silent", "watch:sharp": "nodemon -q -w scripts/sharp.js -x 'yarn build:sharp && yarn dummy:refresh'", + "watch:data": "chokidar 'scripts/buildData.js' 'scripts/buildData/**/*.js' -c 'yarn build:data' --initial --silent", "watch:hugo": "hugo -w", "watch:webpack": "nodemon -q -w webpack.config.js -x 'yarn compile:webpack'", "dummy:refresh": "node scripts/dummy-refresh.js", @@ -68,9 +71,11 @@ "dependencies": { "autoprefixer": "^8.2.0", "babel-core": "^6.26.0", + "babel-eslint": "^8.2.6", "babel-loader": "^7.1.4", "babel-preset-env": "^1.6.1", "babel-preset-react": "^6.24.1", + "babel-preset-stage-2": "^6.24.1", "chalk": "^2.3.2", "child_process": "^1.0.2", "chokidar": "^2.0.3", diff --git a/scripts/buildData.js b/scripts/buildData.js new file mode 100644 index 0000000..6a9fc27 --- /dev/null +++ b/scripts/buildData.js @@ -0,0 +1,36 @@ +const chalk = require('chalk'); +const fs = require('fs'); +const glob = require('glob'); +const path = require('path'); + +const Logger = require('./libs/Logger'); +const Spinner = require('./libs/Spinner'); + +const log = (msg) => { + if (!Spinner.initialized()) { + Logger.log(msg); + } +}; +const error = err => (Spinner.initialized() ? Spinner.error('buildData', err) : Logger.error(err)); + +glob('scripts/buildData/**/*.js', {}, (err, files) => { + if (err) { + error(err); + return; + } + + files.forEach((file) => { + const inFile = path.parse(file); + log(`Processing build data - ${inFile.name}...`); + + // eslint-disable-next-line + require(file.replace('scripts/', './')) + .then((data) => { + fs.writeFile(path.resolve('data', `${inFile.name}.json`), JSON.stringify(data), (errr) => { + if (errr) { + error(chalk.red(errr)); + } + }); + }); + }); +}); diff --git a/scripts/eraseBuildData.js b/scripts/eraseBuildData.js new file mode 100644 index 0000000..6be937a --- /dev/null +++ b/scripts/eraseBuildData.js @@ -0,0 +1,25 @@ +const chalk = require('chalk'); +const fs = require('fs'); +const glob = require('glob'); +const path = require('path'); + +const Logger = require('./libs/Logger'); +const Spinner = require('./libs/Spinner'); + +const error = err => (Spinner.initialized() ? Spinner.error('buildData', err) : Logger.error(err)); + +glob('scripts/buildData/**/*.js', {}, (err, files) => { + if (err) { + error(err); + return; + } + + files.forEach((file) => { + const inFile = path.parse(file); + fs.unlink(path.resolve('data', `${inFile.name}.json`), (errr) => { + if (errr) { + error(chalk.red(errr)); + } + }); + }); +}); diff --git a/scripts/serve.js b/scripts/serve.js index 4961932..e2474c7 100644 --- a/scripts/serve.js +++ b/scripts/serve.js @@ -14,6 +14,7 @@ const Spinner = require('./libs/Spinner'); const tasks = [ [ 'serve', '' ], [ 'configs', 'configurations' ], + [ 'buildData', 'data' ], [ 'sass', 'sass/post-css' ], [ 'sharp', 'sharp' ], [ 'hugo', 'hugo' ], @@ -35,16 +36,20 @@ require('./tasks/clean').then(() => { }); // Before anything we need to ensure the configuration files are finished. - require('./tasks/configs').then(() => { - // During first init, webpack only runs after everything else, even if those tasks - // fail with errors, as it's the most CPU intensive process and it can slow down - // the rest of the processes, as well as the console output itself. - Promise.all([ - require('./tasks/sass'), - require('./tasks/sharp'), - require('./tasks/hugo'), - ]).then(() => { - require('./tasks/webpack'); + Promise.all([ + require('./tasks/configs'), + require('./tasks/buildData'), + ]) + .then(() => { + // During first init, webpack only runs after everything else, even if those tasks + // fail with errors, as it's the most CPU intensive process and it can slow down + // the rest of the processes, as well as the console output itself. + Promise.all([ + require('./tasks/sass'), + require('./tasks/sharp'), + require('./tasks/hugo'), + ]).then(() => { + require('./tasks/webpack'); + }); }); - }); }); diff --git a/scripts/tasks/buildData.js b/scripts/tasks/buildData.js new file mode 100644 index 0000000..c73360e --- /dev/null +++ b/scripts/tasks/buildData.js @@ -0,0 +1,17 @@ +const Watch = require('../libs/Watch'); + +module.exports = Watch({ + spinner: 'buildData', + + files: [ + 'scripts/buildData.js', + 'scripts/buildData/**/*.js', + ], + + tasks: [ + { + command: 'yarn build:data', + text: 'processing build data...', + }, + ], +}); diff --git a/scripts/webpack/polyfills.js b/scripts/webpack/polyfills.js new file mode 100644 index 0000000..4e05f66 --- /dev/null +++ b/scripts/webpack/polyfills.js @@ -0,0 +1,17 @@ +// if (typeof Promise === 'undefined') { +// // Rejection tracking prevents a common issue where React gets into an +// // inconsistent state due to an error, but it gets swallowed by a Promise, +// // and the user has no idea what causes React's erratic future behavior. +// require('promise/lib/rejection-tracking').enable(); +// window.Promise = require('promise/lib/es6-extensions.js'); +// } + +// fetch() polyfill for making API calls. +// require('whatwg-fetch'); + +// Object.assign() is commonly used with React. +// It will use the native implementation if it's present and isn't buggy. +// Object.assign = require('object-assign'); + +// Babel's own polyfill plugin takes care of many other syntax polyfills. +// require('babel-polyfill'); diff --git a/webpack.config.js b/webpack.config.js index 79823cb..9c6e9d7 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -86,8 +86,14 @@ module.exports = [ // Here the application starts executing and webpack starts bundling entry: { - js: './scripts/webpack/site.js', - admin: './scripts/webpack/admin.js', + js: [ + // './scripts/webpack/polyfills.js', + './scripts/webpack/site.js', + ], + admin: [ + // './scripts/webpack/polyfills.js', + './scripts/webpack/admin.js', + ], }, // options related to how webpack emits results @@ -154,7 +160,10 @@ module.exports = [ { ...allExports, - entry: [ './components/App.jsx' ], + entry: [ + // './scripts/webpack/polyfills.js', + './components/App.jsx', + ], output: { path: path.resolve(__dirname, netlifyToml.build.publish), @@ -174,7 +183,7 @@ module.exports = [ loader: 'babel-loader', options: { babelrc: false, - presets: [ 'env', 'react' ], + presets: [ 'env', 'stage-2', 'react' ], }, }, }, diff --git a/yarn.lock b/yarn.lock index 7d8e6f5..8ddddcc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,6 +2,82 @@ # yarn lockfile v1 +"@babel/code-frame@7.0.0-beta.44": + version "7.0.0-beta.44" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0-beta.44.tgz#2a02643368de80916162be70865c97774f3adbd9" + dependencies: + "@babel/highlight" "7.0.0-beta.44" + +"@babel/generator@7.0.0-beta.44": + version "7.0.0-beta.44" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.0.0-beta.44.tgz#c7e67b9b5284afcf69b309b50d7d37f3e5033d42" + dependencies: + "@babel/types" "7.0.0-beta.44" + jsesc "^2.5.1" + lodash "^4.2.0" + source-map "^0.5.0" + trim-right "^1.0.1" + +"@babel/helper-function-name@7.0.0-beta.44": + version "7.0.0-beta.44" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.0.0-beta.44.tgz#e18552aaae2231100a6e485e03854bc3532d44dd" + dependencies: + "@babel/helper-get-function-arity" "7.0.0-beta.44" + "@babel/template" "7.0.0-beta.44" + "@babel/types" "7.0.0-beta.44" + +"@babel/helper-get-function-arity@7.0.0-beta.44": + version "7.0.0-beta.44" + resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0-beta.44.tgz#d03ca6dd2b9f7b0b1e6b32c56c72836140db3a15" + dependencies: + "@babel/types" "7.0.0-beta.44" + +"@babel/helper-split-export-declaration@7.0.0-beta.44": + version "7.0.0-beta.44" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.0.0-beta.44.tgz#c0b351735e0fbcb3822c8ad8db4e583b05ebd9dc" + dependencies: + "@babel/types" "7.0.0-beta.44" + +"@babel/highlight@7.0.0-beta.44": + version "7.0.0-beta.44" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.0.0-beta.44.tgz#18c94ce543916a80553edcdcf681890b200747d5" + dependencies: + chalk "^2.0.0" + esutils "^2.0.2" + js-tokens "^3.0.0" + +"@babel/template@7.0.0-beta.44": + version "7.0.0-beta.44" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.0.0-beta.44.tgz#f8832f4fdcee5d59bf515e595fc5106c529b394f" + dependencies: + "@babel/code-frame" "7.0.0-beta.44" + "@babel/types" "7.0.0-beta.44" + babylon "7.0.0-beta.44" + lodash "^4.2.0" + +"@babel/traverse@7.0.0-beta.44": + version "7.0.0-beta.44" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.0.0-beta.44.tgz#a970a2c45477ad18017e2e465a0606feee0d2966" + dependencies: + "@babel/code-frame" "7.0.0-beta.44" + "@babel/generator" "7.0.0-beta.44" + "@babel/helper-function-name" "7.0.0-beta.44" + "@babel/helper-split-export-declaration" "7.0.0-beta.44" + "@babel/types" "7.0.0-beta.44" + babylon "7.0.0-beta.44" + debug "^3.1.0" + globals "^11.1.0" + invariant "^2.2.0" + lodash "^4.2.0" + +"@babel/types@7.0.0-beta.44": + version "7.0.0-beta.44" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.0.0-beta.44.tgz#6b1b164591f77dec0a0342aca995f2d046b3a757" + dependencies: + esutils "^2.0.2" + lodash "^4.2.0" + to-fast-properties "^2.0.0" + "@mrmlnc/readdir-enhanced@^2.2.1": version "2.2.1" resolved "https://registry.yarnpkg.com/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz#524af240d1a360527b730475ecfa1344aa540dde" @@ -514,6 +590,17 @@ babel-core@^6.26.0: slash "^1.0.0" source-map "^0.5.7" +babel-eslint@^8.2.6: + version "8.2.6" + resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-8.2.6.tgz#6270d0c73205628067c0f7ae1693a9e797acefd9" + dependencies: + "@babel/code-frame" "7.0.0-beta.44" + "@babel/traverse" "7.0.0-beta.44" + "@babel/types" "7.0.0-beta.44" + babylon "7.0.0-beta.44" + eslint-scope "3.7.1" + eslint-visitor-keys "^1.0.0" + babel-generator@^6.26.0: version "6.26.1" resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.26.1.tgz#1844408d3b8f0d35a404ea7ac180f087a601bd90" @@ -527,6 +614,14 @@ babel-generator@^6.26.0: source-map "^0.5.7" trim-right "^1.0.1" +babel-helper-bindify-decorators@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-bindify-decorators/-/babel-helper-bindify-decorators-6.24.1.tgz#14c19e5f142d7b47f19a52431e52b1ccbc40a330" + dependencies: + babel-runtime "^6.22.0" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + babel-helper-builder-binary-assignment-operator-visitor@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-helper-builder-binary-assignment-operator-visitor/-/babel-helper-builder-binary-assignment-operator-visitor-6.24.1.tgz#cce4517ada356f4220bcae8a02c2b346f9a56664" @@ -569,6 +664,15 @@ babel-helper-explode-assignable-expression@^6.24.1: babel-traverse "^6.24.1" babel-types "^6.24.1" +babel-helper-explode-class@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-explode-class/-/babel-helper-explode-class-6.24.1.tgz#7dc2a3910dee007056e1e31d640ced3d54eaa9eb" + dependencies: + babel-helper-bindify-decorators "^6.24.1" + babel-runtime "^6.22.0" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + babel-helper-function-name@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz#d3475b8c03ed98242a25b48351ab18399d3580a9" @@ -660,6 +764,22 @@ babel-plugin-syntax-async-functions@^6.8.0: version "6.13.0" resolved "https://registry.yarnpkg.com/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz#cad9cad1191b5ad634bf30ae0872391e0647be95" +babel-plugin-syntax-async-generators@^6.5.0: + version "6.13.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-async-generators/-/babel-plugin-syntax-async-generators-6.13.0.tgz#6bc963ebb16eccbae6b92b596eb7f35c342a8b9a" + +babel-plugin-syntax-class-properties@^6.8.0: + version "6.13.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-class-properties/-/babel-plugin-syntax-class-properties-6.13.0.tgz#d7eb23b79a317f8543962c505b827c7d6cac27de" + +babel-plugin-syntax-decorators@^6.13.0: + version "6.13.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-decorators/-/babel-plugin-syntax-decorators-6.13.0.tgz#312563b4dbde3cc806cee3e416cceeaddd11ac0b" + +babel-plugin-syntax-dynamic-import@^6.18.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-dynamic-import/-/babel-plugin-syntax-dynamic-import-6.18.0.tgz#8d6a26229c83745a9982a441051572caa179b1da" + babel-plugin-syntax-exponentiation-operator@^6.8.0: version "6.13.0" resolved "https://registry.yarnpkg.com/babel-plugin-syntax-exponentiation-operator/-/babel-plugin-syntax-exponentiation-operator-6.13.0.tgz#9ee7e8337290da95288201a6a57f4170317830de" @@ -672,11 +792,23 @@ babel-plugin-syntax-jsx@^6.3.13, babel-plugin-syntax-jsx@^6.8.0: version "6.18.0" resolved "https://registry.yarnpkg.com/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz#0af32a9a6e13ca7a3fd5069e62d7b0f58d0d8946" +babel-plugin-syntax-object-rest-spread@^6.8.0: + version "6.13.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz#fd6536f2bce13836ffa3a5458c4903a597bb3bf5" + babel-plugin-syntax-trailing-function-commas@^6.22.0: version "6.22.0" resolved "https://registry.yarnpkg.com/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-6.22.0.tgz#ba0360937f8d06e40180a43fe0d5616fff532cf3" -babel-plugin-transform-async-to-generator@^6.22.0: +babel-plugin-transform-async-generator-functions@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-async-generator-functions/-/babel-plugin-transform-async-generator-functions-6.24.1.tgz#f058900145fd3e9907a6ddf28da59f215258a5db" + dependencies: + babel-helper-remap-async-to-generator "^6.24.1" + babel-plugin-syntax-async-generators "^6.5.0" + babel-runtime "^6.22.0" + +babel-plugin-transform-async-to-generator@^6.22.0, babel-plugin-transform-async-to-generator@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-async-to-generator/-/babel-plugin-transform-async-to-generator-6.24.1.tgz#6536e378aff6cb1d5517ac0e40eb3e9fc8d08761" dependencies: @@ -684,6 +816,25 @@ babel-plugin-transform-async-to-generator@^6.22.0: babel-plugin-syntax-async-functions "^6.8.0" babel-runtime "^6.22.0" +babel-plugin-transform-class-properties@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-class-properties/-/babel-plugin-transform-class-properties-6.24.1.tgz#6a79763ea61d33d36f37b611aa9def81a81b46ac" + dependencies: + babel-helper-function-name "^6.24.1" + babel-plugin-syntax-class-properties "^6.8.0" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + +babel-plugin-transform-decorators@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-decorators/-/babel-plugin-transform-decorators-6.24.1.tgz#788013d8f8c6b5222bdf7b344390dfd77569e24d" + dependencies: + babel-helper-explode-class "^6.24.1" + babel-plugin-syntax-decorators "^6.13.0" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-types "^6.24.1" + babel-plugin-transform-es2015-arrow-functions@^6.22.0: version "6.22.0" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.22.0.tgz#452692cb711d5f79dc7f85e440ce41b9f244d221" @@ -852,7 +1003,7 @@ babel-plugin-transform-es2015-unicode-regex@^6.22.0: babel-runtime "^6.22.0" regexpu-core "^2.0.0" -babel-plugin-transform-exponentiation-operator@^6.22.0: +babel-plugin-transform-exponentiation-operator@^6.22.0, babel-plugin-transform-exponentiation-operator@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-exponentiation-operator/-/babel-plugin-transform-exponentiation-operator-6.24.1.tgz#2ab0c9c7f3098fa48907772bb813fe41e8de3a0e" dependencies: @@ -867,6 +1018,13 @@ babel-plugin-transform-flow-strip-types@^6.22.0: babel-plugin-syntax-flow "^6.18.0" babel-runtime "^6.22.0" +babel-plugin-transform-object-rest-spread@^6.22.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-object-rest-spread/-/babel-plugin-transform-object-rest-spread-6.26.0.tgz#0f36692d50fef6b7e2d4b3ac1478137a963b7b06" + dependencies: + babel-plugin-syntax-object-rest-spread "^6.8.0" + babel-runtime "^6.26.0" + babel-plugin-transform-react-display-name@^6.23.0: version "6.25.0" resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-display-name/-/babel-plugin-transform-react-display-name-6.25.0.tgz#67e2bf1f1e9c93ab08db96792e05392bf2cc28d1" @@ -960,6 +1118,25 @@ babel-preset-react@^6.24.1: babel-plugin-transform-react-jsx-source "^6.22.0" babel-preset-flow "^6.23.0" +babel-preset-stage-2@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-preset-stage-2/-/babel-preset-stage-2-6.24.1.tgz#d9e2960fb3d71187f0e64eec62bc07767219bdc1" + dependencies: + babel-plugin-syntax-dynamic-import "^6.18.0" + babel-plugin-transform-class-properties "^6.24.1" + babel-plugin-transform-decorators "^6.24.1" + babel-preset-stage-3 "^6.24.1" + +babel-preset-stage-3@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-preset-stage-3/-/babel-preset-stage-3-6.24.1.tgz#836ada0a9e7a7fa37cb138fb9326f87934a48395" + dependencies: + babel-plugin-syntax-trailing-function-commas "^6.22.0" + babel-plugin-transform-async-generator-functions "^6.24.1" + babel-plugin-transform-async-to-generator "^6.24.1" + babel-plugin-transform-exponentiation-operator "^6.24.1" + babel-plugin-transform-object-rest-spread "^6.22.0" + babel-register@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-register/-/babel-register-6.26.0.tgz#6ed021173e2fcb486d7acb45c6009a856f647071" @@ -1012,6 +1189,10 @@ babel-types@^6.19.0, babel-types@^6.24.1, babel-types@^6.26.0: lodash "^4.17.4" to-fast-properties "^1.0.3" +babylon@7.0.0-beta.44: + version "7.0.0-beta.44" + resolved "https://registry.yarnpkg.com/babylon/-/babylon-7.0.0-beta.44.tgz#89159e15e6e30c5096e22d738d8c0af8a0e8ca1d" + babylon@^6.18.0: version "6.18.0" resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" @@ -2465,7 +2646,7 @@ eslint-restricted-globals@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/eslint-restricted-globals/-/eslint-restricted-globals-0.1.1.tgz#35f0d5cbc64c2e3ed62e93b4b1a7af05ba7ed4d7" -eslint-scope@^3.7.1: +eslint-scope@3.7.1, eslint-scope@^3.7.1: version "3.7.1" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-3.7.1.tgz#3d63c3edfda02e06e01a452ad88caacc7cdcb6e8" dependencies: @@ -3135,7 +3316,7 @@ global-modules-path@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/global-modules-path/-/global-modules-path-2.1.0.tgz#923ec524e8726bb0c1a4ed4b8e21e1ff80c88bbb" -globals@^11.0.1: +globals@^11.0.1, globals@^11.1.0: version "11.7.0" resolved "https://registry.yarnpkg.com/globals/-/globals-11.7.0.tgz#a583faa43055b1aca771914bf68258e2fc125673" @@ -3579,7 +3760,7 @@ interpret@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.1.0.tgz#7ed1b1410c6a0e0f78cf95d3b8440c63f78b8614" -invariant@^2.2.2: +invariant@^2.2.0, invariant@^2.2.2: version "2.2.4" resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" dependencies: @@ -3991,6 +4172,10 @@ jsesc@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b" +jsesc@^2.5.1: + version "2.5.1" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.1.tgz#e421a2a8e20d6b0819df28908f782526b96dd1fe" + jsesc@~0.5.0: version "0.5.0" resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" @@ -4369,7 +4554,7 @@ lodash@^3.7.0: version "3.10.1" resolved "https://registry.yarnpkg.com/lodash/-/lodash-3.10.1.tgz#5bf45e8e49ba4189e17d482789dfd15bd140b7b6" -lodash@^4.0.0, lodash@^4.13.1, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.3.0, lodash@~4.17.10: +lodash@^4.0.0, lodash@^4.13.1, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.2.0, lodash@^4.3.0, lodash@~4.17.10: version "4.17.10" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.10.tgz#1b7793cf7259ea38fb3661d4d38b3260af8ae4e7" @@ -6634,7 +6819,7 @@ source-map@^0.4.2: dependencies: amdefine ">=0.0.4" -source-map@^0.5.3, source-map@^0.5.6, source-map@^0.5.7, source-map@~0.5.3: +source-map@^0.5.0, source-map@^0.5.3, source-map@^0.5.6, source-map@^0.5.7, source-map@~0.5.3: version "0.5.7" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" @@ -7036,6 +7221,10 @@ to-fast-properties@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47" +to-fast-properties@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" + to-object-path@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af"