From 858b600a7dd12675e1d0a7f50098f5d67223cdf4 Mon Sep 17 00:00:00 2001 From: Visweshwaran S Date: Fri, 26 May 2017 12:19:35 +0530 Subject: [PATCH 1/2] **Details of Commit.** Multiple Changes to realign the folder. **Solutions to following problem** Clearly Define the Folders. Made Molecules as the hero of the project. Implementations of the molecules as a part of the working page as an example. Re align the build scrips to get the example up and running. Make all the files ES6 compliant. --- {config => example/config}/env.js | 0 .../config}/jest/cssTransform.js | 0 .../config}/jest/fileTransform.js | 0 {config => example/config}/paths.js | 23 +++--- {config => example/config}/polyfills.js | 0 .../config}/webpack.config.dev.js | 28 +++---- .../config}/webpack.config.prod.js | 0 example/public/data/catalog.json | 19 +++++ example/public/data/config.json | 22 +++++ example/public/data/news.json | 28 +++++++ {public => example/public}/favicon.ico | Bin .../public}/img/atomic-react-logo-invert.png | Bin .../public}/img/atomic-react-logo.png | Bin {src => example/public}/img/tiger.jpg | Bin {src => example/public}/styles/dark-theme.css | 0 {src => example/public}/styles/index.css | 0 .../public}/styles/light-theme.css | 0 {src => example/src}/App.css | 4 +- example/src/App.js | 76 ++++++++++++++++++ {src => example/src}/App.test.js | 0 example/src/actions/cardContainer-actions.js | 34 ++++++++ .../src}/constants/action-types.js | 0 .../src}/containers/card-container.js | 6 +- {src => example/src}/index.js | 4 +- .../src}/organisms/CardContainer.css | 0 .../src}/organisms/CardContainer.jsx | 2 +- {src => example/src}/organisms/Footer.css | 0 {src => example/src}/organisms/Footer.jsx | 10 +-- {src => example/src}/organisms/Header.css | 0 {src => example/src}/organisms/Header.jsx | 6 +- {src => example/src}/organisms/index.js | 2 +- .../src}/reducers/CardContainer-reducer.js | 0 {src => example/src}/reducers/index.js | 0 {src => example/src}/store/configureStore.js | 4 +- example/src/utils/helper.js | 18 +++++ {src/molecules => molecules}/Avatar.css | 0 {src/molecules => molecules}/Avatar.jsx | 9 ++- {src/molecules => molecules}/Button.css | 0 {src/molecules => molecules}/Button.jsx | 5 +- {src/molecules => molecules}/Card.css | 0 {src/molecules => molecules}/Card.jsx | 0 {src/molecules => molecules}/Grid.jsx | 0 {src/molecules => molecules}/Hero.css | 0 {src/molecules => molecules}/Hero.jsx | 0 {src/molecules => molecules}/Logo.css | 0 {src/molecules => molecules}/Logo.jsx | 2 +- {src/molecules => molecules}/Navigation.css | 0 {src/molecules => molecules}/Navigation.jsx | 0 {src/molecules => molecules}/Panel.css | 0 {src/molecules => molecules}/Panel.jsx | 0 {src/molecules => molecules}/Rating.css | 0 {src/molecules => molecules}/Rating.jsx | 0 {src/molecules => molecules}/Tout.css | 0 {src/molecules => molecules}/Tout.jsx | 0 {src/molecules => molecules}/index.js | 0 public/index.html | 31 ------- scripts/babel-init.js | 3 + src/App.js | 71 ---------------- src/actions/cardContainer-actions.js | 35 -------- src/data/catalog.json | 18 ----- src/data/config.json | 5 -- src/data/news.json | 23 ------ src/utils/helper.js | 17 ---- 63 files changed, 251 insertions(+), 254 deletions(-) rename {config => example/config}/env.js (100%) rename {config => example/config}/jest/cssTransform.js (100%) rename {config => example/config}/jest/fileTransform.js (100%) rename {config => example/config}/paths.js (86%) rename {config => example/config}/polyfills.js (100%) rename {config => example/config}/webpack.config.dev.js (96%) rename {config => example/config}/webpack.config.prod.js (100%) create mode 100755 example/public/data/catalog.json create mode 100644 example/public/data/config.json create mode 100755 example/public/data/news.json rename {public => example/public}/favicon.ico (100%) rename {src => example/public}/img/atomic-react-logo-invert.png (100%) rename {src => example/public}/img/atomic-react-logo.png (100%) rename {src => example/public}/img/tiger.jpg (100%) rename {src => example/public}/styles/dark-theme.css (100%) rename {src => example/public}/styles/index.css (100%) rename {src => example/public}/styles/light-theme.css (100%) rename {src => example/src}/App.css (62%) create mode 100755 example/src/App.js rename {src => example/src}/App.test.js (100%) create mode 100755 example/src/actions/cardContainer-actions.js rename {src => example/src}/constants/action-types.js (100%) rename {src => example/src}/containers/card-container.js (70%) rename {src => example/src}/index.js (74%) rename {src => example/src}/organisms/CardContainer.css (100%) rename {src => example/src}/organisms/CardContainer.jsx (94%) rename {src => example/src}/organisms/Footer.css (100%) rename {src => example/src}/organisms/Footer.jsx (92%) rename {src => example/src}/organisms/Header.css (100%) rename {src => example/src}/organisms/Header.jsx (90%) rename {src => example/src}/organisms/index.js (55%) rename {src => example/src}/reducers/CardContainer-reducer.js (100%) rename {src => example/src}/reducers/index.js (100%) rename {src => example/src}/store/configureStore.js (65%) create mode 100755 example/src/utils/helper.js rename {src/molecules => molecules}/Avatar.css (100%) rename {src/molecules => molecules}/Avatar.jsx (77%) rename {src/molecules => molecules}/Button.css (100%) rename {src/molecules => molecules}/Button.jsx (97%) rename {src/molecules => molecules}/Card.css (100%) rename {src/molecules => molecules}/Card.jsx (100%) rename {src/molecules => molecules}/Grid.jsx (100%) rename {src/molecules => molecules}/Hero.css (100%) rename {src/molecules => molecules}/Hero.jsx (100%) rename {src/molecules => molecules}/Logo.css (100%) rename {src/molecules => molecules}/Logo.jsx (92%) rename {src/molecules => molecules}/Navigation.css (100%) rename {src/molecules => molecules}/Navigation.jsx (100%) rename {src/molecules => molecules}/Panel.css (100%) rename {src/molecules => molecules}/Panel.jsx (100%) rename {src/molecules => molecules}/Rating.css (100%) rename {src/molecules => molecules}/Rating.jsx (100%) rename {src/molecules => molecules}/Tout.css (100%) rename {src/molecules => molecules}/Tout.jsx (100%) rename {src/molecules => molecules}/index.js (100%) delete mode 100755 public/index.html create mode 100644 scripts/babel-init.js delete mode 100755 src/App.js delete mode 100755 src/actions/cardContainer-actions.js delete mode 100755 src/data/catalog.json delete mode 100644 src/data/config.json delete mode 100755 src/data/news.json delete mode 100755 src/utils/helper.js diff --git a/config/env.js b/example/config/env.js similarity index 100% rename from config/env.js rename to example/config/env.js diff --git a/config/jest/cssTransform.js b/example/config/jest/cssTransform.js similarity index 100% rename from config/jest/cssTransform.js rename to example/config/jest/cssTransform.js diff --git a/config/jest/fileTransform.js b/example/config/jest/fileTransform.js similarity index 100% rename from config/jest/fileTransform.js rename to example/config/jest/fileTransform.js diff --git a/config/paths.js b/example/config/paths.js similarity index 86% rename from config/paths.js rename to example/config/paths.js index 97417b9..dab3ca3 100755 --- a/config/paths.js +++ b/example/config/paths.js @@ -1,6 +1,7 @@ -var path = require('path'); -var fs = require('fs'); -var url = require('url'); +const path = require('path'); +const fs = require('fs'); +const url = require('url'); +const envPublicUrl = process.env.PUBLIC_URL; // Make sure any symlinks in the project folder are resolved: // https://github.com/facebookincubator/create-react-app/issues/637 @@ -30,8 +31,6 @@ var nodePaths = (process.env.NODE_PATH || '') .filter(folder => !path.isAbsolute(folder)) .map(resolveApp); -var envPublicUrl = process.env.PUBLIC_URL; - function ensureSlash(path, needsSlash) { var hasSlash = path.endsWith('/'); if (hasSlash && !needsSlash) { @@ -54,10 +53,10 @@ function getPublicUrl(appPackageJson) { // We can't use a relative path in HTML because we don't want to load something // like /todos/42/static/js/bundle.7289d.js. We have to know the root. function getServedPath(appPackageJson) { - var publicUrl = getPublicUrl(appPackageJson); - var servedUrl = envPublicUrl || ( - publicUrl ? url.parse(publicUrl).pathname : '/' - ); + const publicUrl = getPublicUrl(appPackageJson); + const servedUrl = envPublicUrl || ( + publicUrl ? url.parse(publicUrl).pathname : '/' + ); return ensureSlash(servedUrl, true); } @@ -66,11 +65,11 @@ module.exports = { appBuild: resolveApp('build'), appPublic: resolveApp('public'), appHtml: resolveApp('public/index.html'), - appIndexJs: resolveApp('src/index.js'), + appIndexJs: resolveApp('example/src/index.js'), appPackageJson: resolveApp('package.json'), - appSrc: resolveApp('src'), + appSrc: resolveApp('example/src'), yarnLockFile: resolveApp('yarn.lock'), - testsSetup: resolveApp('src/setupTests.js'), + testsSetup: resolveApp('example/src/setupTests.js'), appNodeModules: resolveApp('node_modules'), ownNodeModules: resolveApp('node_modules'), nodePaths: nodePaths, diff --git a/config/polyfills.js b/example/config/polyfills.js similarity index 100% rename from config/polyfills.js rename to example/config/polyfills.js diff --git a/config/webpack.config.dev.js b/example/config/webpack.config.dev.js similarity index 96% rename from config/webpack.config.dev.js rename to example/config/webpack.config.dev.js index fa625e7..9a09dc4 100755 --- a/config/webpack.config.dev.js +++ b/example/config/webpack.config.dev.js @@ -7,8 +7,6 @@ var WatchMissingNodeModulesPlugin = require('react-dev-utils/WatchMissingNodeMod var getClientEnvironment = require('./env'); var paths = require('./paths'); - - // Webpack uses `publicPath` to determine where the app is being served from. // In development, we always serve from the root. This makes config easier. var publicPath = '/'; @@ -79,17 +77,17 @@ module.exports = { 'react-native': 'react-native-web' } }, - + module: { // First, run the linter. // It's important to do this before Babel processes the JS. - /*preLoaders: [ - { - test: /\.(js|jsx)$/, - loader: 'eslint', - include: paths.appSrc, - } - ],*/ + /* preLoaders: [ + { + test: /\.(js|jsx)$/, + loader: 'eslint', + include: paths.appSrc, + } + ],*/ loaders: [ // ** ADDING/UPDATING LOADERS ** // The "url" loader handles all assets unless explicitly excluded. @@ -119,7 +117,7 @@ module.exports = { include: paths.appSrc, loader: 'babel', query: { - + // This is a feature of `babel-loader` for webpack (not Babel itself). // It enables caching results in ./node_modules/.cache/babel-loader/ // directory for faster rebuilds. @@ -135,8 +133,8 @@ module.exports = { test: /\.css$/, loader: 'style!css?importLoaders=1!postcss' - //------ Using CSS Modules-----// - // loader: 'style!css-loader?modules&importLoaders=1&localIdentName=[name]__[local]___[hash:base64:5]!postcss' + //------ Using CSS Modules-----// + // loader: 'style!css-loader?modules&importLoaders=1&localIdentName=[name]__[local]___[hash:base64:5]!postcss' }, // JSON is not enabled by default in Webpack but both Node and Browserify // allow it implicitly so we also enable it. @@ -156,9 +154,9 @@ module.exports = { // Remember to add the new extension(s) to the "url" loader exclusion list. ] }, - + // We use PostCSS for autoprefixing only. - postcss: function() { + postcss: function () { return [ autoprefixer({ browsers: [ diff --git a/config/webpack.config.prod.js b/example/config/webpack.config.prod.js similarity index 100% rename from config/webpack.config.prod.js rename to example/config/webpack.config.prod.js diff --git a/example/public/data/catalog.json b/example/public/data/catalog.json new file mode 100755 index 0000000..c8f4294 --- /dev/null +++ b/example/public/data/catalog.json @@ -0,0 +1,19 @@ +{ + "data": [ + { + "image": "http://placehold.it/256x192/", + "heading": "Men's Jeans", + "text": "An index card consists of card stock cut to a standard size, used for recording and storing small amounts of discrete data. It was invented by Carl Linnaeus, around 1760." + }, + { + "image": "http://placehold.it/256x192/", + "heading": "Men's Formal Pants", + "text": "An index card consists of card stock cut to a standard size, used for recording and storing small amounts of discrete data. It was invented by Carl Linnaeus, around 1760." + }, + { + "image": "http://placehold.it/256x192/", + "heading": "Men's Formal Pants", + "text": "An index card consists of card stock cut to a standard size, used for recording and storing small amounts of discrete data. It was invented by Carl Linnaeus, around 1760." + } + ] +} \ No newline at end of file diff --git a/example/public/data/config.json b/example/public/data/config.json new file mode 100644 index 0000000..de1bcae --- /dev/null +++ b/example/public/data/config.json @@ -0,0 +1,22 @@ +{ + "brandName": "Atomic React", + "theme": "light", + "defaultLogo": "https://image.ibb.co/fNJGbF/atomic_react_logo_invert.png", + "nav": [ + { + "title": "Home", + "url": "https://github.com/pagesource/atomic-react", + "index": "1" + }, + { + "title": "Guidelines", + "url": "https://github.com/areai51/react-component-design", + "index": "2" + }, + { + "title": "Random Bash", + "url": "http://bash.org/?random", + "index": "3" + } + ] +} \ No newline at end of file diff --git a/example/public/data/news.json b/example/public/data/news.json new file mode 100755 index 0000000..ff47876 --- /dev/null +++ b/example/public/data/news.json @@ -0,0 +1,28 @@ +[ + { + "title": "Angular 4 beta is out", + "imgUrl": "img.jpg", + "description": "this is the full description ", + "date": "23 Feb 2017", + "author": "@areai51" + }, + { + "title": "React Fiber coming soon", + "imgUrl": "img.jpg", + "description": "React figbre brings a lot of new improvements ", + "date": "21 Feb 2017", + "author": "@john" + }, + { + "title": "Angular 4 beta is out", + "imgUrl": "img.jpg", + "description": "this is the full description ", + "date": "1 Jan 2017", + "author": "@peter" + }, + { + "title": "Angular 4 beta is out", + "imgUrl": "img.jpg", + "description": "this is the full description " + } +] \ No newline at end of file diff --git a/public/favicon.ico b/example/public/favicon.ico similarity index 100% rename from public/favicon.ico rename to example/public/favicon.ico diff --git a/src/img/atomic-react-logo-invert.png b/example/public/img/atomic-react-logo-invert.png similarity index 100% rename from src/img/atomic-react-logo-invert.png rename to example/public/img/atomic-react-logo-invert.png diff --git a/src/img/atomic-react-logo.png b/example/public/img/atomic-react-logo.png similarity index 100% rename from src/img/atomic-react-logo.png rename to example/public/img/atomic-react-logo.png diff --git a/src/img/tiger.jpg b/example/public/img/tiger.jpg similarity index 100% rename from src/img/tiger.jpg rename to example/public/img/tiger.jpg diff --git a/src/styles/dark-theme.css b/example/public/styles/dark-theme.css similarity index 100% rename from src/styles/dark-theme.css rename to example/public/styles/dark-theme.css diff --git a/src/styles/index.css b/example/public/styles/index.css similarity index 100% rename from src/styles/index.css rename to example/public/styles/index.css diff --git a/src/styles/light-theme.css b/example/public/styles/light-theme.css similarity index 100% rename from src/styles/light-theme.css rename to example/public/styles/light-theme.css diff --git a/src/App.css b/example/src/App.css similarity index 62% rename from src/App.css rename to example/src/App.css index 9d7a428..bc69343 100755 --- a/src/App.css +++ b/example/src/App.css @@ -1,5 +1,5 @@ -@import './styles/light-theme.css'; -@import './styles/dark-theme.css'; +@import '../public/styles/light-theme.css'; +@import '../public/styles/dark-theme.css'; .app { width: 95%; diff --git a/example/src/App.js b/example/src/App.js new file mode 100755 index 0000000..267d38a --- /dev/null +++ b/example/src/App.js @@ -0,0 +1,76 @@ +import React, { Component } from 'react'; +import { CardContainer, Footer, Header } from '../example/organisms'; +import { Grid, Hero, Navigation, Panel, Tout } from './molecules'; +import classnames from 'classnames'; + +import './App.css'; +import config from '../public/data/config.json'; + +class App extends Component { + render() { + + const theme = config.theme; + + return ( +
+
+ + + + + + +

