From b9873016e1f4be78fe6d34b20cc242e42a4da465 Mon Sep 17 00:00:00 2001 From: Steven Truesdell Date: Thu, 15 Sep 2016 21:17:44 -0600 Subject: [PATCH] updates readme with a demo link. --- README.md | 7 ++++-- package.json | 8 ++----- src/components/Layout/Grid.js | 1 + src/scenes/Home/Home.js | 3 +-- src/theme/grid.scss | 2 +- src/theme/main.scss | 2 +- tools/defaults.js | 4 ---- tools/webpack/dll.config.js | 1 - tools/webpack/webpack.config.client.js | 33 +++++++++----------------- 9 files changed, 22 insertions(+), 39 deletions(-) diff --git a/README.md b/README.md index 628f2c4..689832b 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,8 @@ A **bold** way to begin your next great universal React application. ## Demo +Check it out in action here: https://starter.boldr.io/ + ## Usage ### Development @@ -40,11 +42,12 @@ If you don't feel like using DLLs, set WEBPACK_DLLS to 0 in the `package.json` ## Alternatives -- [`React Webpack Node`](https://github.com/choonkending/react-webpack-node) +- [`ReactGo`]https://github.com/reactGo/reactGo) Your One-Stop solution for a full-stack app with ES6/ES2015 React.js featuring universal Redux, React Router, React Router Redux Hot reloading, CSS modules, Express 4.x, and multiple ORMs. -## Contributing +## Contributing +Pull requests are welcome and encouraged. If I made a mistake, raise an issue and/or fix it and submit a PR. Have a question? I'll do what I can to answer it for you. ## Dependencies diff --git a/package.json b/package.json index ee980b3..d2300c5 100644 --- a/package.json +++ b/package.json @@ -100,6 +100,8 @@ "devDependencies": { "autoprefixer": "^6.4.1", "babel-core": "^6.14.0", + "babel-polyfill": "^6.13.0", + "babel-register": "^6.14.0", "babel-loader": "^6.2.5", "babel-plugin-lodash": "^3.2.8", "babel-plugin-module-resolver": "^2.2.0", @@ -144,18 +146,12 @@ "webpack-node-externals": "^1.4.3" }, "dependencies": { - "axios": "^0.14.0", - "babel-polyfill": "^6.13.0", - "babel-register": "^6.14.0", "better-npm-run": "0.0.11", "classnames": "^2.2.5", "compression": "^1.6.2", "debug": "^2.2.0", - "es6-promise": "^3.3.1", "express": "^4.14.0", - "isomorphic-fetch": "^2.2.1", "lodash": "^4.15.0", - "normalize.css": "^4.2.0", "npm-run-all": "^3.1.0", "react": "^15.3.1", "react-dom": "^15.3.1", diff --git a/src/components/Layout/Grid.js b/src/components/Layout/Grid.js index 77ca6d4..cfaeeac 100644 --- a/src/components/Layout/Grid.js +++ b/src/components/Layout/Grid.js @@ -1,5 +1,6 @@ import React, { PureComponent } from 'react'; import classNames from 'classnames'; +import '../../theme/grid.scss'; class Grid extends PureComponent { render() { diff --git a/src/scenes/Home/Home.js b/src/scenes/Home/Home.js index 74dc9a9..3bfb670 100644 --- a/src/scenes/Home/Home.js +++ b/src/scenes/Home/Home.js @@ -5,7 +5,6 @@ import { connect } from 'react-redux'; import { Heading, Card, Row, Col, Grid, Logo, TextBlock } from 'components'; import { fetchPosts } from './actions'; -import styles from './Home.scss'; const mapStateToProps = (state) => { return { @@ -26,7 +25,7 @@ class Home extends Component { return (
-
+
diff --git a/src/theme/grid.scss b/src/theme/grid.scss index 334e3d2..7d0558d 100644 --- a/src/theme/grid.scss +++ b/src/theme/grid.scss @@ -1,7 +1,7 @@ // ////////////////////////////////////////////////////// // // BEM Sass port of Flexbox Grid - http://flexboxgrid.com // // ////////////////////////////////////////////////////// // - +@import 'variables'; // Mixins @mixin breakpoint($breakpoint, $breakpoint-size) { // The grid is mobile first so xs is the default, hence no breakpoint diff --git a/src/theme/main.scss b/src/theme/main.scss index c4a336e..e76badb 100644 --- a/src/theme/main.scss +++ b/src/theme/main.scss @@ -1,6 +1,6 @@ @import 'variables'; @import 'grid'; - +@import '../scenes/Home/Home.scss'; body { background: linear-gradient(to left, #517fa4 , #243949); font-family: $font-stack; diff --git a/tools/defaults.js b/tools/defaults.js index 45e7a9b..fef2e03 100644 --- a/tools/defaults.js +++ b/tools/defaults.js @@ -2,10 +2,6 @@ const path = require('path'); const ABS_ROOT = path.resolve(process.cwd()); -const HMR_PORT = 3001; -const SSR_PORT = 3000; -const HOST = 'localhost'; - module.exports = { HMR_PORT: 3001, SSR_PORT: 3000, diff --git a/tools/webpack/dll.config.js b/tools/webpack/dll.config.js index abb3306..a03aef8 100644 --- a/tools/webpack/dll.config.js +++ b/tools/webpack/dll.config.js @@ -67,7 +67,6 @@ module.exports = { 'react-helmet', 'redux-thunk', 'redial', - 'isomorphic-fetch', 'classnames', 'superagent', 'lodash', diff --git a/tools/webpack/webpack.config.client.js b/tools/webpack/webpack.config.client.js index bdffbe8..bd68bc5 100644 --- a/tools/webpack/webpack.config.client.js +++ b/tools/webpack/webpack.config.client.js @@ -54,7 +54,6 @@ module.exports = function webpackConfig() { 'react-helmet', 'redux-thunk', 'redial', - 'isomorphic-fetch', 'superagent', 'classnames', 'lodash', @@ -85,36 +84,27 @@ module.exports = function webpackConfig() { { test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, loader: 'file' }, { test: /\.svg(\?v=\d+\.\d+\.\d+)?$/, loader: 'url?limit=10000&mimetype=image/svg+xml' }, { test: webpackIsomorphicToolsPlugin.regular_expression('images'), loader: 'url-loader?limit=10240' }, - { - test: /\.css$/, - include: /node_modules/, - loader: isDev ? 'style!css' : - ExtractTextPlugin.extract({ - fallbackLoader: 'style', - loader: 'css' - }) - }, createSourceLoader({ - happy: { id: 'css' }, - test: /\.css$/, + happy: { id: 'sass' }, + test: /\.scss$/, exclude: /node_modules/, loader: isDev ? - 'style!css?localIdentName=[name]__[local].[hash:base64:5]&modules&sourceMap&-minimize&importLoaders=1!postcss' : + 'style!css?localIdentName=[name]__[local].[hash:base64:5]&sourceMap&-minimize&importLoaders=2!postcss!sass?outputStyle=expanded&sourceMap' : ExtractTextPlugin.extract({ fallbackLoader: 'style', - loader: 'css?modules&sourceMap&importLoaders=1!postcss' - }), + loader: 'css?sourceMap&importLoaders=2!postcss!sass?outputStyle=expanded&sourceMap&sourceMapContents' + }) }), createSourceLoader({ - happy: { id: 'sass' }, - test: /\.scss$/, + happy: { id: 'css' }, + test: /\.css$/, exclude: /node_modules/, loader: isDev ? - 'style!css?localIdentName=[name]__[local].[hash:base64:5]&sourceMap&-minimize&importLoaders=2!postcss!sass?outputStyle=expanded&sourceMap' : + 'style!css?localIdentName=[name]__[local].[hash:base64:5]&modules&sourceMap&-minimize&importLoaders=1!postcss' : ExtractTextPlugin.extract({ fallbackLoader: 'style', - loader: 'css?modules&sourceMap&importLoaders=2!postcss!sass?outputStyle=expanded&sourceMap&sourceMapContents' - }) + loader: 'css?modules&sourceMap&importLoaders=1!postcss' + }), }), { test: /\.module.scss$/, @@ -193,8 +183,7 @@ module.exports = function webpackConfig() { // Extracts all stylesheets into a main file. During development styles are dumped // into the head and/or added dynamically. ifProd(new ExtractTextPlugin({ - filename: '[name].[chunkhash].css', - allChunks: true + filename: '[name].[chunkhash].css' })), // Becareful adding too much for Uglify to do because it has a talent for breaking bundles. ifProd(new webpack.optimize.UglifyJsPlugin({