diff --git a/client/config/webpack.config.common.js b/client/config/webpack.config.common.js index a52afe2..04ace42 100644 --- a/client/config/webpack.config.common.js +++ b/client/config/webpack.config.common.js @@ -1,7 +1,7 @@ -const path = require('path'); const HtmlWebpackPlugin = require('html-webpack-plugin'); -const glob = require('glob'); const webpack = require('webpack'); +const glob = require('glob'); +const path = require('path'); const TARGET = process.env.npm_lifecycle_event; const PATHS = { @@ -15,6 +15,7 @@ const PATHS = { process.env.BABEL_ENV = TARGET; const common = { + context: PATHS.app, entry: { app: [PATHS.app] }, @@ -27,7 +28,8 @@ const common = { }, output: { path: PATHS.build, - filename: '[name].js' + filename: '[name].js', + publicPath: '/' }, module: { rules: [ @@ -56,6 +58,7 @@ const common = { new HtmlWebpackPlugin({ template: '../node_modules/html-webpack-template/index.ejs', title: 'UruIT React Seed', + favicon: 'favicon.ico', appMountId: 'app', inject: false, minify: { diff --git a/client/config/webpack.config.prod.js b/client/config/webpack.config.prod.js index 1fccd59..6d05dbe 100644 --- a/client/config/webpack.config.prod.js +++ b/client/config/webpack.config.prod.js @@ -1,8 +1,10 @@ -const { common, PATHS } = require('./webpack.config.common'); -const merge = require('webpack-merge'); -const webpack = require('webpack'); const CleanPlugin = require('clean-webpack-plugin'); +const CopyWebpackPlugin = require('copy-webpack-plugin'); const ExtractTextPlugin = require('extract-text-webpack-plugin'); +const merge = require('webpack-merge'); +const webpack = require('webpack'); +const path = require('path'); +const { common, PATHS } = require('./webpack.config.common'); module.exports = merge(common, { output: { @@ -62,6 +64,12 @@ module.exports = merge(common, { compress: { warnings: false } - }) + }), + new CopyWebpackPlugin([ + { + from: path.join(PATHS.app, 'favicon.ico'), + to: path.join(PATHS.build, 'favicon.ico') + } + ]) ] }); diff --git a/client/favicon.ico b/client/favicon.ico new file mode 100644 index 0000000..1108df2 Binary files /dev/null and b/client/favicon.ico differ diff --git a/package.json b/package.json index d12d0a9..6cfd36d 100644 --- a/package.json +++ b/package.json @@ -58,6 +58,7 @@ "babel-preset-react": "^6.24.1", "babel-preset-survivejs-kanban": "^0.3.3", "clean-webpack-plugin": "^0.1.16", + "copy-webpack-plugin": "^4.0.1", "coveralls": "^2.13.1", "css-loader": "^0.28.5", "eslint": "^4.5.0", diff --git a/server/config/index.js b/server/config/index.js index e4928c2..ab07f6e 100644 --- a/server/config/index.js +++ b/server/config/index.js @@ -2,7 +2,7 @@ const commonConfig = { database: { connectionString: process.env.DATABASE_URL || 'postgres://pg:pg@localhost:5432/reactseeddb' }, - port: 3000, + port: 4000, sslPort: 4443 // Add here settings shared by all the environments }; diff --git a/yarn.lock b/yarn.lock index 31bf851..882e5ff 100644 --- a/yarn.lock +++ b/yarn.lock @@ -915,6 +915,10 @@ block-stream@*: dependencies: inherits "~2.0.0" +bluebird@^2.10.2: + version "2.11.0" + resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-2.11.0.tgz#534b9033c022c9579c56ba3b3e5a5caafbb650e1" + bluebird@^3.4.7: version "3.5.0" resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.0.tgz#791420d7f551eea2897453a8a77653f96606d67c" @@ -1403,6 +1407,19 @@ convert-source-map@^1.1.1, convert-source-map@^1.5.0: version "1.5.0" resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.5.0.tgz#9acd70851c6d5dfdd93d9282e5edf94a03ff46b5" +copy-webpack-plugin@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/copy-webpack-plugin/-/copy-webpack-plugin-4.0.1.tgz#9728e383b94316050d0c7463958f2b85c0aa8200" + dependencies: + bluebird "^2.10.2" + fs-extra "^0.26.4" + glob "^6.0.4" + is-glob "^3.1.0" + loader-utils "^0.2.15" + lodash "^4.3.0" + minimatch "^3.0.0" + node-dir "^0.1.10" + core-js@^1.0.0: version "1.2.7" resolved "https://registry.yarnpkg.com/core-js/-/core-js-1.2.7.tgz#652294c14651db28fa93bd2d5ff2983a4f08c636" @@ -2366,6 +2383,16 @@ fs-exists-sync@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/fs-exists-sync/-/fs-exists-sync-0.1.0.tgz#982d6893af918e72d08dec9e8673ff2b5a8d6add" +fs-extra@^0.26.4: + version "0.26.7" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-0.26.7.tgz#9ae1fdd94897798edab76d0918cf42d0c3184fa9" + dependencies: + graceful-fs "^4.1.2" + jsonfile "^2.1.0" + klaw "^1.0.0" + path-is-absolute "^1.0.0" + rimraf "^2.2.8" + fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" @@ -2466,6 +2493,16 @@ glob-parent@^2.0.0: dependencies: is-glob "^2.0.0" +glob@^6.0.4: + version "6.0.4" + resolved "https://registry.yarnpkg.com/glob/-/glob-6.0.4.tgz#0f08860f6a155127b2fadd4f9ce24b1aab6e4d22" + dependencies: + inflight "^1.0.4" + inherits "2" + minimatch "2 || 3" + once "^1.3.0" + path-is-absolute "^1.0.0" + glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.1.2, glob@~7.1.1: version "7.1.2" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" @@ -2546,7 +2583,7 @@ got@^6.7.1: unzip-response "^2.0.1" url-parse-lax "^1.0.0" -graceful-fs@^4.1.11, graceful-fs@^4.1.2: +graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9: version "4.1.11" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" @@ -2945,7 +2982,7 @@ is-extglob@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0" -is-extglob@^2.1.1: +is-extglob@^2.1.0, is-extglob@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" @@ -2971,6 +3008,12 @@ is-glob@^2.0.0, is-glob@^2.0.1: dependencies: is-extglob "^1.0.0" +is-glob@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-3.1.0.tgz#7ba5ae24217804ac70707b96922567486cc3e84a" + dependencies: + is-extglob "^2.1.0" + is-glob@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.0.tgz#9521c76845cc2610a85203ddf080a958c2ffabc0" @@ -3264,6 +3307,12 @@ json5@^0.5.0, json5@^0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" +jsonfile@^2.1.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-2.4.0.tgz#3736a2b428b87bbda0cc83b53fa3d633a35c2ae8" + optionalDependencies: + graceful-fs "^4.1.6" + jsonify@~0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" @@ -3305,6 +3354,12 @@ kind-of@^4.0.0: dependencies: is-buffer "^1.1.5" +klaw@^1.0.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/klaw/-/klaw-1.3.1.tgz#4088433b46b3b1ba259d78785d8e96f73ba02439" + optionalDependencies: + graceful-fs "^4.1.9" + latest-version@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/latest-version/-/latest-version-3.1.0.tgz#a205383fea322b33b5ae3b18abee0dc2f356ee15" @@ -3450,7 +3505,7 @@ loader-runner@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-2.3.0.tgz#f482aea82d543e07921700d5a46ef26fdac6b8a2" -loader-utils@^0.2.16: +loader-utils@^0.2.15, loader-utils@^0.2.16: version "0.2.17" resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-0.2.17.tgz#f86e6374d43205a6e6c60e9196f17c0299bfb348" dependencies: @@ -3765,7 +3820,7 @@ minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" -minimatch@^3.0.0, minimatch@^3.0.2, minimatch@^3.0.4, minimatch@~3.0.2: +"minimatch@2 || 3", minimatch@^3.0.0, minimatch@^3.0.2, minimatch@^3.0.4, minimatch@~3.0.2: version "3.0.4" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" dependencies: @@ -3828,6 +3883,12 @@ no-case@^2.2.0: dependencies: lower-case "^1.1.1" +node-dir@^0.1.10: + version "0.1.17" + resolved "https://registry.yarnpkg.com/node-dir/-/node-dir-0.1.17.tgz#5f5665d93351335caabef8f1c554516cf5f1e4e5" + dependencies: + minimatch "^3.0.2" + node-fetch@^1.0.1: version "1.7.2" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.7.2.tgz#c54e9aac57e432875233525f3c891c4159ffefd7"