Cards

+ + +

Panel

+ + + + +

Sir Joseph John Thomson (18 December 1856 – 30 August 1940) was an English physicist and Nobel laureate + in physics, credited with the discovery and identification of the electron; and with the discovery of the + first subatomic particle. He was elected as a fellow of the Royal Society of London and appointed to the + Cavendish Professorship of Experimental Physics at the Cambridge University's Cavendish Laboratory in + 1884. In 1897, Thomson showed that cathode rays were composed of previously unknown negatively charged + particles, which he calculated must have bodies much smaller than atoms and a very large value for their + charge-to-mass ratio.[3] Thomson is also credited with finding the first evidence for isotopes of a stable + (non-radioactive) element in 1913, as part of his exploration into the composition of canal rays (positive + ions). His experiments to determine the nature of positively charged particles, with Francis William + Aston, were the first use of mass spectrometry and led to the development of the mass spectrograph. + Thomson was awarded the 1906 Nobel Prize in Physics for his work on the conduction of electricity in + gases. Seven of his students, including his son George Paget Thomson, also became Nobel Prize winners + either in physics or in chemistry. His record is comparable only to that of the German physicist Arnold + Sommerfeld.

+
+
+ +
+
+ ); + } +} + +export default App; diff --git a/src/App.test.js b/example/src/App.test.js similarity index 100% rename from src/App.test.js rename to example/src/App.test.js diff --git a/example/src/actions/cardContainer-actions.js b/example/src/actions/cardContainer-actions.js new file mode 100755 index 0000000..d4318f5 --- /dev/null +++ b/example/src/actions/cardContainer-actions.js @@ -0,0 +1,34 @@ +import { cardSuccess } from '../constants/action-types'; +import catalogDetails from '../../public/data/catalog.json'; + +/* To fetch data from an API call*/ +// import { fetchCatelogDetailsData } from './../utils/helper'; + +/* To fetch data from an API call*/ +/* export const fetchCatelogCards = () => { + return function(dispatch){ + fetchCatelogDetailsData() + .then(function (response) { + console.log(response); + // Dispatch the success action with the payload + dispatch({ + type: cardSuccess, + payload: response.data, + }); + }.bind(this)) + .catch(function (error) { + // Dispatch the error action with error information + dispatch({ + type: Card_FAIL, + error: error + }); + }); + }; + }*/ + +export const fetchCatalogCards = () => { + return { + type: cardSuccess, + payload: catalogDetails + }; +}; diff --git a/src/constants/action-types.js b/example/src/constants/action-types.js similarity index 100% rename from src/constants/action-types.js rename to example/src/constants/action-types.js diff --git a/src/containers/card-container.js b/example/src/containers/card-container.js similarity index 70% rename from src/containers/card-container.js rename to example/src/containers/card-container.js index a87c1fa..5d08c90 100755 --- a/src/containers/card-container.js +++ b/example/src/containers/card-container.js @@ -1,8 +1,8 @@ import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; -import { fetchCatelogCards } from './../actions/cardContainer-actions'; +import { fetchCatalogCards } from '../actions/cardContainer-actions'; -import CardContainer from './../organisms/CardContainer'; +import CardContainer from '../organisms/CardContainer'; const mapStateToProps = (state) => { return { @@ -12,7 +12,7 @@ const mapStateToProps = (state) => { const mapDispatchToProps = (dispatch) => { return bindActionCreators({ - fetchCatelogCards + fetchCatalogCards }, dispatch); }; diff --git a/src/index.js b/example/src/index.js similarity index 74% rename from src/index.js rename to example/src/index.js index 6cdbd40..d3e2d1e 100755 --- a/src/index.js +++ b/example/src/index.js @@ -1,11 +1,11 @@ import React from 'react'; import { render } from 'react-dom'; -import configureStore from './store/configureStore'; +import configureStore from '../example/store/configureStore'; import { Provider } from 'react-redux'; // import App from './App'; import App from './App'; -import './styles/index.css'; +import '../public/styles/index.css'; const store = configureStore(); diff --git a/src/organisms/CardContainer.css b/example/src/organisms/CardContainer.css similarity index 100% rename from src/organisms/CardContainer.css rename to example/src/organisms/CardContainer.css diff --git a/src/organisms/CardContainer.jsx b/example/src/organisms/CardContainer.jsx similarity index 94% rename from src/organisms/CardContainer.jsx rename to example/src/organisms/CardContainer.jsx index 6dfcb46..5033bab 100755 --- a/src/organisms/CardContainer.jsx +++ b/example/src/organisms/CardContainer.jsx @@ -1,6 +1,6 @@ import React, { Component, PropTypes } from 'react'; -import { Card } from '../molecules'; +import { Card } from '../../src/molecules/index'; /* import styles from './CardContainer.css'; */ // const cards = Array.from({ length: 3 }, (c) => card) diff --git a/src/organisms/Footer.css b/example/src/organisms/Footer.css similarity index 100% rename from src/organisms/Footer.css rename to example/src/organisms/Footer.css diff --git a/src/organisms/Footer.jsx b/example/src/organisms/Footer.jsx similarity index 92% rename from src/organisms/Footer.jsx rename to example/src/organisms/Footer.jsx index 1ca182c..3554039 100755 --- a/src/organisms/Footer.jsx +++ b/example/src/organisms/Footer.jsx @@ -2,7 +2,7 @@ import React, { PropTypes } from 'react'; import './Footer.css'; import classnames from 'classnames'; -const Footer = ({ ...props }) => { +const Footer = (props) => { const { currentYear, links, theme } = props; return ( @@ -21,15 +21,15 @@ const Footer = ({ ...props }) => { Footer.propTypes = { /** * Links Array - */ + */ links: PropTypes.arrayOf(PropTypes.shape({})), /** * Current Year - */ + */ currentYear: PropTypes.number, /** - * Theme - */ + * Theme + */ theme: PropTypes.oneOf(['light', 'dark']) }; diff --git a/src/organisms/Header.css b/example/src/organisms/Header.css similarity index 100% rename from src/organisms/Header.css rename to example/src/organisms/Header.css diff --git a/src/organisms/Header.jsx b/example/src/organisms/Header.jsx similarity index 90% rename from src/organisms/Header.jsx rename to example/src/organisms/Header.jsx index 71fae3a..e317036 100755 --- a/src/organisms/Header.jsx +++ b/example/src/organisms/Header.jsx @@ -1,6 +1,6 @@ import React, { PropTypes } from 'react'; -import { Avatar, Logo } from '../molecules'; +import { Avatar, Logo } from '../../src/molecules/index'; import './Header.css'; import classnames from 'classnames'; @@ -31,8 +31,8 @@ Header.defaultProps = { Header.propTypes = { /** - * Theme - */ + * Theme + */ theme: PropTypes.oneOf(['light', 'dark']) }; diff --git a/src/organisms/index.js b/example/src/organisms/index.js similarity index 55% rename from src/organisms/index.js rename to example/src/organisms/index.js index 88dd7f0..0ae435a 100755 --- a/src/organisms/index.js +++ b/example/src/organisms/index.js @@ -1,5 +1,5 @@ export { default as Header } from './Header'; export { default as Footer } from './Footer'; -export { default as CardContainer } from './../containers/card-container'; +export { default as CardContainer } from '../containers/card-container'; diff --git a/src/reducers/CardContainer-reducer.js b/example/src/reducers/CardContainer-reducer.js similarity index 100% rename from src/reducers/CardContainer-reducer.js rename to example/src/reducers/CardContainer-reducer.js diff --git a/src/reducers/index.js b/example/src/reducers/index.js similarity index 100% rename from src/reducers/index.js rename to example/src/reducers/index.js diff --git a/src/store/configureStore.js b/example/src/store/configureStore.js similarity index 65% rename from src/store/configureStore.js rename to example/src/store/configureStore.js index c557a44..147cc22 100755 --- a/src/store/configureStore.js +++ b/example/src/store/configureStore.js @@ -1,5 +1,5 @@ -import { createStore, applyMiddleware, compose } from 'redux'; -import rootReducer from '../reducers'; +import { applyMiddleware, compose, createStore } from 'redux'; +import rootReducer from '../reducers/index'; import thunk from 'redux-thunk'; export default function configureStore(initialState) { diff --git a/example/src/utils/helper.js b/example/src/utils/helper.js new file mode 100755 index 0000000..a2aa609 --- /dev/null +++ b/example/src/utils/helper.js @@ -0,0 +1,18 @@ +const axios = require('axios'); + +export const getData = (url) => { + return axios.get(url) + .then(function (response) { + return response; + }) + .catch(function (error) { + return error; + }); +}; + +/* To fetch data from an API call + export const fetchCatalogDetailsData = () => { + const url = 'https://jsonplaceholder.typicode.com/users'; + return getData(url); + }; + */ \ No newline at end of file diff --git a/src/molecules/Avatar.css b/molecules/Avatar.css similarity index 100% rename from src/molecules/Avatar.css rename to molecules/Avatar.css diff --git a/src/molecules/Avatar.jsx b/molecules/Avatar.jsx similarity index 77% rename from src/molecules/Avatar.jsx rename to molecules/Avatar.jsx index deb6b4f..165e38d 100755 --- a/src/molecules/Avatar.jsx +++ b/molecules/Avatar.jsx @@ -1,8 +1,9 @@ import React, { PropTypes } from 'react'; +// Import of Styles could be as simple as importing the file like given below. import './Avatar.css'; -const Avatar = ({ ...props }) => { +const Avatar = (props) => { return ( { Avatar.propTypes = { /** * Picture URL - */ + */ picUrl: PropTypes.string, /** * Alt Tag - */ + */ altTag: PropTypes.string, /** * Image Size - */ + */ size: PropTypes.number }; diff --git a/src/molecules/Button.css b/molecules/Button.css similarity index 100% rename from src/molecules/Button.css rename to molecules/Button.css diff --git a/src/molecules/Button.jsx b/molecules/Button.jsx similarity index 97% rename from src/molecules/Button.jsx rename to molecules/Button.jsx index 6ab9b22..e91fa0d 100755 --- a/src/molecules/Button.jsx +++ b/molecules/Button.jsx @@ -1,7 +1,6 @@ import React, { PropTypes } from 'react'; import './Button.css'; - const Button = (props) => { return ( @@ -19,11 +18,11 @@ const Button = (props) => { Button.propTypes = { /** * onClick Function - */ + */ onClick: PropTypes.func, /** * Children - */ + */ children: PropTypes.string }; export default Button; diff --git a/src/molecules/Card.css b/molecules/Card.css similarity index 100% rename from src/molecules/Card.css rename to molecules/Card.css diff --git a/src/molecules/Card.jsx b/molecules/Card.jsx similarity index 100% rename from src/molecules/Card.jsx rename to molecules/Card.jsx diff --git a/src/molecules/Grid.jsx b/molecules/Grid.jsx similarity index 100% rename from src/molecules/Grid.jsx rename to molecules/Grid.jsx diff --git a/src/molecules/Hero.css b/molecules/Hero.css similarity index 100% rename from src/molecules/Hero.css rename to molecules/Hero.css diff --git a/src/molecules/Hero.jsx b/molecules/Hero.jsx similarity index 100% rename from src/molecules/Hero.jsx rename to molecules/Hero.jsx diff --git a/src/molecules/Logo.css b/molecules/Logo.css similarity index 100% rename from src/molecules/Logo.css rename to molecules/Logo.css diff --git a/src/molecules/Logo.jsx b/molecules/Logo.jsx similarity index 92% rename from src/molecules/Logo.jsx rename to molecules/Logo.jsx index 46af180..ba07bd1 100644 --- a/src/molecules/Logo.jsx +++ b/molecules/Logo.jsx @@ -1,5 +1,5 @@ import React, { PropTypes } from 'react'; -import config from '../data/config.json'; +import config from '../../public/data/config.json'; import './Logo.css'; diff --git a/src/molecules/Navigation.css b/molecules/Navigation.css similarity index 100% rename from src/molecules/Navigation.css rename to molecules/Navigation.css diff --git a/src/molecules/Navigation.jsx b/molecules/Navigation.jsx similarity index 100% rename from src/molecules/Navigation.jsx rename to molecules/Navigation.jsx diff --git a/src/molecules/Panel.css b/molecules/Panel.css similarity index 100% rename from src/molecules/Panel.css rename to molecules/Panel.css diff --git a/src/molecules/Panel.jsx b/molecules/Panel.jsx similarity index 100% rename from src/molecules/Panel.jsx rename to molecules/Panel.jsx diff --git a/src/molecules/Rating.css b/molecules/Rating.css similarity index 100% rename from src/molecules/Rating.css rename to molecules/Rating.css diff --git a/src/molecules/Rating.jsx b/molecules/Rating.jsx similarity index 100% rename from src/molecules/Rating.jsx rename to molecules/Rating.jsx diff --git a/src/molecules/Tout.css b/molecules/Tout.css similarity index 100% rename from src/molecules/Tout.css rename to molecules/Tout.css diff --git a/src/molecules/Tout.jsx b/molecules/Tout.jsx similarity index 100% rename from src/molecules/Tout.jsx rename to molecules/Tout.jsx diff --git a/src/molecules/index.js b/molecules/index.js similarity index 100% rename from src/molecules/index.js rename to molecules/index.js diff --git a/public/index.html b/public/index.html deleted file mode 100755 index 0c20e95..0000000 --- a/public/index.html +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - Atomic React - - -
- - - diff --git a/scripts/babel-init.js b/scripts/babel-init.js new file mode 100644 index 0000000..49b08fc --- /dev/null +++ b/scripts/babel-init.js @@ -0,0 +1,3 @@ +/** + * Created by vsury1 on 5/26/17. + */ diff --git a/src/App.js b/src/App.js deleted file mode 100755 index b946b01..0000000 --- a/src/App.js +++ /dev/null @@ -1,71 +0,0 @@ -import React, { Component } from 'react'; -import { Header, Footer, CardContainer } from './organisms'; -import { Panel, Grid, Hero, Navigation, Tout } from './molecules'; -import classnames from 'classnames'; - -import './App.css'; -import config from './data/config.json'; - -// TODO: Move these arrays to JSON file(s). Remove Index and use uniqueKeys -const navLinks = [ - { title: 'Home', url: 'https://github.com/pagesource/atomic-react', index: '1' }, - { title: 'Guidelines', url: 'https://github.com/areai51/react-component-design', index: '2' }, - { title: 'Random Bash', url: 'http://bash.org/?random', index: '3' } -]; - -/* eslint-disable */ -class App extends Component { - render() { - - const theme = config.theme; - - return ( -
-
- - - - - - -

Cards

- - -

Panel

- - - - -

