diff --git a/config/webpack.config.dev.js b/config/webpack.config.dev.js index 1563153350402e1b7e72ec2c37b3a37020ad5eff..3c2fd90027f1085eeed10735269347c52286a6e4 100644 --- a/config/webpack.config.dev.js +++ b/config/webpack.config.dev.js @@ -81,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. @@ -99,7 +99,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/react-scripts/ // directory for faster rebuilds. We use findCacheDir() because of: @@ -118,6 +118,11 @@ module.exports = { test: /\.css$/, loader: 'style!css?importLoaders=1!postcss' }, + // Load sass styles + { + test: /\.scss$/, + loader: 'style!css?importLoaders=1!postcss!sass' + }, // JSON is not enabled by default in Webpack but both Node and Browserify // allow it implicitly so we also enable it. { @@ -146,7 +151,7 @@ module.exports = { } ] }, - + // We use PostCSS for autoprefixing only. postcss: function() { return [ diff --git a/config/webpack.config.prod.js b/config/webpack.config.prod.js index 95cc16a7f2bbcfc565c368f168058a9db6affb3c..f63d0f6d05637a81ad015c92b22c3db630029168 100644 --- a/config/webpack.config.prod.js +++ b/config/webpack.config.prod.js @@ -79,14 +79,14 @@ module.exports = { // We also include JSX as a common component filename extension to support // some tools, although we do not recommend using it, see: // https://github.com/facebookincubator/create-react-app/issues/290 - extensions: ['.js', '.json', '.jsx', ''], + extensions: ['.js', '.json', '.jsx', '', '.scss'], alias: { // Support React Native Web // https://www.smashingmagazine.com/2016/08/a-glimpse-into-the-future-with-react-native-for-web/ 'react-native': 'react-native-web' } }, - + module: { // First, run the linter. // It's important to do this before Babel processes the JS. @@ -103,7 +103,7 @@ module.exports = { test: /\.(js|jsx)$/, include: paths.appSrc, loader: 'babel', - + }, // The notation here is somewhat confusing. // "postcss" loader applies autoprefixer to our CSS. @@ -130,6 +130,14 @@ module.exports = { loader: ExtractTextPlugin.extract('style', 'css?importLoaders=1&-autoprefixer!postcss') // Note: this won't work without `new ExtractTextPlugin()` in `plugins`. }, + // Load sass styles + { + test: /\.scss$/, + loader: ExtractTextPlugin.extract( + 'style', + 'css?modules&importLoaders=1&-autoprefixer!postcss!resolve-url!sass' + ) + }, // JSON is not enabled by default in Webpack but both Node and Browserify // allow it implicitly so we also enable it. { @@ -157,7 +165,7 @@ module.exports = { } ] }, - + // We use PostCSS for autoprefixing only. postcss: function() { return [ diff --git a/package.json b/package.json index 68c221d5a588b6be5c2c9d348b2028bf1a33eed0..e8bd9fea08e7a0d9a1b8ca9a346aaecbfe0f5c6f 100644 --- a/package.json +++ b/package.json @@ -9,11 +9,12 @@ "babel-jest": "16.0.0", "babel-loader": "6.2.5", "babel-preset-react-app": "^1.0.0", + "bootstrap": "4.0.0-alpha.4", "case-sensitive-paths-webpack-plugin": "1.1.4", "chalk": "1.1.3", "connect-history-api-fallback": "1.3.0", "cross-spawn": "4.0.2", - "css-loader": "0.25.0", + "css-loader": "^0.25.0", "detect-port": "1.0.1", "dotenv": "2.0.0", "eslint": "3.9.1", @@ -34,15 +35,19 @@ "http-proxy-middleware": "0.17.2", "jest": "16.0.2", "json-loader": "0.5.4", + "node-sass": "^4.1.1", + "nodemon": "^1.11.0", "object-assign": "4.1.0", "path-exists": "2.1.0", "postcss-loader": "1.0.0", "promise": "7.1.1", "react-dev-utils": "^0.3.0", "recursive-readdir": "2.1.0", + "resolve-url-loader": "^1.6.1", "rimraf": "2.5.4", + "sass-loader": "^4.1.1", "strip-ansi": "3.0.1", - "style-loader": "0.13.1", + "style-loader": "^0.13.1", "url-loader": "0.5.7", "webpack": "1.13.2", "webpack-dev-server": "1.16.2", @@ -57,7 +62,8 @@ "react-router-redux": "^4.0.7", "redux": "^3.6.0", "redux-promise": "^0.5.3", - "whatwg-fetch": "^1.0.0" + "whatwg-fetch": "^1.0.0", + "bpl": "git+https://d0516feb598c9e6cbc54d20cf52b7b41de2d7a3d:x-oauth-basic@github.com/Blocp/bpl.git" }, "scripts": { "start": "node scripts/start.js", diff --git a/public/index.html b/public/index.html index ed8b06bf2982357b71f51a5cb8515b7f5f6a58ba..8ea468045cf343e6675eb09bc462d68eb7cca99f 100644 --- a/public/index.html +++ b/public/index.html @@ -4,8 +4,6 @@ - Buildings - +