Sir Joseph John Thomson (18 December 1856 – 30 August 1940) was an English physicist and Nobel laureate in physics, credited with the discovery and identification of the electron; and with the discovery of the first subatomic particle. He was elected as a fellow of the Royal Society of London and appointed to the Cavendish Professorship of Experimental Physics at the Cambridge University's Cavendish Laboratory in 1884. In 1897, Thomson showed that cathode rays were composed of previously unknown negatively charged particles, which he calculated must have bodies much smaller than atoms and a very large value for their charge-to-mass ratio.[3] Thomson is also credited with finding the first evidence for isotopes of a stable (non-radioactive) element in 1913, as part of his exploration into the composition of canal rays (positive ions). His experiments to determine the nature of positively charged particles, with Francis William Aston, were the first use of mass spectrometry and led to the development of the mass spectrograph. Thomson was awarded the 1906 Nobel Prize in Physics for his work on the conduction of electricity in gases. Seven of his students, including his son George Paget Thomson, also became Nobel Prize winners either in physics or in chemistry. His record is comparable only to that of the German physicist Arnold Sommerfeld.

-
-
- -
-
- ); - } -} - -export default App; diff --git a/src/actions/cardContainer-actions.js b/src/actions/cardContainer-actions.js deleted file mode 100755 index ecfbcd5..0000000 --- a/src/actions/cardContainer-actions.js +++ /dev/null @@ -1,35 +0,0 @@ -import { cardSuccess } from './../constants/action-types'; -import catalogDetails from './../data/catalog.json'; - -/* To fetch data from an API call*/ -// import { fetchCatelogDetailsData } from './../utils/helper'; - -/* To fetch data from an API call*/ -/* export const fetchCatelogCards = () => { - return function(dispatch){ - fetchCatelogDetailsData() - .then(function (response) { - console.log(response); - // Dispatch the success action with the payload - dispatch({ - type: cardSuccess, - payload: response.data, - }); - }.bind(this)) - .catch(function (error) { - // Dispatch the error action with error information - dispatch({ - type: Card_FAIL, - error: error - }); - }); - }; -}*/ - -export const fetchCatelogCards = () => { - return { - type: cardSuccess, - payload: catalogDetails - }; -}; - diff --git a/src/data/catalog.json b/src/data/catalog.json deleted file mode 100755 index 29b607d..0000000 --- a/src/data/catalog.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "data": [{ - "image": "http://placehold.it/256x192/", - "heading": "Men's Jeans", - "text": "An index card consists of card stock cut to a standard size, used for recording and storing small amounts of discrete data. It was invented by Carl Linnaeus, around 1760." - }, { - "image": "http://placehold.it/256x192/", - "heading": "Men's Formal Pants", - "text": "An index card consists of card stock cut to a standard size, used for recording and storing small amounts of discrete data. It was invented by Carl Linnaeus, around 1760." - }, - - { - "image": "http://placehold.it/256x192/", - "heading": "Men's Formal Pants", - "text": "An index card consists of card stock cut to a standard size, used for recording and storing small amounts of discrete data. It was invented by Carl Linnaeus, around 1760." - } - ] -} \ No newline at end of file diff --git a/src/data/config.json b/src/data/config.json deleted file mode 100644 index ecf64fb..0000000 --- a/src/data/config.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "brnadName": "Atomic React", - "theme": "light", - "defaultLogo": "https://image.ibb.co/fNJGbF/atomic_react_logo_invert.png" -} \ No newline at end of file diff --git a/src/data/news.json b/src/data/news.json deleted file mode 100755 index 7e23c61..0000000 --- a/src/data/news.json +++ /dev/null @@ -1,23 +0,0 @@ -[{ - "title": "Angular 4 beta is out", - "imgUrl": "img.jpg", - "description": "this is the full description ", - "date": "23 Feb 2017", - "author": "@areai51" -}, { - "title": "React Fiber coming soon", - "imgUrl": "img.jpg", - "description": "React figbre brings a lot of new improvements ", - "date": "21 Feb 2017", - "author": "@john" -}, { - "title": "Angular 4 beta is out", - "imgUrl": "img.jpg", - "description": "this is the full description ", - "date": "1 Jan 2017", - "author": "@peter" -}, { - "title": "Angular 4 beta is out", - "imgUrl": "img.jpg", - "description": "this is the full description " -}] \ No newline at end of file diff --git a/src/utils/helper.js b/src/utils/helper.js deleted file mode 100755 index e8ce0f7..0000000 --- a/src/utils/helper.js +++ /dev/null @@ -1,17 +0,0 @@ -const axios = require('axios'); - -export const getData = (url) => { - return axios.get(url) - .then(function(response) { - return response; -}) - .catch(function(error) { - return error; -}); -}; - -/* To fetch data from an API call*/ -export const fetchCatelogDetailsData = () => { - const url = 'https://jsonplaceholder.typicode.com/users'; - return getData(url); -}; From bde61fbd469b64c99a449071038a337ba52067ec Mon Sep 17 00:00:00 2001 From: Visweshwaran S Date: Fri, 26 May 2017 12:22:19 +0530 Subject: [PATCH 2/2] **Details of Commit.** Multiple Changes to realign the folder. **Solutions to following problem** Clearly Define the Folders. Made Molecules as the hero of the project. Implementations of the molecules as a part of the working page as an example. Re align the build scrips to get the example up and running. Make all the files ES6 compliant. --- .babelrc | 6 +- README.md | 5 +- example/config/env.js | 10 +- example/config/paths.js | 35 +- example/config/webpack.config.dev.js | 50 ++- example/config/webpack.config.prod.js | 41 +-- example/src/App.css | 12 +- example/src/App.js | 117 +++--- example/src/containers/card-container.js | 4 +- example/src/index.js | 8 +- example/src/organisms/CardContainer.jsx | 15 +- example/src/organisms/Footer.css | 8 +- example/src/organisms/Header.css | 4 +- example/src/organisms/Header.jsx | 9 +- example/src/organisms/index.js | 1 - example/src/reducers/index.js | 2 +- example/src/utils/helper.js | 4 +- molecules/Avatar.css | 8 +- molecules/Avatar.jsx | 1 - molecules/Button.css | 6 +- molecules/Card.css | 18 +- molecules/Card.jsx | 11 +- molecules/Grid.jsx | 4 +- molecules/Hero.css | 34 +- molecules/Hero.jsx | 32 +- molecules/Logo.css | 4 +- molecules/Logo.jsx | 18 +- molecules/Navigation.css | 14 +- molecules/Navigation.jsx | 10 +- molecules/Panel.css | 7 +- molecules/Panel.jsx | 8 +- molecules/Rating.css | 4 +- molecules/Tout.css | 42 +-- molecules/Tout.jsx | 22 +- molecules/index.js | 1 - package.json | 16 +- scripts/babel-init.js | 8 +- scripts/build.js | 139 ++++--- scripts/start.js | 118 +++--- scripts/test.js | 10 +- yarn.lock | 437 +++++++++++++++++++++-- 41 files changed, 845 insertions(+), 458 deletions(-) diff --git a/.babelrc b/.babelrc index 38733e6..04d0ec0 100644 --- a/.babelrc +++ b/.babelrc @@ -1,3 +1,7 @@ { - "presets": ["react", "es2015", "stage-0"] + "presets": [ + "react", + "es2015", + "stage-0" + ] } diff --git a/README.md b/README.md index 21ed0e0..6b28a01 100755 --- a/README.md +++ b/README.md @@ -8,7 +8,10 @@ Atomic React enables rapid development of web applications by using readily avai ## Reference Guides. The components being built follow the [Component Design Guidelines](https://github.com/areai51/react-component-design) -## Setup +## Molecules +Building Blocks of the repo built on the guide above. + +## Setup the example Clone the Repo `$npm i` diff --git a/example/config/env.js b/example/config/env.js index ce99b6b..fbaefb9 100755 --- a/example/config/env.js +++ b/example/config/env.js @@ -1,10 +1,10 @@ // Grab NODE_ENV and REACT_APP_* environment variables and prepare them to be // injected into the application via DefinePlugin in Webpack configuration. -var REACT_APP = /^REACT_APP_/i; +const REACT_APP = /^REACT_APP_/i; function getClientEnvironment(publicUrl) { - var raw = Object + const raw = Object .keys(process.env) .filter(key => REACT_APP.test(key)) .reduce((env, key) => { @@ -13,15 +13,15 @@ function getClientEnvironment(publicUrl) { }, { // Useful for determining whether we’re running in production mode. // Most importantly, it switches React into the correct mode. - 'NODE_ENV': process.env.NODE_ENV || 'development', + NODE_ENV: process.env.NODE_ENV || 'development', // Useful for resolving the correct path to static assets in `public`. // For example, . // This should only be used as an escape hatch. Normally you would put // images into the `src` and `import` them in code to get their paths. - 'PUBLIC_URL': publicUrl + PUBLIC_URL: publicUrl }); // Stringify all values so we can feed into Webpack DefinePlugin - var stringified = { + const stringified = { 'process.env': Object .keys(raw) .reduce((env, key) => { diff --git a/example/config/paths.js b/example/config/paths.js index dab3ca3..58b6360 100755 --- a/example/config/paths.js +++ b/example/config/paths.js @@ -1,11 +1,17 @@ -const path = require('path'); -const fs = require('fs'); -const url = require('url'); -const envPublicUrl = process.env.PUBLIC_URL; +import path from 'path'; +import fs from 'fs'; +import url from 'url'; +const envPublicUrl = process.env.PUBLIC_URL; +const nodePaths = (process.env.NODE_PATH || '') + .split(process.platform === 'win32' ? ';' : ':') + .filter(Boolean) + .filter(folder => !path.isAbsolute(folder)) + .map(resolveApp); // Make sure any symlinks in the project folder are resolved: // https://github.com/facebookincubator/create-react-app/issues/637 -var appDirectory = fs.realpathSync(process.cwd()); +const appDirectory = fs.realpathSync(process.cwd()); + function resolveApp(relativePath) { return path.resolve(appDirectory, relativePath); } @@ -25,18 +31,12 @@ function resolveApp(relativePath) { // Otherwise, we risk importing Node.js core modules into an app instead of Webpack shims. // https://github.com/facebookincubator/create-react-app/issues/1023#issuecomment-265344421 -var nodePaths = (process.env.NODE_PATH || '') - .split(process.platform === 'win32' ? ';' : ':') - .filter(Boolean) - .filter(folder => !path.isAbsolute(folder)) - .map(resolveApp); - function ensureSlash(path, needsSlash) { - var hasSlash = path.endsWith('/'); + const hasSlash = path.endsWith('/'); if (hasSlash && !needsSlash) { return path.substr(path, path.length - 1); } else if (!hasSlash && needsSlash) { - return path + '/'; + return `${path}/`; } else { return path; } @@ -61,18 +61,19 @@ function getServedPath(appPackageJson) { } // config after eject: we're in ./config/ -module.exports = { +export default { appBuild: resolveApp('build'), - appPublic: resolveApp('public'), - appHtml: resolveApp('public/index.html'), + appPublic: resolveApp('example/public'), + appHtml: resolveApp('example/public/index.html'), appIndexJs: resolveApp('example/src/index.js'), appPackageJson: resolveApp('package.json'), appSrc: resolveApp('example/src'), + moleculeSrc: resolveApp('molecules'), yarnLockFile: resolveApp('yarn.lock'), testsSetup: resolveApp('example/src/setupTests.js'), appNodeModules: resolveApp('node_modules'), ownNodeModules: resolveApp('node_modules'), - nodePaths: nodePaths, + nodePaths, publicUrl: getPublicUrl(resolveApp('package.json')), servedPath: getServedPath(resolveApp('package.json')) }; diff --git a/example/config/webpack.config.dev.js b/example/config/webpack.config.dev.js index 9a09dc4..406f886 100755 --- a/example/config/webpack.config.dev.js +++ b/example/config/webpack.config.dev.js @@ -1,26 +1,26 @@ -var autoprefixer = require('autoprefixer'); -var webpack = require('webpack'); -var HtmlWebpackPlugin = require('html-webpack-plugin'); -var CaseSensitivePathsPlugin = require('case-sensitive-paths-webpack-plugin'); -var InterpolateHtmlPlugin = require('react-dev-utils/InterpolateHtmlPlugin'); -var WatchMissingNodeModulesPlugin = require('react-dev-utils/WatchMissingNodeModulesPlugin'); -var getClientEnvironment = require('./env'); -var paths = require('./paths'); +import autoprefixer from 'autoprefixer'; +import webpack from 'webpack'; +import HtmlWebpackPlugin from 'html-webpack-plugin'; +import CaseSensitivePathsPlugin from 'case-sensitive-paths-webpack-plugin'; +import InterpolateHtmlPlugin from 'react-dev-utils/InterpolateHtmlPlugin'; +import WatchMissingNodeModulesPlugin from 'react-dev-utils/WatchMissingNodeModulesPlugin'; +import getClientEnvironment from './env'; +import paths from './paths'; // Webpack uses `publicPath` to determine where the app is being served from. // In development, we always serve from the root. This makes config easier. -var publicPath = '/'; +const publicPath = '/'; // `publicUrl` is just like `publicPath`, but we will provide it to our app // as %PUBLIC_URL% in `index.html` and `process.env.PUBLIC_URL` in JavaScript. // Omit trailing slash as %PUBLIC_PATH%/xyz looks better than %PUBLIC_PATH%xyz. -var publicUrl = ''; +const publicUrl = ''; // Get environment variables to inject into our app. -var env = getClientEnvironment(publicUrl); +const env = getClientEnvironment(publicUrl); // This is the development configuration. // It is focused on developer experience and fast rebuilds. // The production configuration is different and lives in a separate file. -module.exports = { +export default { // You may want 'eval' instead if you prefer to see the compiled output in DevTools. // See the discussion in https://github.com/facebookincubator/create-react-app/issues/343. devtool: 'cheap-module-source-map', @@ -114,7 +114,7 @@ module.exports = { // Process JS with Babel. { test: /\.(js|jsx)$/, - include: paths.appSrc, + include: [paths.appSrc, paths.moleculeSrc], loader: 'babel', query: { @@ -133,7 +133,7 @@ module.exports = { test: /\.css$/, loader: 'style!css?importLoaders=1!postcss' - //------ Using CSS Modules-----// + // ------ Using CSS Modules-----// // loader: 'style!css-loader?modules&importLoaders=1&localIdentName=[name]__[local]___[hash:base64:5]!postcss' }, // JSON is not enabled by default in Webpack but both Node and Browserify @@ -156,18 +156,16 @@ module.exports = { }, // We use PostCSS for autoprefixing only. - postcss: function () { - return [ - autoprefixer({ - browsers: [ - '>1%', - 'last 4 versions', - 'Firefox ESR', - 'not ie < 9', // React doesn't support IE8 anyway - ] - }), - ]; - }, + postcss: () => [ + autoprefixer({ + browsers: [ + '>1%', + 'last 4 versions', + 'Firefox ESR', + 'not ie < 9', // React doesn't support IE8 anyway + ] + }), + ], plugins: [ // Makes some environment variables available in index.html. // The public URL is available as %PUBLIC_URL% in index.html, e.g.: diff --git a/example/config/webpack.config.prod.js b/example/config/webpack.config.prod.js index c5c14c9..7511a32 100755 --- a/example/config/webpack.config.prod.js +++ b/example/config/webpack.config.prod.js @@ -1,27 +1,24 @@ -var autoprefixer = require('autoprefixer'); -var webpack = require('webpack'); -var HtmlWebpackPlugin = require('html-webpack-plugin'); -var ExtractTextPlugin = require('extract-text-webpack-plugin'); -var ManifestPlugin = require('webpack-manifest-plugin'); -var InterpolateHtmlPlugin = require('react-dev-utils/InterpolateHtmlPlugin'); -var url = require('url'); -var paths = require('./paths'); -var getClientEnvironment = require('./env'); - - +import autoprefixer from 'autoprefixer'; +import webpack from 'webpack'; +import HtmlWebpackPlugin from 'html-webpack-plugin'; +import ExtractTextPlugin from 'extract-text-webpack-plugin'; +import ManifestPlugin from 'webpack-manifest-plugin'; +import InterpolateHtmlPlugin from 'react-dev-utils/InterpolateHtmlPlugin'; +import paths from './paths'; +import getClientEnvironment from './env'; // Webpack uses `publicPath` to determine where the app is being served from. // It requires a trailing slash, or the file assets will get an incorrect path. -var publicPath = paths.servedPath; +const publicPath = paths.servedPath; // Some apps do not use client-side routing with pushState. // For these, "homepage" can be set to "." to enable relative asset paths. -var shouldUseRelativeAssetPaths = publicPath === './'; +const shouldUseRelativeAssetPaths = publicPath === './'; // `publicUrl` is just like `publicPath`, but we will provide it to our app // as %PUBLIC_URL% in `index.html` and `process.env.PUBLIC_URL` in JavaScript. // Omit trailing slash as %PUBLIC_URL%/xyz looks better than %PUBLIC_URL%xyz. -var publicUrl = publicPath.slice(0, -1); +const publicUrl = publicPath.slice(0, -1); // Get environment variables to inject into our app. -var env = getClientEnvironment(publicUrl); +const env = getClientEnvironment(publicUrl); // Assert this just to be safe. // Development builds of React are slow and not intended for production. @@ -44,7 +41,7 @@ const extractTextPluginOptions = shouldUseRelativeAssetPaths // This is the production configuration. // It compiles slowly and is focused on producing a fast and minimal bundle. // The development configuration is different and lives in a separate file. -module.exports = { +export default { // Don't attempt to continue if there are any errors. bail: true, // We generate sourcemaps in production. This is slow but gives good results. @@ -64,7 +61,7 @@ module.exports = { filename: 'static/js/[name].[chunkhash:8].js', chunkFilename: 'static/js/[name].[chunkhash:8].chunk.js', // We inferred the "public path" (such as / or /my-project) from homepage. - publicPath: publicPath + publicPath }, resolve: { // This allows you to set a fallback for where Webpack should look for modules. @@ -84,7 +81,7 @@ module.exports = { 'react-native': 'react-native-web' } }, - + module: { // First, run the linter. // It's important to do this before Babel processes the JS. @@ -121,9 +118,9 @@ module.exports = { // Process JS with Babel. { test: /\.(js|jsx)$/, - include: paths.appSrc, + include: [paths.appSrc, paths.moleculeSrc], loader: 'babel', - + }, // The notation here is somewhat confusing. // "postcss" loader applies autoprefixer to our CSS. @@ -164,9 +161,9 @@ module.exports = { // Remember to add the new extension(s) to the "url" loader exclusion list. ] }, - + // We use PostCSS for autoprefixing only. - postcss: function() { + postcss() { return [ autoprefixer({ browsers: [ diff --git a/example/src/App.css b/example/src/App.css index bc69343..57dbc3f 100755 --- a/example/src/App.css +++ b/example/src/App.css @@ -2,13 +2,17 @@ @import '../public/styles/dark-theme.css'; .app { - width: 95%; - margin: 0 auto; + width: 95%; + margin: 0 auto; } @keyframes app-logo-spin { - from { transform: rotate(0deg); } - to { transform: rotate(360deg); } + from { + transform: rotate(0deg); + } + to { + transform: rotate(360deg); + } } diff --git a/example/src/App.js b/example/src/App.js index 267d38a..5601d72 100755 --- a/example/src/App.js +++ b/example/src/App.js @@ -1,76 +1,69 @@ -import React, { Component } from 'react'; -import { CardContainer, Footer, Header } from '../example/organisms'; -import { Grid, Hero, Navigation, Panel, Tout } from './molecules'; +import React from 'react'; +import { CardContainer, Footer, Header } from './organisms/index'; +import { Grid, Hero, Navigation, Panel, Tout } from '../../molecules'; import classnames from 'classnames'; import './App.css'; import config from '../public/data/config.json'; -class App extends Component { - render() { +export const App = () => { + const theme = config.theme; - const theme = config.theme; + return (
+
- return ( -
-
+ - - - - - -

Cards

- + -

Panel

- + +

Cards

+ - +

Panel

+ -

Sir Joseph John Thomson (18 December 1856 – 30 August 1940) was an English physicist and Nobel laureate - in physics, credited with the discovery and identification of the electron; and with the discovery of the - first subatomic particle. He was elected as a fellow of the Royal Society of London and appointed to the - Cavendish Professorship of Experimental Physics at the Cambridge University's Cavendish Laboratory in - 1884. In 1897, Thomson showed that cathode rays were composed of previously unknown negatively charged - particles, which he calculated must have bodies much smaller than atoms and a very large value for their - charge-to-mass ratio.[3] Thomson is also credited with finding the first evidence for isotopes of a stable - (non-radioactive) element in 1913, as part of his exploration into the composition of canal rays (positive - ions). His experiments to determine the nature of positively charged particles, with Francis William - Aston, were the first use of mass spectrometry and led to the development of the mass spectrograph. - Thomson was awarded the 1906 Nobel Prize in Physics for his work on the conduction of electricity in - gases. Seven of his students, including his son George Paget Thomson, also became Nobel Prize winners - either in physics or in chemistry. His record is comparable only to that of the German physicist Arnold - Sommerfeld.

-
-
- -
-
- ); - } -} -export default App; +

Sir Joseph John Thomson (18 December 1856 – 30 August 1940) was an English physicist and Nobel laureate + in physics, credited with the discovery and identification of the electron; and with the discovery of the + first subatomic particle. He was elected as a fellow of the Royal Society of London and appointed to the + Cavendish Professorship of Experimental Physics at the Cambridge University's Cavendish Laboratory in + 1884. In 1897, Thomson showed that cathode rays were composed of previously unknown negatively charged + particles, which he calculated must have bodies much smaller than atoms and a very large value for their + charge-to-mass ratio.[3] Thomson is also credited with finding the first evidence for isotopes of a stable + (non-radioactive) element in 1913, as part of his exploration into the composition of canal rays (positive + ions). His experiments to determine the nature of positively charged particles, with Francis William + Aston, were the first use of mass spectrometry and led to the development of the mass spectrograph. + Thomson was awarded the 1906 Nobel Prize in Physics for his work on the conduction of electricity in + gases. Seven of his students, including his son George Paget Thomson, also became Nobel Prize winners + either in physics or in chemistry. His record is comparable only to that of the German physicist Arnold + Sommerfeld.

+ + + +
+
); +}; diff --git a/example/src/containers/card-container.js b/example/src/containers/card-container.js index 5d08c90..89bf658 100755 --- a/example/src/containers/card-container.js +++ b/example/src/containers/card-container.js @@ -4,9 +4,9 @@ import { fetchCatalogCards } from '../actions/cardContainer-actions'; import CardContainer from '../organisms/CardContainer'; -const mapStateToProps = (state) => { +const mapStateToProps = ({ CardContainerPage }) => { return { - cardData: state.CardContinerPage.cardData + cardData: CardContainerPage.cardData }; }; diff --git a/example/src/index.js b/example/src/index.js index d3e2d1e..97fdc5b 100755 --- a/example/src/index.js +++ b/example/src/index.js @@ -1,10 +1,8 @@ import React from 'react'; import { render } from 'react-dom'; -import configureStore from '../example/store/configureStore'; +import configureStore from './store/configureStore'; import { Provider } from 'react-redux'; -// import App from './App'; - -import App from './App'; +import { App } from './App'; import '../public/styles/index.css'; const store = configureStore(); @@ -12,5 +10,5 @@ const store = configureStore(); render( - , document.getElementById('root') + , document.getElementById('atomicExample') ); diff --git a/example/src/organisms/CardContainer.jsx b/example/src/organisms/CardContainer.jsx index 5033bab..0dfb869 100755 --- a/example/src/organisms/CardContainer.jsx +++ b/example/src/organisms/CardContainer.jsx @@ -1,16 +1,15 @@ import React, { Component, PropTypes } from 'react'; -import { Card } from '../../src/molecules/index'; +import { Card } from '../../../molecules/index'; /* import styles from './CardContainer.css'; */ // const cards = Array.from({ length: 3 }, (c) => card) // const primary = /^\#/.test(colors.primary) ? colors.primary.replace('#', '') : '#666' // const primary = '#ff6600'; - class CardContainer extends Component { componentWillMount() { - this.props.fetchCatelogCards(); + this.props.fetchCatalogCards(); } render() { @@ -28,15 +27,15 @@ class CardContainer extends Component { CardContainer.propTypes = { /** * Card Data as Object - */ + */ cardData: PropTypes.object, /** * Function called to get data - */ - fetchCatelogCards: PropTypes.func, + */ + fetchCatalogCards: PropTypes.func, /** - * Theme - */ + * Theme + */ theme: PropTypes.oneOf(['light', 'dark']) }; diff --git a/example/src/organisms/Footer.css b/example/src/organisms/Footer.css index 6ad515a..6e30abd 100755 --- a/example/src/organisms/Footer.css +++ b/example/src/organisms/Footer.css @@ -1,7 +1,7 @@ -.footer{ - background:#ccc; - padding:1.5rem; - margin-top:2rem; +.footer { + background: #ccc; + padding: 1.5rem; + margin-top: 2rem; border-top: thin solid #333; } diff --git a/example/src/organisms/Header.css b/example/src/organisms/Header.css index 7b4ee20..6665615 100755 --- a/example/src/organisms/Header.css +++ b/example/src/organisms/Header.css @@ -1,7 +1,7 @@ -.header{ +.header { background: #263238; padding: 0.5rem; - min-height:5rem; + min-height: 5rem; } .branding { diff --git a/example/src/organisms/Header.jsx b/example/src/organisms/Header.jsx index e317036..f211b9a 100755 --- a/example/src/organisms/Header.jsx +++ b/example/src/organisms/Header.jsx @@ -1,6 +1,6 @@ import React, { PropTypes } from 'react'; -import { Avatar, Logo } from '../../src/molecules/index'; +import { Avatar, Logo } from '../../../molecules/index'; import './Header.css'; import classnames from 'classnames'; @@ -8,7 +8,7 @@ const Header = (props) => { const { theme } = props; return ( -
+
{ />

Atomic React

- + ); }; @@ -33,7 +33,8 @@ Header.propTypes = { /** * Theme */ - theme: PropTypes.oneOf(['light', 'dark']) + theme: PropTypes.oneOf(['light', 'dark']), + class: PropTypes.string }; export default Header; diff --git a/example/src/organisms/index.js b/example/src/organisms/index.js index 0ae435a..a9c2e35 100755 --- a/example/src/organisms/index.js +++ b/example/src/organisms/index.js @@ -1,4 +1,3 @@ - export { default as Header } from './Header'; export { default as Footer } from './Footer'; export { default as CardContainer } from '../containers/card-container'; diff --git a/example/src/reducers/index.js b/example/src/reducers/index.js index 25e5e0d..6078ee1 100755 --- a/example/src/reducers/index.js +++ b/example/src/reducers/index.js @@ -1,7 +1,7 @@ import { combineReducers } from 'redux'; import CardContainerReducer from './CardContainer-reducer'; const rootReducer = combineReducers({ - CardContinerPage: CardContainerReducer + CardContainerPage: CardContainerReducer }); export default rootReducer; diff --git a/example/src/utils/helper.js b/example/src/utils/helper.js index a2aa609..af5bf65 100755 --- a/example/src/utils/helper.js +++ b/example/src/utils/helper.js @@ -2,10 +2,10 @@ const axios = require('axios'); export const getData = (url) => { return axios.get(url) - .then(function (response) { + .then(function(response) { return response; }) - .catch(function (error) { + .catch(function(error) { return error; }); }; diff --git a/molecules/Avatar.css b/molecules/Avatar.css index 75533db..e1b40bb 100755 --- a/molecules/Avatar.css +++ b/molecules/Avatar.css @@ -1,5 +1,5 @@ -.avatar{ - border-radius:50%; - background:#ccc; - float:right; +.avatar { + border-radius: 50%; + background: #ccc; + float: right; } \ No newline at end of file diff --git a/molecules/Avatar.jsx b/molecules/Avatar.jsx index 165e38d..62d4e05 100755 --- a/molecules/Avatar.jsx +++ b/molecules/Avatar.jsx @@ -1,5 +1,4 @@ import React, { PropTypes } from 'react'; - // Import of Styles could be as simple as importing the file like given below. import './Avatar.css'; diff --git a/molecules/Button.css b/molecules/Button.css index 1a54bf2..602c9d1 100755 --- a/molecules/Button.css +++ b/molecules/Button.css @@ -1,6 +1,6 @@ -.primary{ - background:#ccc; - padding:0.5rem 1rem; +.primary { + background: #ccc; + padding: 0.5rem 1rem; font-size: 1rem; border: none; cursor: pointer; diff --git a/molecules/Card.css b/molecules/Card.css index ba7649a..e4051a0 100755 --- a/molecules/Card.css +++ b/molecules/Card.css @@ -1,12 +1,12 @@ -.cardContainer{ - display: flex; - width:100%; +.cardContainer { + display: flex; + width: 100%; } -.card{ - text-align: center; - flex:1; - background: #fff; - padding:1rem; - margin: 1rem; +.card { + text-align: center; + flex: 1; + background: #fff; + padding: 1rem; + margin: 1rem; } \ No newline at end of file diff --git a/molecules/Card.jsx b/molecules/Card.jsx index ca22315..5c031e5 100755 --- a/molecules/Card.jsx +++ b/molecules/Card.jsx @@ -1,4 +1,3 @@ - import React, { PropTypes } from 'react'; import classnames from 'classnames'; @@ -14,8 +13,8 @@ const Card = (props) => { {cardDetails && cardDetails.map((card, index) =>
{card.heading}/ -

- +

+

{card.text}

@@ -27,11 +26,11 @@ const Card = (props) => { Card.propTypes = { /** * Card Data - */ + */ cardData: PropTypes.arrayOf(PropTypes.shape({})), /** - * Theme - */ + * Theme + */ theme: PropTypes.oneOf(['light', 'dark']) }; diff --git a/molecules/Grid.jsx b/molecules/Grid.jsx index f1f17d0..0e4d8e2 100644 --- a/molecules/Grid.jsx +++ b/molecules/Grid.jsx @@ -10,8 +10,8 @@ const Grid = ({ children }) => { Grid.propTypes = { /** - * Grid - **/ + * Grid + **/ children: PropTypes.node.isRequired }; diff --git a/molecules/Hero.css b/molecules/Hero.css index dcc4a99..a2d88c7 100644 --- a/molecules/Hero.css +++ b/molecules/Hero.css @@ -1,41 +1,41 @@ .hero .slide { - position: relative; - display: flex; - align-items: center; - min-height: 200px; + position: relative; + display: flex; + align-items: center; + min-height: 200px; } .hero .slide.align-center { - justify-content: center; + justify-content: center; } .hero .slide.align-right { - justify-content: flex-end; + justify-content: flex-end; } .hero .slide img { - position: relative; - height: 100%; + position: relative; + height: 100%; } .heading { - position: absolute; - display: flex; - flex-direction: column; - padding: 30px; + position: absolute; + display: flex; + flex-direction: column; + padding: 30px; } .heading.align-center { - align-items: center; + align-items: center; } .heading.align-right { - align-items: flex-end; + align-items: flex-end; } .hero .slide h1, .hero .slide h2 { - font-weight: normal; - padding: 0; - margin: 0; + font-weight: normal; + padding: 0; + margin: 0; } \ No newline at end of file diff --git a/molecules/Hero.jsx b/molecules/Hero.jsx index 94f3de5..242f5a5 100644 --- a/molecules/Hero.jsx +++ b/molecules/Hero.jsx @@ -42,36 +42,36 @@ const Hero = (props) => { Hero.propTypes = { /** - * Background Image - */ + * Background Image + */ backgroundImg: PropTypes.string, /** - * Image Alt Text - */ + * Image Alt Text + */ alt: PropTypes.string, /** - * Background Image Width - */ + * Background Image Width + */ imgWidth: PropTypes.number, /** - * Slide Link - */ + * Slide Link + */ link: PropTypes.string, /** - * Theme - */ + * Theme + */ theme: PropTypes.oneOf(['light', 'dark']), /** - * Heading - */ + * Heading + */ heading: PropTypes.string, /** - * Sub Heading - */ + * Sub Heading + */ subHeading: PropTypes.string, /** - * Heading Alignment - */ + * Heading Alignment + */ headingPosition: PropTypes.oneOf(['left', 'center', 'right']) }; diff --git a/molecules/Logo.css b/molecules/Logo.css index 81bb45e..4418e42 100644 --- a/molecules/Logo.css +++ b/molecules/Logo.css @@ -1,4 +1,4 @@ .brand-logo { - padding: 15px; - cursor: pointer; + padding: 15px; + cursor: pointer; } \ No newline at end of file diff --git a/molecules/Logo.jsx b/molecules/Logo.jsx index ba07bd1..3df30af 100644 --- a/molecules/Logo.jsx +++ b/molecules/Logo.jsx @@ -1,5 +1,5 @@ import React, { PropTypes } from 'react'; -import config from '../../public/data/config.json'; +import config from '../example/public/data/config.json'; import './Logo.css'; @@ -20,20 +20,20 @@ const Logo = (props) => { Logo.propTypes = { /** - * Brand Logo - */ + * Brand Logo + */ src: PropTypes.string, /** - * Logo Alternative Text - */ + * Logo Alternative Text + */ alt: PropTypes.string, /** - * Logo URL - */ + * Logo URL + */ url: PropTypes.string, /** - * Image width - */ + * Image width + */ imgWidth: PropTypes.number }; diff --git a/molecules/Navigation.css b/molecules/Navigation.css index d934579..acef1f3 100644 --- a/molecules/Navigation.css +++ b/molecules/Navigation.css @@ -1,18 +1,18 @@ .navigation { - height: 50px; - width: 100%; - display: flex; + height: 50px; + width: 100%; + display: flex; } .navigation ul { - display: flex; - align-items: center; + display: flex; + align-items: center; } .navigation ul li { - margin: 0 10px; + margin: 0 10px; } .navigation.align-right { - justify-content: flex-end; + justify-content: flex-end; } \ No newline at end of file diff --git a/molecules/Navigation.jsx b/molecules/Navigation.jsx index fe45d9f..bf748f9 100644 --- a/molecules/Navigation.jsx +++ b/molecules/Navigation.jsx @@ -26,16 +26,16 @@ const Navigation = (props) => { Navigation.propTypes = { /** - * Theme - */ + * Theme + */ theme: PropTypes.oneOf(['light', 'dark']), /** * Links - */ + */ links: PropTypes.arrayOf(PropTypes.shape({})), /** - * Nav Links Alignment - */ + * Nav Links Alignment + */ align: PropTypes.oneOf(['left', 'right']) }; diff --git a/molecules/Panel.css b/molecules/Panel.css index 46d3e42..7014e06 100755 --- a/molecules/Panel.css +++ b/molecules/Panel.css @@ -1,10 +1,11 @@ -.panel{} +.panel { +} -.panelHeading{ +.panelHeading { padding: 0.5rem; } -.panelBody{ +.panelBody { padding: 1rem; display: flex; } \ No newline at end of file diff --git a/molecules/Panel.jsx b/molecules/Panel.jsx index ef47a72..f140a51 100755 --- a/molecules/Panel.jsx +++ b/molecules/Panel.jsx @@ -17,15 +17,15 @@ const Panel = ({ children, ...props }) => { Panel.propTypes = { /** * Children - */ + */ children: PropTypes.node, /** * Heading - */ + */ heading: PropTypes.string, /** - * Theme - */ + * Theme + */ theme: PropTypes.oneOf(['light', 'dark']) }; diff --git a/molecules/Rating.css b/molecules/Rating.css index 1cf78eb..6e9625f 100755 --- a/molecules/Rating.css +++ b/molecules/Rating.css @@ -1,4 +1,4 @@ -.rating{ +.rating { text-decoration: none; - color:orange; + color: orange; } \ No newline at end of file diff --git a/molecules/Tout.css b/molecules/Tout.css index 9cc6b04..0f398ae 100644 --- a/molecules/Tout.css +++ b/molecules/Tout.css @@ -1,35 +1,35 @@ .tout { - display: inline-flex; + display: inline-flex; } .tout a { - display: flex; - flex-direction: column; - position: relative; - justify-content: flex-end; - overflow: hidden; + display: flex; + flex-direction: column; + position: relative; + justify-content: flex-end; + overflow: hidden; } .tout .tout-copy { - position: absolute; - padding: 10px; - margin: 0; - width: 100%; - min-height: 50px; - bottom: -25px; - background: rgba(0,0,0,0.5); - -webkit-transition: bottom 0.3s ease-in-out; - -moz-transition: bottom 0.3s ease-in-out; - -o-transition: bottom 0.3s ease-in-out; - transition: bottom 0.3s ease-in-out; + position: absolute; + padding: 10px; + margin: 0; + width: 100%; + min-height: 50px; + bottom: -25px; + background: rgba(0, 0, 0, 0.5); + -webkit-transition: bottom 0.3s ease-in-out; + -moz-transition: bottom 0.3s ease-in-out; + -o-transition: bottom 0.3s ease-in-out; + transition: bottom 0.3s ease-in-out; } .tout:hover .tout-copy { - bottom: 0; + bottom: 0; } .tout .tout-copy h3 { - padding: 0; - margin: 0; - color: #fff; + padding: 0; + margin: 0; + color: #fff; } \ No newline at end of file diff --git a/molecules/Tout.jsx b/molecules/Tout.jsx index 3578cd1..abd26ed 100644 --- a/molecules/Tout.jsx +++ b/molecules/Tout.jsx @@ -9,7 +9,7 @@ const Tout = (props) => { return (
- {imgAlt} + {imgAlt}/

{headline}

@@ -20,24 +20,24 @@ const Tout = (props) => { Tout.propTypes = { /** - * Tout Image URL - */ + * Tout Image URL + */ imgURL: PropTypes.string.isRequired, /** - * Tout Image Alt - */ + * Tout Image Alt + */ imgAlt: PropTypes.string, /** - * Tout destination URL - */ + * Tout destination URL + */ destination: PropTypes.string, /** - * Tout headline - */ + * Tout headline + */ headline: PropTypes.string, /** - * Tout theme - */ + * Tout theme + */ theme: PropTypes.string }; diff --git a/molecules/index.js b/molecules/index.js index a87a30a..d0de72e 100755 --- a/molecules/index.js +++ b/molecules/index.js @@ -1,4 +1,3 @@ - export { default as Card } from './Card'; export { default as Button } from './Button'; export { default as Rating } from './Rating'; diff --git a/package.json b/package.json index b2c1ef7..b77d8b2 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "atomic-react", - "version": "0.1.0", + "version": "0.1.1", "private": true, "devDependencies": { "autoprefixer": "6.7.2", @@ -52,6 +52,7 @@ "whatwg-fetch": "2.0.2" }, "dependencies": { + "babel-register": "^6.24.1", "classnames": "^2.2.5", "react": "^15.4.2", "react-dom": "^15.4.2", @@ -60,10 +61,13 @@ "redux-thunk": "^1.0.3" }, "scripts": { - "start": "node scripts/start.js", - "build": "node scripts/build.js", - "test": "node scripts/test.js --env=jsdom", - "lint": "eslint --ext .js --ext .jsx src", + "start": "node scripts/babel-init --s start", + "build": "node scripts/babel-init --s build", + "test": "node scripts/babel-init --s test --env=jsdom", + "lint:prehook": "npm run lint:molecules", + "lint": "npm run lint:molecules > Lint_Molecule_`date +%Y%m%d%H%M%S`.log && npm run lint:example > Lint_Example_`date +%Y%m%d%H%M%S`.log ", + "lint:molecules": "eslint --ext .js --ext .jsx molecules", + "lint:example": "eslint --ext .js --ext .jsx example", "lint:fixjs": "eslint --ext .js --ext .jsx src --fix" }, "jest": { @@ -92,7 +96,7 @@ }, "config": { "ghooks": { - "pre-commit": "npm run lint" + "pre-commit": "npm run lint:prehook" } }, "babel": { diff --git a/scripts/babel-init.js b/scripts/babel-init.js index 49b08fc..31af8d8 100644 --- a/scripts/babel-init.js +++ b/scripts/babel-init.js @@ -1,3 +1,5 @@ -/** - * Created by vsury1 on 5/26/17. - */ +// Init babel-register to start parsing the ES6 files. +require('babel-register'); +const script = process.argv.slice(2)[1]; +if (script === 'build') process.env.NODE_ENV = 'production'; +require(`./${script}`); diff --git a/scripts/build.js b/scripts/build.js index d61d7cf..2fd01b9 100755 --- a/scripts/build.js +++ b/scripts/build.js @@ -5,22 +5,22 @@ process.env.NODE_ENV = 'production'; // if this file is missing. dotenv will never modify any environment variables // that have already been set. // https://github.com/motdotla/dotenv -require('dotenv').config({silent: true}); - -var chalk = require('chalk'); -var fs = require('fs-extra'); -var path = require('path'); -var url = require('url'); -var filesize = require('filesize'); -var gzipSize = require('gzip-size').sync; -var webpack = require('webpack'); -var config = require('../config/webpack.config.prod'); -var paths = require('../config/paths'); -var checkRequiredFiles = require('react-dev-utils/checkRequiredFiles'); -var recursive = require('recursive-readdir'); -var stripAnsi = require('strip-ansi'); - -var useYarn = fs.existsSync(paths.yarnLockFile); +require('dotenv').config({ silent: true }); + +import chalk from 'chalk'; +import fs from 'fs-extra'; +import path from 'path'; +import url from 'url'; +import filesize from 'filesize'; +import { sync as gzipSize } from 'gzip-size'; +import webpack from 'webpack'; +import config from '../example/config/webpack.config.prod'; +import paths from '../example/config/paths'; +import checkRequiredFiles from 'react-dev-utils/checkRequiredFiles'; +import recursive from 'recursive-readdir'; +import stripAnsi from 'strip-ansi'; + +const useYarn = fs.existsSync(paths.yarnLockFile); // Warn and crash if required files are missing if (!checkRequiredFiles([paths.appHtml, paths.appIndexJs])) { @@ -38,13 +38,13 @@ function removeFileNameHash(fileName) { // Input: 1024, 2048 // Output: "(+1 KB)" function getDifferenceLabel(currentSize, previousSize) { - var FIFTY_KILOBYTES = 1024 * 50; - var difference = currentSize - previousSize; - var fileSize = !Number.isNaN(difference) ? filesize(difference) : 0; + const FIFTY_KILOBYTES = 1024 * 50; + const difference = currentSize - previousSize; + const fileSize = !Number.isNaN(difference) ? filesize(difference) : 0; if (difference >= FIFTY_KILOBYTES) { - return chalk.red('+' + fileSize); + return chalk.red(`+${fileSize}`); } else if (difference < FIFTY_KILOBYTES && difference > 0) { - return chalk.yellow('+' + fileSize); + return chalk.yellow(`+${fileSize}`); } else if (difference < 0) { return chalk.green(fileSize); } else { @@ -55,11 +55,11 @@ function getDifferenceLabel(currentSize, previousSize) { // First, read the current file sizes in build directory. // This lets us display how much they changed later. recursive(paths.appBuild, (err, fileNames) => { - var previousSizeMap = (fileNames || []) + const previousSizeMap = (fileNames || []) .filter(fileName => /\.(js|css)$/.test(fileName)) .reduce((memo, fileName) => { - var contents = fs.readFileSync(fileName); - var key = removeFileNameHash(fileName); + const contents = fs.readFileSync(fileName); + const key = removeFileNameHash(fileName); memo[key] = gzipSize(contents); return memo; }, {}); @@ -77,34 +77,33 @@ recursive(paths.appBuild, (err, fileNames) => { // Print a detailed summary of build files. function printFileSizes(stats, previousSizeMap) { - var assets = stats.toJson().assets + const assets = stats.toJson().assets .filter(asset => /\.(js|css)$/.test(asset.name)) .map(asset => { - var fileContents = fs.readFileSync(paths.appBuild + '/' + asset.name); - var size = gzipSize(fileContents); - var previousSize = previousSizeMap[removeFileNameHash(asset.name)]; - var difference = getDifferenceLabel(size, previousSize); + const fileContents = fs.readFileSync(`${paths.appBuild}/${asset.name}`); + const size = gzipSize(fileContents); + const previousSize = previousSizeMap[removeFileNameHash(asset.name)]; + const difference = getDifferenceLabel(size, previousSize); return { folder: path.join('build', path.dirname(asset.name)), name: path.basename(asset.name), - size: size, + size, sizeLabel: filesize(size) + (difference ? ' (' + difference + ')' : '') }; }); assets.sort((a, b) => b.size - a.size); - var longestSizeLabelLength = Math.max.apply(null, + const longestSizeLabelLength = Math.max.apply(null, assets.map(a => stripAnsi(a.sizeLabel).length) ); assets.forEach(asset => { - var sizeLabel = asset.sizeLabel; - var sizeLength = stripAnsi(sizeLabel).length; + let sizeLabel = asset.sizeLabel; + const sizeLength = stripAnsi(sizeLabel).length; if (sizeLength < longestSizeLabelLength) { - var rightPadding = ' '.repeat(longestSizeLabelLength - sizeLength); + const rightPadding = ' '.repeat(longestSizeLabelLength - sizeLength); sizeLabel += rightPadding; } console.log( - ' ' + sizeLabel + - ' ' + chalk.dim(asset.folder + path.sep) + chalk.cyan(asset.name) + ` ${sizeLabel} ${chalk.dim(asset.folder + path.sep)}${chalk.cyan(asset.name)}` ); }); } @@ -134,9 +133,9 @@ function build(previousSizeMap) { } if (process.env.CI && stats.compilation.warnings.length) { - printErrors('Failed to compile. When process.env.CI = true, warnings are treated as failures. Most CI servers set this automatically.', stats.compilation.warnings); - process.exit(1); - } + printErrors('Failed to compile. When process.env.CI = true, warnings are treated as failures. Most CI servers set this automatically.', stats.compilation.warnings); + process.exit(1); + } console.log(chalk.green('Compiled successfully.')); console.log(); @@ -146,73 +145,73 @@ function build(previousSizeMap) { printFileSizes(stats, previousSizeMap); console.log(); - var openCommand = process.platform === 'win32' ? 'start' : 'open'; - var appPackage = require(paths.appPackageJson); - var publicUrl = paths.publicUrl; - var publicPath = config.output.publicPath; - var publicPathname = url.parse(publicPath).pathname; - if (publicUrl && publicUrl.indexOf('.github.io/') !== -1) { + const openCommand = process.platform === 'win32' ? 'start' : 'open'; + const appPackage = require(paths.appPackageJson); + const publicUrl = paths.publicUrl; + const publicPath = config.output.publicPath; + const publicPathname = url.parse(publicPath).pathname; + if (publicUrl && publicUrl.includes('.github.io/')) { // "homepage": "http://user.github.io/project" - console.log('The project was built assuming it is hosted at ' + chalk.green(publicPathname) + '.'); - console.log('You can control this with the ' + chalk.green('homepage') + ' field in your ' + chalk.cyan('package.json') + '.'); + console.log(`The project was built assuming it is hosted at ${chalk.green(publicPathname)}.`); + console.log(`You can control this with the ${chalk.green('homepage')} field in your ${chalk.cyan('package.json')}.`); console.log(); - console.log('The ' + chalk.cyan('build') + ' folder is ready to be deployed.'); - console.log('To publish it at ' + chalk.green(publicUrl) + ', run:'); + console.log(`The ${chalk.cyan('build')} folder is ready to be deployed.`); + console.log(`To publish it at ${chalk.green(publicUrl)}, run:`); // If script deploy has been added to package.json, skip the instructions if (typeof appPackage.scripts.deploy === 'undefined') { console.log(); if (useYarn) { - console.log(' ' + chalk.cyan('yarn') + ' add --dev gh-pages'); + console.log(` ${chalk.cyan('yarn')} add --dev gh-pages`); } else { - console.log(' ' + chalk.cyan('npm') + ' install --save-dev gh-pages'); + console.log(` ${chalk.cyan('npm')} install --save-dev gh-pages`); } console.log(); - console.log('Add the following script in your ' + chalk.cyan('package.json') + '.'); + console.log(`Add the following script in your ${chalk.cyan('package.json')}.`); console.log(); - console.log(' ' + chalk.dim('// ...')); - console.log(' ' + chalk.yellow('"scripts"') + ': {'); - console.log(' ' + chalk.dim('// ...')); - console.log(' ' + chalk.yellow('"predeploy"') + ': ' + chalk.yellow('"npm run build",')); - console.log(' ' + chalk.yellow('"deploy"') + ': ' + chalk.yellow('"gh-pages -d build"')); + console.log(` ${chalk.dim('// ...')}`); + console.log(` ${chalk.yellow('"scripts"')}: {`); + console.log(` ${chalk.dim('// ...')}`); + console.log(` ${chalk.yellow('"predeploy"')}: ${chalk.yellow('"npm run build",')}`); + console.log(` ${chalk.yellow('"deploy"')}: ${chalk.yellow('"gh-pages -d build"')}`); console.log(' }'); console.log(); console.log('Then run:'); } console.log(); - console.log(' ' + chalk.cyan(useYarn ? 'yarn' : 'npm') + ' run deploy'); + console.log(` ${chalk.cyan(useYarn ? 'yarn' : 'npm')} run deploy`); console.log(); } else if (publicPath !== '/') { // "homepage": "http://mywebsite.com/project" - console.log('The project was built assuming it is hosted at ' + chalk.green(publicPath) + '.'); - console.log('You can control this with the ' + chalk.green('homepage') + ' field in your ' + chalk.cyan('package.json') + '.'); + console.log(`The project was built assuming it is hosted at ${chalk.green(publicPath)}.`); + console.log(`You can control this with the ${chalk.green('homepage')} field in your ${chalk.cyan('package.json')}.`); console.log(); - console.log('The ' + chalk.cyan('build') + ' folder is ready to be deployed.'); + console.log(`The ${chalk.cyan('build')} folder is ready to be deployed.`); console.log(); } else { if (publicUrl) { // "homepage": "http://mywebsite.com" - console.log('The project was built assuming it is hosted at ' + chalk.green(publicUrl) + '.'); - console.log('You can control this with the ' + chalk.green('homepage') + ' field in your ' + chalk.cyan('package.json') + '.'); + console.log(`The project was built assuming it is hosted at ${chalk.green(publicUrl)}.`); + console.log(`You can control this with the ${chalk.green('homepage')} field in your ${chalk.cyan('package.json')}.`); console.log(); } else { // no homepage console.log('The project was built assuming it is hosted at the server root.'); - console.log('To override this, specify the ' + chalk.green('homepage') + ' in your ' + chalk.cyan('package.json') + '.'); + console.log(`To override this, specify the ${chalk.green('homepage')} in your ${chalk.cyan('package.json')}.`); console.log('For example, add this to build it for GitHub Pages:') console.log(); - console.log(' ' + chalk.green('"homepage"') + chalk.cyan(': ') + chalk.green('"http://myname.github.io/myapp"') + chalk.cyan(',')); + console.log(` ${chalk.green('"homepage"')}${chalk.cyan(': ')}${chalk.green('"http://myname.github.io/myapp"')}${chalk.cyan(',')}`); console.log(); } - console.log('The ' + chalk.cyan('build') + ' folder is ready to be deployed.'); + console.log(`The ${chalk.cyan('build')} folder is ready to be deployed.`); console.log('You may also serve it locally with a static server:') console.log(); if (useYarn) { - console.log(' ' + chalk.cyan('yarn') + ' global add pushstate-server'); + console.log(` ${chalk.cyan('yarn')} global add pushstate-server`); } else { - console.log(' ' + chalk.cyan('npm') + ' install -g pushstate-server'); + console.log(` ${chalk.cyan('npm')} install -g pushstate-server`); } - console.log(' ' + chalk.cyan('pushstate-server') + ' build'); - console.log(' ' + chalk.cyan(openCommand) + ' http://localhost:9000'); + console.log(` ${chalk.cyan('pushstate-server')} build`); + console.log(` ${chalk.cyan(openCommand)} http://localhost:9000`); console.log(); } }); diff --git a/scripts/start.js b/scripts/start.js index b5a5dce..854dc47 100755 --- a/scripts/start.js +++ b/scripts/start.js @@ -4,27 +4,27 @@ process.env.NODE_ENV = 'development'; // if this file is missing. dotenv will never modify any environment variables // that have already been set. // https://github.com/motdotla/dotenv -require('dotenv').config({silent: true}); +require('dotenv').config({ silent: true }); -var chalk = require('chalk'); -var webpack = require('webpack'); -var WebpackDevServer = require('webpack-dev-server'); -var historyApiFallback = require('connect-history-api-fallback'); -var httpProxyMiddleware = require('http-proxy-middleware'); -var detect = require('detect-port'); -var clearConsole = require('react-dev-utils/clearConsole'); -var checkRequiredFiles = require('react-dev-utils/checkRequiredFiles'); -var formatWebpackMessages = require('react-dev-utils/formatWebpackMessages'); -var getProcessForPort = require('react-dev-utils/getProcessForPort'); -var openBrowser = require('react-dev-utils/openBrowser'); -var prompt = require('react-dev-utils/prompt'); -var fs = require('fs'); -var config = require('../config/webpack.config.dev'); -var paths = require('../config/paths'); +import chalk from 'chalk'; +import webpack from 'webpack'; +import WebpackDevServer from 'webpack-dev-server'; +import historyApiFallback from 'connect-history-api-fallback'; +import httpProxyMiddleware from 'http-proxy-middleware'; +import detect from 'detect-port'; +import clearConsole from 'react-dev-utils/clearConsole'; +import checkRequiredFiles from 'react-dev-utils/checkRequiredFiles'; +import formatWebpackMessages from 'react-dev-utils/formatWebpackMessages'; +import getProcessForPort from 'react-dev-utils/getProcessForPort'; +import openBrowser from 'react-dev-utils/openBrowser'; +import prompt from 'react-dev-utils/prompt'; +import fs from 'fs'; +import config from '../example/config/webpack.config.dev'; +import paths from '../example/config/paths'; -var useYarn = fs.existsSync(paths.yarnLockFile); -var cli = useYarn ? 'yarn' : 'npm'; -var isInteractive = process.stdout.isTTY; +const useYarn = fs.existsSync(paths.yarnLockFile); +const cli = useYarn ? 'yarn' : 'npm'; +const isInteractive = process.stdout.isTTY; // Warn and crash if required files are missing if (!checkRequiredFiles([paths.appHtml, paths.appIndexJs])) { @@ -32,15 +32,15 @@ if (!checkRequiredFiles([paths.appHtml, paths.appIndexJs])) { } // Tools like Cloud9 rely on this. -var DEFAULT_PORT = process.env.PORT || 3000; -var compiler; -var handleCompile; +const DEFAULT_PORT = process.env.PORT || 3000; +let compiler; +let handleCompile; // You can safely remove this after ejecting. // We only use this block for testing of Create React App itself: -var isSmokeTest = process.argv.some(arg => arg.indexOf('--smoke-test') > -1); +const isSmokeTest = process.argv.some(arg => arg.includes('--smoke-test')); if (isSmokeTest) { - handleCompile = function (err, stats) { + handleCompile = (err, stats) => { if (err || stats.hasErrors() || stats.hasWarnings()) { process.exit(1); } else { @@ -58,18 +58,18 @@ function setupCompiler(host, port, protocol) { // recompiling a bundle. WebpackDevServer takes care to pause serving the // bundle, so if you refresh, it'll wait instead of serving the old one. // "invalid" is short for "bundle invalidated", it doesn't imply any errors. - compiler.plugin('invalid', function() { + compiler.plugin('invalid', () => { if (isInteractive) { clearConsole(); } console.log('Compiling...'); }); - var isFirstCompile = true; + let isFirstCompile = true; // "done" event fires when Webpack has finished recompiling the bundle. // Whether or not you have warnings or errors, you will get this event. - compiler.plugin('done', function(stats) { + compiler.plugin('done', stats => { if (isInteractive) { clearConsole(); } @@ -77,9 +77,9 @@ function setupCompiler(host, port, protocol) { // We have switched off the default Webpack output in WebpackDevServer // options so we are going to "massage" the warnings and errors and present // them in a readable focused way. - var messages = formatWebpackMessages(stats.toJson({}, true)); - var isSuccessful = !messages.errors.length && !messages.warnings.length; - var showInstructions = isSuccessful && (isInteractive || isFirstCompile); + const messages = formatWebpackMessages(stats.toJson({}, true)); + const isSuccessful = !messages.errors.length && !messages.warnings.length; + const showInstructions = isSuccessful && (isInteractive || isFirstCompile); if (isSuccessful) { console.log(chalk.green('Compiled successfully!')); @@ -89,10 +89,10 @@ function setupCompiler(host, port, protocol) { console.log(); console.log('The app is running at:'); console.log(); - console.log(' ' + chalk.cyan(protocol + '://' + host + ':' + port + '/')); + console.log(` ${chalk.cyan(protocol + '://' + host + ':' + port + '/')}`); console.log(); console.log('Note that the development build is not optimized.'); - console.log('To create a production build, use ' + chalk.cyan(cli + ' run build') + '.'); + console.log(`To create a production build, use ${chalk.cyan(cli + ' run build')}.`); console.log(); isFirstCompile = false; } @@ -118,8 +118,8 @@ function setupCompiler(host, port, protocol) { }); // Teach some ESLint tricks. console.log('You may use special comments to disable some warnings.'); - console.log('Use ' + chalk.yellow('// eslint-disable-next-line') + ' to ignore the next line.'); - console.log('Use ' + chalk.yellow('/* eslint-disable */') + ' to ignore all warnings in a file.'); + console.log(`Use ${chalk.yellow('// eslint-disable-next-line')} to ignore the next line.`); + console.log(`Use ${chalk.yellow('/* eslint-disable */')} to ignore all warnings in a file.`); } }); } @@ -127,25 +127,22 @@ function setupCompiler(host, port, protocol) { // We need to provide a custom onError function for httpProxyMiddleware. // It allows us to log custom error messages on the console. function onProxyError(proxy) { - return function(err, req, res){ - var host = req.headers && req.headers.host; + return (err, req, res) => { + const host = req.headers && req.headers.host; console.log( - chalk.red('Proxy error:') + ' Could not proxy request ' + chalk.cyan(req.url) + - ' from ' + chalk.cyan(host) + ' to ' + chalk.cyan(proxy) + '.' + `${chalk.red('Proxy error:')} Could not proxy request ${chalk.cyan(req.url)} from ${chalk.cyan(host)} to ${chalk.cyan(proxy)}.` ); console.log( - 'See https://nodejs.org/api/errors.html#errors_common_system_errors for more information (' + - chalk.cyan(err.code) + ').' + `See https://nodejs.org/api/errors.html#errors_common_system_errors for more information (${chalk.cyan(err.code)}).` ); console.log(); // And immediately send the proper error response to the client. // Otherwise, the request will eventually timeout with ERR_EMPTY_RESPONSE on the client side. if (res.writeHead && !res.headersSent) { - res.writeHead(500); + res.writeHead(500); } - res.end('Proxy error: Could not proxy request ' + req.url + ' from ' + - host + ' to ' + proxy + ' (' + err.code + ').' + res.end(`Proxy error: Could not proxy request ${req.url} from ${host} to ${proxy} (${err.code}).` ); } } @@ -153,7 +150,7 @@ function onProxyError(proxy) { function addMiddleware(devServer) { // `proxy` lets you to specify a fallback server during development. // Every unrecognized request will be forwarded to it. - var proxy = require(paths.appPackageJson).proxy; + const proxy = require(paths.appPackageJson).proxy; devServer.use(historyApiFallback({ // Paths with dots should still use the history fallback. // See https://github.com/facebookincubator/create-react-app/issues/387. @@ -172,7 +169,7 @@ function addMiddleware(devServer) { if (proxy) { if (typeof proxy !== 'string') { console.log(chalk.red('When specified, "proxy" in package.json must be a string.')); - console.log(chalk.red('Instead, the type of "proxy" was "' + typeof proxy + '".')); + console.log(chalk.red(`Instead, the type of "proxy" was "${typeof proxy}".`)); console.log(chalk.red('Either remove "proxy" from package.json, or make it a string.')); process.exit(1); } @@ -183,14 +180,14 @@ function addMiddleware(devServer) { // - /*.hot-update.json (WebpackDevServer uses this too for hot reloading) // - /sockjs-node/* (WebpackDevServer uses this for hot reloading) // Tip: use https://jex.im/regulex/ to visualize the regex - var mayProxy = /^(?!\/(index\.html$|.*\.hot-update\.json$|sockjs-node\/)).*$/; + const mayProxy = /^(?!\/(index\.html$|.*\.hot-update\.json$|sockjs-node\/)).*$/; // Pass the scope regex both to Express and to the middleware for proxying // of both HTTP and WebSockets to work without false positives. - var hpm = httpProxyMiddleware(pathname => mayProxy.test(pathname), { + const hpm = httpProxyMiddleware(pathname => mayProxy.test(pathname), { target: proxy, logLevel: 'silent', - onProxyReq: function(proxyReq, req, res) { + onProxyReq(proxyReq, req, res) { // Browers may send Origin headers even with same-origin // requests. To prevent CORS issues, we have to change // the Origin to match the target URL. @@ -217,7 +214,7 @@ function addMiddleware(devServer) { } function runDevServer(host, port, protocol) { - var devServer = new WebpackDevServer(compiler, { + const devServer = new WebpackDevServer(compiler, { // Enable gzip compression of generated files. compress: true, // Silence WebpackDevServer's own logs since they're generally not useful. @@ -256,15 +253,15 @@ function runDevServer(host, port, protocol) { ignored: /node_modules/ }, // Enable HTTPS if the HTTPS environment variable is set to 'true' - https: protocol === "https", - host: host + https: protocol === 'https', + host }); // Our custom middleware proxies requests to /index.html or a remote API. addMiddleware(devServer); // Launch WebpackDevServer. - devServer.listen(port, (err, result) => { + devServer.listen(port, (err) => { if (err) { return console.log(err); } @@ -275,13 +272,13 @@ function runDevServer(host, port, protocol) { console.log(chalk.cyan('Starting the development server...')); console.log(); - openBrowser(protocol + '://' + host + ':' + port + '/'); + openBrowser(`${protocol}://${host}:${port}/`); }); } function run(port) { - var protocol = process.env.HTTPS === 'true' ? "https" : "http"; - var host = process.env.HOST || 'localhost'; + const protocol = process.env.HTTPS === 'true' ? 'https' : 'http'; + const host = process.env.HOST || 'localhost'; setupCompiler(host, port, protocol); runDevServer(host, port, protocol); } @@ -296,11 +293,10 @@ detect(DEFAULT_PORT).then(port => { if (isInteractive) { clearConsole(); - var existingProcess = getProcessForPort(DEFAULT_PORT); - var question = - chalk.yellow('Something is already running on port ' + DEFAULT_PORT + '.' + - ((existingProcess) ? ' Probably:\n ' + existingProcess : '')) + - '\n\nWould you like to run the app on another port instead?'; + const existingProcess = getProcessForPort(DEFAULT_PORT); + const question = + `${chalk.yellow('Something is already running on port ' + DEFAULT_PORT + '.' + + ((existingProcess) ? ' Probably:\n ' + existingProcess : ''))}\n\nWould you like to run the app on another port instead?`; prompt(question, true).then(shouldChangePort => { if (shouldChangePort) { @@ -308,6 +304,6 @@ detect(DEFAULT_PORT).then(port => { } }); } else { - console.log(chalk.red('Something is already running on port ' + DEFAULT_PORT + '.')); + console.log(chalk.red(`Something is already running on port ${DEFAULT_PORT}.`)); } }); diff --git a/scripts/test.js b/scripts/test.js index ae8c975..5d17c98 100755 --- a/scripts/test.js +++ b/scripts/test.js @@ -1,19 +1,17 @@ process.env.NODE_ENV = 'test'; process.env.PUBLIC_URL = ''; +import jest from 'jest'; +const argv = process.argv.slice(4); // Load environment variables from .env file. Suppress warnings using silent // if this file is missing. dotenv will never modify any environment variables // that have already been set. // https://github.com/motdotla/dotenv -require('dotenv').config({silent: true}); - -const jest = require('jest'); -const argv = process.argv.slice(2); +require('dotenv').config({ silent: true }); // Watch unless on CI or in coverage mode -if (!process.env.CI && argv.indexOf('--coverage') < 0) { +if (!process.env.CI && !argv.includes('--coverage')) { argv.push('--watch'); } - jest.run(argv); diff --git a/yarn.lock b/yarn.lock index 044c3be..13ea9d1 100755 --- a/yarn.lock +++ b/yarn.lock @@ -217,6 +217,12 @@ aws4@^1.2.1: version "1.6.0" resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.6.0.tgz#83ef5ca860b2b32e4a0deedee8c771b9db57471e" +axios@^0.15.3: + version "0.15.3" + resolved "https://registry.yarnpkg.com/axios/-/axios-0.15.3.tgz#2c9d638b2e191a08ea1d6cc988eadd6ba5bdc053" + dependencies: + follow-redirects "1.0.0" + babel-code-frame@^6.11.0, babel-code-frame@^6.16.0, 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" @@ -296,6 +302,14 @@ babel-generator@^6.18.0, babel-generator@^6.22.0, babel-generator@^6.23.0: source-map "^0.5.0" 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.22.0: version "6.22.0" resolved "https://registry.yarnpkg.com/babel-helper-builder-binary-assignment-operator-visitor/-/babel-helper-builder-binary-assignment-operator-visitor-6.22.0.tgz#29df56be144d81bdeac08262bfa41d2c5e91cdcd" @@ -304,6 +318,14 @@ babel-helper-builder-binary-assignment-operator-visitor@^6.22.0: babel-runtime "^6.22.0" babel-types "^6.22.0" +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" + dependencies: + babel-helper-explode-assignable-expression "^6.24.1" + babel-runtime "^6.22.0" + babel-types "^6.24.1" + babel-helper-builder-react-jsx@^6.22.0: version "6.23.0" resolved "https://registry.yarnpkg.com/babel-helper-builder-react-jsx/-/babel-helper-builder-react-jsx-6.23.0.tgz#d53fc8c996e0bc56d0de0fc4cc55a7138395ea4b" @@ -339,6 +361,23 @@ babel-helper-explode-assignable-expression@^6.22.0: babel-traverse "^6.22.0" babel-types "^6.22.0" +babel-helper-explode-assignable-expression@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-explode-assignable-expression/-/babel-helper-explode-assignable-expression-6.24.1.tgz#f25b82cf7dc10433c55f70592d5746400ac22caa" + dependencies: + babel-runtime "^6.22.0" + 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.22.0, babel-helper-function-name@^6.23.0: version "6.23.0" resolved "https://registry.yarnpkg.com/babel-helper-function-name/-/babel-helper-function-name-6.23.0.tgz#25742d67175c8903dbe4b6cb9d9e1fcb8dcf23a6" @@ -349,6 +388,16 @@ babel-helper-function-name@^6.22.0, babel-helper-function-name@^6.23.0: babel-traverse "^6.23.0" babel-types "^6.23.0" +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" + dependencies: + babel-helper-get-function-arity "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + babel-helper-get-function-arity@^6.22.0: version "6.22.0" resolved "https://registry.yarnpkg.com/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.22.0.tgz#0beb464ad69dc7347410ac6ade9f03a50634f5ce" @@ -356,6 +405,13 @@ babel-helper-get-function-arity@^6.22.0: babel-runtime "^6.22.0" babel-types "^6.22.0" +babel-helper-get-function-arity@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.24.1.tgz#8f7782aa93407c41d3aa50908f89b031b1b6853d" + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + babel-helper-hoist-variables@^6.22.0: version "6.22.0" resolved "https://registry.yarnpkg.com/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.22.0.tgz#3eacbf731d80705845dd2e9718f600cfb9b4ba72" @@ -388,6 +444,16 @@ babel-helper-remap-async-to-generator@^6.22.0: babel-traverse "^6.22.0" babel-types "^6.22.0" +babel-helper-remap-async-to-generator@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-remap-async-to-generator/-/babel-helper-remap-async-to-generator-6.24.1.tgz#5ec581827ad723fecdd381f1c928390676e4551b" + dependencies: + babel-helper-function-name "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + babel-helper-replace-supers@^6.22.0, babel-helper-replace-supers@^6.23.0: version "6.23.0" resolved "https://registry.yarnpkg.com/babel-helper-replace-supers/-/babel-helper-replace-supers-6.23.0.tgz#eeaf8ad9b58ec4337ca94223bacdca1f8d9b4bfd" @@ -452,18 +518,46 @@ 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-constructor-call@^6.18.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-class-constructor-call/-/babel-plugin-syntax-class-constructor-call-6.18.0.tgz#9cb9d39fe43c8600bec8146456ddcbd4e1a76416" + 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-do-expressions@^6.8.0: + version "6.13.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-do-expressions/-/babel-plugin-syntax-do-expressions-6.13.0.tgz#5747756139aa26d390d09410b03744ba07e4796d" + +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" +babel-plugin-syntax-export-extensions@^6.8.0: + version "6.13.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-export-extensions/-/babel-plugin-syntax-export-extensions-6.13.0.tgz#70a1484f0f9089a4e84ad44bac353c95b9b12721" + babel-plugin-syntax-flow@^6.18.0, babel-plugin-syntax-flow@^6.3.13: version "6.18.0" resolved "https://registry.yarnpkg.com/babel-plugin-syntax-flow/-/babel-plugin-syntax-flow-6.18.0.tgz#4c3ab20a2af26aa20cd25995c398c4eb70310c8d" +babel-plugin-syntax-function-bind@^6.8.0: + version "6.13.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-function-bind/-/babel-plugin-syntax-function-bind-6.13.0.tgz#48c495f177bdf31a981e732f55adc0bdd2601f46" + 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" @@ -476,6 +570,14 @@ babel-plugin-syntax-trailing-function-commas@^6.13.0, babel-plugin-syntax-traili 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-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.8.0: version "6.22.0" resolved "https://registry.yarnpkg.com/babel-plugin-transform-async-to-generator/-/babel-plugin-transform-async-to-generator-6.22.0.tgz#194b6938ec195ad36efc4c33a971acf00d8cd35e" @@ -484,6 +586,22 @@ babel-plugin-transform-async-to-generator@^6.22.0, babel-plugin-transform-async- babel-plugin-syntax-async-functions "^6.8.0" babel-runtime "^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: + babel-helper-remap-async-to-generator "^6.24.1" + babel-plugin-syntax-async-functions "^6.8.0" + babel-runtime "^6.22.0" + +babel-plugin-transform-class-constructor-call@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-class-constructor-call/-/babel-plugin-transform-class-constructor-call-6.24.1.tgz#80dc285505ac067dcb8d6c65e2f6f11ab7765ef9" + dependencies: + babel-plugin-syntax-class-constructor-call "^6.18.0" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-plugin-transform-class-properties@6.22.0: version "6.22.0" resolved "https://registry.yarnpkg.com/babel-plugin-transform-class-properties/-/babel-plugin-transform-class-properties-6.22.0.tgz#aa78f8134495c7de06c097118ba061844e1dc1d8" @@ -493,6 +611,32 @@ babel-plugin-transform-class-properties@6.22.0: babel-runtime "^6.22.0" babel-template "^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-do-expressions@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-do-expressions/-/babel-plugin-transform-do-expressions-6.22.0.tgz#28ccaf92812d949c2cd1281f690c8fdc468ae9bb" + dependencies: + babel-plugin-syntax-do-expressions "^6.8.0" + babel-runtime "^6.22.0" + babel-plugin-transform-es2015-arrow-functions@^6.22.0, babel-plugin-transform-es2015-arrow-functions@^6.3.13: 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" @@ -669,6 +813,21 @@ babel-plugin-transform-exponentiation-operator@^6.22.0, babel-plugin-transform-e babel-plugin-syntax-exponentiation-operator "^6.8.0" babel-runtime "^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: + babel-helper-builder-binary-assignment-operator-visitor "^6.24.1" + babel-plugin-syntax-exponentiation-operator "^6.8.0" + babel-runtime "^6.22.0" + +babel-plugin-transform-export-extensions@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-export-extensions/-/babel-plugin-transform-export-extensions-6.22.0.tgz#53738b47e75e8218589eea946cbbd39109bbe653" + dependencies: + babel-plugin-syntax-export-extensions "^6.8.0" + babel-runtime "^6.22.0" + babel-plugin-transform-flow-strip-types@^6.22.0: version "6.22.0" resolved "https://registry.yarnpkg.com/babel-plugin-transform-flow-strip-types/-/babel-plugin-transform-flow-strip-types-6.22.0.tgz#84cb672935d43714fdc32bce84568d87441cf7cf" @@ -676,7 +835,14 @@ 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: +babel-plugin-transform-function-bind@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-function-bind/-/babel-plugin-transform-function-bind-6.22.0.tgz#c6fb8e96ac296a310b8cf8ea401462407ddf6a97" + dependencies: + babel-plugin-syntax-function-bind "^6.8.0" + babel-runtime "^6.22.0" + +babel-plugin-transform-object-rest-spread@6.22.0, babel-plugin-transform-object-rest-spread@^6.22.0: version "6.22.0" resolved "https://registry.yarnpkg.com/babel-plugin-transform-object-rest-spread/-/babel-plugin-transform-object-rest-spread-6.22.0.tgz#1d419b55e68d2e4f64a5ff3373bd67d73c8e83bc" dependencies: @@ -769,7 +935,7 @@ babel-preset-env@1.1.8: babel-plugin-transform-regenerator "^6.6.0" browserslist "^1.4.0" -babel-preset-es2015@^6.22.0: +babel-preset-es2015@^6.22.0, babel-preset-es2015@^6.3.13: version "6.22.0" resolved "https://registry.yarnpkg.com/babel-preset-es2015/-/babel-preset-es2015-6.22.0.tgz#af5a98ecb35eb8af764ad8a5a05eb36dc4386835" dependencies: @@ -855,6 +1021,41 @@ babel-preset-react@6.22.0: babel-plugin-transform-react-jsx-self "^6.22.0" babel-plugin-transform-react-jsx-source "^6.22.0" +babel-preset-stage-0@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-preset-stage-0/-/babel-preset-stage-0-6.24.1.tgz#5642d15042f91384d7e5af8bc88b1db95b039e6a" + dependencies: + babel-plugin-transform-do-expressions "^6.22.0" + babel-plugin-transform-function-bind "^6.22.0" + babel-preset-stage-1 "^6.24.1" + +babel-preset-stage-1@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-preset-stage-1/-/babel-preset-stage-1-6.24.1.tgz#7692cd7dcd6849907e6ae4a0a85589cfb9e2bfb0" + dependencies: + babel-plugin-transform-class-constructor-call "^6.24.1" + babel-plugin-transform-export-extensions "^6.22.0" + babel-preset-stage-2 "^6.24.1" + +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.22.0, babel-register@^6.23.0: version "6.23.0" resolved "https://registry.yarnpkg.com/babel-register/-/babel-register-6.23.0.tgz#c9aa3d4cca94b51da34826c4a0f9e08145d74ff3" @@ -891,6 +1092,16 @@ babel-template@^6.16.0, babel-template@^6.22.0, babel-template@^6.23.0: babylon "^6.11.0" lodash "^4.2.0" +babel-template@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.24.1.tgz#04ae514f1f93b3a2537f2a0f60a5a45fb8308333" + dependencies: + babel-runtime "^6.22.0" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + babylon "^6.11.0" + lodash "^4.2.0" + babel-traverse@^6.15.0, babel-traverse@^6.18.0, babel-traverse@^6.22.0, babel-traverse@^6.22.1, babel-traverse@^6.23.0, babel-traverse@^6.23.1: version "6.23.1" resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.23.1.tgz#d3cb59010ecd06a97d81310065f966b699e14f48" @@ -905,6 +1116,20 @@ babel-traverse@^6.15.0, babel-traverse@^6.18.0, babel-traverse@^6.22.0, babel-tr invariant "^2.2.0" lodash "^4.2.0" +babel-traverse@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.24.1.tgz#ab36673fd356f9a0948659e7b338d5feadb31695" + dependencies: + babel-code-frame "^6.22.0" + babel-messages "^6.23.0" + babel-runtime "^6.22.0" + babel-types "^6.24.1" + babylon "^6.15.0" + debug "^2.2.0" + globals "^9.0.0" + invariant "^2.2.0" + lodash "^4.2.0" + babel-types@^6.15.0, babel-types@^6.18.0, babel-types@^6.19.0, babel-types@^6.22.0, babel-types@^6.23.0: version "6.23.0" resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.23.0.tgz#bb17179d7538bad38cd0c9e115d340f77e7e9acf" @@ -914,6 +1139,15 @@ babel-types@^6.15.0, babel-types@^6.18.0, babel-types@^6.19.0, babel-types@^6.22 lodash "^4.2.0" to-fast-properties "^1.0.1" +babel-types@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.24.1.tgz#a136879dc15b3606bda0d90c1fc74304c2ff0975" + dependencies: + babel-runtime "^6.22.0" + esutils "^2.0.2" + lodash "^4.2.0" + to-fast-properties "^1.0.1" + babylon@^6.11.0, babylon@^6.13.0, babylon@^6.15.0: version "6.16.1" resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.16.1.tgz#30c5a22f481978a9e7f8cdfdf496b11d94b404d3" @@ -1137,6 +1371,10 @@ clap@^1.0.9: dependencies: chalk "^1.1.3" +classnames@^2.2.5: + version "2.2.5" + resolved "https://registry.yarnpkg.com/classnames/-/classnames-2.2.5.tgz#fb3801d453467649ef3603c7d61a02bd129bde6d" + clean-css@4.0.x: version "4.0.8" resolved "https://registry.yarnpkg.com/clean-css/-/clean-css-4.0.8.tgz#063dfd593404d3a3d1db494d4b6d0f378b0781b6" @@ -1236,6 +1474,10 @@ colors@1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/colors/-/colors-1.0.3.tgz#0433f44d809680fdeb60ed260f1b0c262e82a40b" +colors@~0.6.0-1: + version "0.6.2" + resolved "https://registry.yarnpkg.com/colors/-/colors-0.6.2.tgz#2423fe6678ac0c5dae8852e5d0e5be08c997abcc" + colors@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/colors/-/colors-1.1.2.tgz#168a4701756b6a7f51a12ce0c97bfa28c084ed63" @@ -1246,12 +1488,16 @@ combined-stream@^1.0.5, combined-stream@~1.0.5: dependencies: delayed-stream "~1.0.0" -commander@2.9.x, commander@^2.9.0: +commander@2.9.0, commander@2.9.x, 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" +commander@~2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.1.0.tgz#d121bbae860d9992a3d517ba96f56588e47c6781" + commander@~2.8.1: version "2.8.1" resolved "https://registry.yarnpkg.com/commander/-/commander-2.8.1.tgz#06be367febfda0c330aa1e2a072d3dc9762425d4" @@ -1360,6 +1606,21 @@ cosmiconfig@^2.1.0, cosmiconfig@^2.1.1: parse-json "^2.2.0" require-from-string "^1.1.0" +create-react-class@^15.5.1: + version "15.5.3" + resolved "https://registry.yarnpkg.com/create-react-class/-/create-react-class-15.5.3.tgz#fb0f7cae79339e9a179e194ef466efa3923820fe" + dependencies: + fbjs "^0.8.9" + loose-envify "^1.3.1" + object-assign "^4.1.1" + +cross-spawn-async@^2.1.1: + version "2.2.5" + resolved "https://registry.yarnpkg.com/cross-spawn-async/-/cross-spawn-async-2.2.5.tgz#845ff0c0834a3ded9d160daca6d390906bb288cc" + dependencies: + lru-cache "^4.0.0" + which "^1.2.8" + cross-spawn@4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-4.0.2.tgz#7b9247621c23adfdd3856004a823cbe397424d41" @@ -1386,14 +1647,14 @@ css-color-names@0.0.4: version "0.0.4" resolved "https://registry.yarnpkg.com/css-color-names/-/css-color-names-0.0.4.tgz#808adc2e79cf84738069b646cb20ec27beb629e0" -css-loader@0.26.1: - version "0.26.1" - resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-0.26.1.tgz#2ba7f20131b93597496b3e9bb500785a49cd29ea" +css-loader@^0.26.1: + version "0.26.4" + resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-0.26.4.tgz#b61e9e30db94303e6ffc892f10ecd09ad025a1fd" dependencies: babel-code-frame "^6.11.0" css-selector-tokenizer "^0.7.0" cssnano ">=2.6.1 <4" - loader-utils "~0.2.2" + loader-utils "^1.0.2" lodash.camelcase "^4.3.0" object-assign "^4.0.1" postcss "^5.0.6" @@ -1401,7 +1662,7 @@ css-loader@0.26.1: postcss-modules-local-by-default "^1.0.1" postcss-modules-scope "^1.0.0" postcss-modules-values "^1.1.0" - source-list-map "^0.1.4" + source-list-map "^0.1.7" css-select@^1.1.0: version "1.2.0" @@ -1960,6 +2221,17 @@ exec-sh@^0.2.0: dependencies: merge "^1.1.3" +execa@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-0.4.0.tgz#4eb6467a36a095fabb2970ff9d5e3fb7bce6ebc3" + dependencies: + cross-spawn-async "^2.1.1" + is-stream "^1.1.0" + npm-run-path "^1.0.0" + object-assign "^4.0.1" + path-key "^1.0.0" + strip-eof "^1.0.0" + exit-hook@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/exit-hook/-/exit-hook-1.1.1.tgz#f05ca233b48c05d54fff07765df8507e95c02ff8" @@ -2061,7 +2333,7 @@ fb-watchman@^1.8.0, fb-watchman@^1.9.0: dependencies: bser "1.0.2" -fbjs@^0.8.1, fbjs@^0.8.4: +fbjs@^0.8.1, fbjs@^0.8.4, fbjs@^0.8.9: version "0.8.9" resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-0.8.9.tgz#180247fbd347dcc9004517b904f865400a0c8f14" dependencies: @@ -2143,6 +2415,13 @@ find-up@^1.0.0, find-up@^1.1.2: path-exists "^2.0.0" pinkie-promise "^2.0.0" +findup@0.1.5: + version "0.1.5" + resolved "https://registry.yarnpkg.com/findup/-/findup-0.1.5.tgz#8ad929a3393bac627957a7e5de4623b06b0e2ceb" + dependencies: + colors "~0.6.0-1" + commander "~2.1.0" + flat-cache@^1.2.1: version "1.2.2" resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-1.2.2.tgz#fa86714e72c21db88601761ecf2f555d1abc6b96" @@ -2156,6 +2435,12 @@ flatten@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/flatten/-/flatten-1.0.2.tgz#dae46a9d78fbe25292258cc1e780a41d95c03782" +follow-redirects@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.0.0.tgz#8e34298cbd2e176f254effec75a1c78cc849fd37" + dependencies: + debug "^2.2.0" + for-in@^0.1.5: version "0.1.6" resolved "https://registry.yarnpkg.com/for-in/-/for-in-0.1.6.tgz#c9f96e89bfad18a545af5ec3ed352a1d9e5b4dc8" @@ -2261,6 +2546,18 @@ getpass@^0.1.1: dependencies: assert-plus "^1.0.0" +ghooks@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ghooks/-/ghooks-2.0.0.tgz#affd83a36e8b8fbdded9b851457c48ac74c8eab8" + dependencies: + execa "^0.4.0" + findup "0.1.5" + lodash.clone "4.3.2" + manage-path "2.0.0" + opt-cli "1.5.1" + path-exists "^2.0.0" + spawn-command "0.0.2" + glob-base@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/glob-base/-/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4" @@ -2374,6 +2671,10 @@ hoek@2.x.x: version "2.16.3" resolved "https://registry.yarnpkg.com/hoek/-/hoek-2.16.3.tgz#20bb7403d3cea398e91dc4710a8ff1b8274a25ed" +hoist-non-react-statics@^1.0.3: + version "1.2.0" + resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-1.2.0.tgz#aa448cf0986d55cc40773b17174b7dd066cb7cfb" + home-or-tmp@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/home-or-tmp/-/home-or-tmp-2.0.0.tgz#e36c3f2d2cae7d746a857e38d18d5f32a7882db8" @@ -2537,7 +2838,7 @@ interpret@^0.6.4: version "0.6.6" resolved "https://registry.yarnpkg.com/interpret/-/interpret-0.6.6.tgz#fecd7a18e7ce5ca6abfb953e1f86213a49f1625b" -invariant@^2.2.0: +invariant@^2.0.0, invariant@^2.2.0: version "2.2.2" resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.2.tgz#9e1f56ac0acdb6bf303306f338be3b204ae60360" dependencies: @@ -2684,7 +2985,7 @@ is-resolvable@^1.0.0: dependencies: tryit "^1.0.1" -is-stream@^1.0.1: +is-stream@^1.0.1, is-stream@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" @@ -3134,7 +3435,7 @@ load-json-file@^1.0.0: pinkie-promise "^2.0.0" strip-bom "^2.0.0" -loader-utils@0.2.x, loader-utils@^0.2.11, loader-utils@^0.2.16, loader-utils@^0.2.3, loader-utils@^0.2.7, loader-utils@~0.2.2, loader-utils@~0.2.5: +loader-utils@0.2.x, loader-utils@^0.2.11, loader-utils@^0.2.16, loader-utils@^0.2.3, loader-utils@^0.2.7, loader-utils@~0.2.5: version "0.2.17" resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-0.2.17.tgz#f86e6374d43205a6e6c60e9196f17c0299bfb348" dependencies: @@ -3143,6 +3444,18 @@ loader-utils@0.2.x, loader-utils@^0.2.11, loader-utils@^0.2.16, loader-utils@^0. json5 "^0.5.0" object-assign "^4.0.1" +loader-utils@^1.0.2: + version "1.1.0" + resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.1.0.tgz#c98aef488bcceda2ffb5e2de646d6a754429f5cd" + dependencies: + big.js "^3.1.3" + emojis-list "^2.0.0" + json5 "^0.5.0" + +lodash-es@^4.2.1: + version "4.17.4" + resolved "https://registry.yarnpkg.com/lodash-es/-/lodash-es-4.17.4.tgz#dcc1d7552e150a0640073ba9cb31d70f032950e7" + lodash._arraycopy@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/lodash._arraycopy/-/lodash._arraycopy-3.0.0.tgz#76e7b7c1f1fb92547374878a562ed06a3e50f6e1" @@ -3169,6 +3482,10 @@ lodash._baseclone@^3.0.0: lodash.isarray "^3.0.0" lodash.keys "^3.0.0" +lodash._baseclone@~4.5.0: + version "4.5.7" + resolved "https://registry.yarnpkg.com/lodash._baseclone/-/lodash._baseclone-4.5.7.tgz#ce42ade08384ef5d62fa77c30f61a46e686f8434" + lodash._basecopy@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz#8da0e6a876cf344c0ad8a54882111dd3c5c7ca36" @@ -3193,6 +3510,12 @@ lodash.camelcase@^4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6" +lodash.clone@4.3.2: + version "4.3.2" + resolved "https://registry.yarnpkg.com/lodash.clone/-/lodash.clone-4.3.2.tgz#e56b176b6823a7dde38f7f2bf58de7d5971200e9" + dependencies: + lodash._baseclone "~4.5.0" + lodash.clonedeep@^3.0.0: version "3.0.2" resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-3.0.2.tgz#a0a1e40d82a5ea89ff5b147b8444ed63d92827db" @@ -3232,7 +3555,7 @@ lodash.uniq@^4.3.0: version "4.5.0" resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" -"lodash@>=3.5 <5", lodash@^4.0.0, lodash@^4.14.0, lodash@^4.15.0, lodash@^4.16.4, lodash@^4.17.2, lodash@^4.2.0, lodash@^4.3.0: +"lodash@>=3.5 <5", lodash@^4.0.0, lodash@^4.14.0, lodash@^4.15.0, lodash@^4.16.4, lodash@^4.17.2, lodash@^4.2.0, lodash@^4.2.1, lodash@^4.3.0: version "4.17.4" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" @@ -3240,7 +3563,7 @@ longest@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097" -loose-envify@^1.0.0, loose-envify@^1.1.0: +loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.3.1.tgz#d1a8ad33fa9ce0e713d65fdd0ac8b748d478c848" dependencies: @@ -3250,7 +3573,7 @@ lower-case@^1.1.1: version "1.1.3" resolved "https://registry.yarnpkg.com/lower-case/-/lower-case-1.1.3.tgz#c92393d976793eee5ba4edb583cf8eae35bd9bfb" -lru-cache@^4.0.1: +lru-cache@^4.0.0, lru-cache@^4.0.1: version "4.0.2" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.0.2.tgz#1d17679c069cda5d040991a09dbc2c0db377e55e" dependencies: @@ -3267,6 +3590,10 @@ makeerror@1.0.x: dependencies: tmpl "1.0.x" +manage-path@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/manage-path/-/manage-path-2.0.0.tgz#f4cf8457b926eeee2a83b173501414bc76eb9597" + marked-terminal@^1.6.2: version "1.7.0" resolved "https://registry.yarnpkg.com/marked-terminal/-/marked-terminal-1.7.0.tgz#c8c460881c772c7604b64367007ee5f77f125904" @@ -3520,6 +3847,12 @@ normalize-url@^1.4.0: query-string "^4.1.0" sort-keys "^1.0.0" +npm-run-path@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-1.0.0.tgz#f5c32bf595fe81ae927daec52e82f8b000ac3c8f" + dependencies: + path-key "^1.0.0" + npmlog@^4.0.1: version "4.0.2" resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.0.2.tgz#d03950e0e78ce1527ba26d2a7592e9348ac3e75f" @@ -3551,7 +3884,7 @@ oauth-sign@~0.8.1: version "0.8.2" resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43" -object-assign@4.1.1, object-assign@^4.0.1, object-assign@^4.1.0: +object-assign@4.1.1, object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" @@ -3599,6 +3932,15 @@ opn@4.0.2: object-assign "^4.0.1" pinkie-promise "^2.0.0" +opt-cli@1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/opt-cli/-/opt-cli-1.5.1.tgz#04db447b13c96b992eb31685266f4ed0d9736dc2" + dependencies: + commander "2.9.0" + lodash.clone "4.3.2" + manage-path "2.0.0" + spawn-command "0.0.2-1" + optimist@^0.6.1, optimist@~0.6.0, optimist@~0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686" @@ -3692,6 +4034,10 @@ path-is-inside@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" +path-key@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-1.0.0.tgz#5d53d578019646c0d68800db4e146e6bdc2ac7af" + path-parse@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1" @@ -4059,6 +4405,13 @@ promise@7.1.1, promise@^7.1.1: dependencies: asap "~2.0.3" +prop-types@^15.5.4: + version "15.5.10" + resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.5.10.tgz#2797dfc3126182e3a95e3dfbb2e893ddd7456154" + dependencies: + fbjs "^0.8.9" + loose-envify "^1.3.1" + proxy-addr@~1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-1.1.3.tgz#dc97502f5722e888467b3fa2297a7b1ff47df074" @@ -4160,6 +4513,17 @@ react-dom@^15.4.2: loose-envify "^1.1.0" object-assign "^4.1.0" +react-redux@^4.1.1: + version "4.4.8" + resolved "https://registry.yarnpkg.com/react-redux/-/react-redux-4.4.8.tgz#e7bc1dd100e8b64e96ac8212db113239b9e2e08f" + dependencies: + create-react-class "^15.5.1" + hoist-non-react-statics "^1.0.3" + invariant "^2.0.0" + lodash "^4.2.0" + loose-envify "^1.1.0" + prop-types "^15.5.4" + react@^15.4.2: version "15.4.2" resolved "https://registry.yarnpkg.com/react/-/react-15.4.2.tgz#41f7991b26185392ba9bae96c8889e7e018397ef" @@ -4259,6 +4623,19 @@ reduce-function-call@^1.0.1: dependencies: balanced-match "^0.4.2" +redux-thunk@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/redux-thunk/-/redux-thunk-1.0.3.tgz#778aa0099eea0595031ab6b39165f6670d8d26bd" + +redux@^3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/redux/-/redux-3.6.0.tgz#887c2b3d0b9bd86eca2be70571c27654c19e188d" + dependencies: + lodash "^4.2.1" + lodash-es "^4.2.1" + loose-envify "^1.1.0" + symbol-observable "^1.0.2" + regenerate@^1.2.1: version "1.3.2" resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.3.2.tgz#d1941c67bad437e1be76433add5b385f95b19260" @@ -4574,7 +4951,7 @@ sort-keys@^1.0.0: dependencies: is-plain-obj "^1.0.0" -source-list-map@^0.1.4, source-list-map@~0.1.7: +source-list-map@^0.1.7, source-list-map@~0.1.7: version "0.1.8" resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-0.1.8.tgz#c550b2ab5427f6b3f21f5afead88c4f5587b2106" @@ -4600,6 +4977,14 @@ source-map@~0.2.0: dependencies: amdefine ">=0.0.4" +spawn-command@0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/spawn-command/-/spawn-command-0.0.2.tgz#9544e1a43ca045f8531aac1a48cb29bdae62338e" + +spawn-command@0.0.2-1: + version "0.0.2-1" + resolved "https://registry.yarnpkg.com/spawn-command/-/spawn-command-0.0.2-1.tgz#62f5e9466981c1b796dc5929937e11c9c6921bd0" + spdx-correct@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-1.0.2.tgz#4b3073d933ff51f3912f03ac5519498a4150db40" @@ -4705,6 +5090,10 @@ strip-bom@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" +strip-eof@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" + strip-json-comments@~1.0.1: version "1.0.4" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-1.0.4.tgz#1e15fbcac97d3ee99bf2d73b4c656b082bbafb91" @@ -4713,11 +5102,11 @@ 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" -style-loader@0.13.1: - version "0.13.1" - resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-0.13.1.tgz#468280efbc0473023cd3a6cd56e33b5a1d7fc3a9" +style-loader@^0.13.1: + version "0.13.2" + resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-0.13.2.tgz#74533384cf698c7104c7951150b49717adc2f3bb" dependencies: - loader-utils "^0.2.7" + loader-utils "^1.0.2" supports-color@^2.0.0: version "2.0.0" @@ -4741,6 +5130,10 @@ svgo@^0.7.0: sax "~1.2.1" whet.extend "~0.9.9" +symbol-observable@^1.0.2: + version "1.0.4" + resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.0.4.tgz#29bf615d4aa7121bdd898b22d4b3f9bc4e2aa03d" + symbol-tree@^3.2.1: version "3.2.2" resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.2.tgz#ae27db38f660a7ae2e1c3b7d1bc290819b8519e6" @@ -5135,7 +5528,7 @@ which-module@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/which-module/-/which-module-1.0.0.tgz#bba63ca861948994ff307736089e3b96026c2a4f" -which@^1.0.5, which@^1.1.1, which@^1.2.9: +which@^1.0.5, which@^1.1.1, which@^1.2.8, which@^1.2.9: version "1.2.12" resolved "https://registry.yarnpkg.com/which/-/which-1.2.12.tgz#de67b5e450269f194909ef23ece4ebe416fa1192" dependencies: