From dbd4bd332ef7f00ebe8e190b3f66932857df663d Mon Sep 17 00:00:00 2001 From: Jeremy Bernier Date: Tue, 29 Oct 2019 10:49:59 +0900 Subject: [PATCH 1/2] update --- README.md | 2 ++ webpack/development/dev.config.js | 9 +++++++-- webpack/production/prod.config.js | 13 +++++++++---- webpack/symlinks.js | 17 ----------------- 4 files changed, 18 insertions(+), 23 deletions(-) delete mode 100644 webpack/symlinks.js diff --git a/README.md b/README.md index 0d1af0a..fdc8162 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,8 @@ This is a React/Redux single page app that can be used as boilerplate for any starting project, or simply for educational purposes. +**NOTE: This boilerplate is years old (which in the frontend world is like decades old), and at this point is outdated. Webpack, Babel, React-Router, etc. all need to be upgraded (unfortunately not as trivial as changing versions). Thus I do not recommend using this boilerplate beyond simply being a reference. + ### Features: * Universal/Isomorphic rendering diff --git a/webpack/development/dev.config.js b/webpack/development/dev.config.js index 1b92cec..e075f5b 100644 --- a/webpack/development/dev.config.js +++ b/webpack/development/dev.config.js @@ -3,8 +3,6 @@ var webpack = require('webpack') const ROOT = '../..' const PORT = require(ROOT + '/config/serverConfig.json').PORT -require('../symlinks')() - var configVars = { NODE_ENV: JSON.stringify('development'), BROWSER: JSON.stringify(true) @@ -24,6 +22,13 @@ module.exports = { filename: 'js/main.bundle.js', publicPath: `http://localhost:${PORT}/` }, + resolve: { + alias: { + Src: path.join(__dirname, ROOT + '/src'), + Config: path.join(__dirname, ROOT + '/config'), + }, + extensions: ['.js', '.jsx'] + }, plugins: [ new webpack.LoaderOptionsPlugin({ debug: true, diff --git a/webpack/production/prod.config.js b/webpack/production/prod.config.js index 43aeda6..9392ebf 100644 --- a/webpack/production/prod.config.js +++ b/webpack/production/prod.config.js @@ -6,9 +6,7 @@ var WebpackMd5Hash = require('webpack-md5-hash') //required for ChunkManifestPlu var ManifestPlugin = require('webpack-manifest-plugin') const ROOT = '../..' -require('../symlinks')() - -const VERSION = require(ROOT + '/package.json').version || '0.0.0' +// const VERSION = require(ROOT + '/package.json').version || '0.0.0' var configVars = { NODE_ENV: JSON.stringify('production'), @@ -16,7 +14,7 @@ var configVars = { } const config = require(ROOT + '/config/config.js')['production'] -const { STATIC_URL } = config +// const { STATIC_URL } = config module.exports = { context: path.resolve(__dirname, ROOT), @@ -41,6 +39,13 @@ module.exports = { filename: 'js/[name]_[chunkhash]_bundle.js', chunkFilename: 'js/[name]_[chunkhash]_chunk.js' }, + resolve: { + alias: { + Src: path.join(__dirname, ROOT + '/src'), + Config: path.join(__dirname, ROOT + '/config'), + }, + extensions: ['.js', '.jsx'] + }, plugins: [ new webpack.LoaderOptionsPlugin({ minimize: true, diff --git a/webpack/symlinks.js b/webpack/symlinks.js deleted file mode 100644 index a627365..0000000 --- a/webpack/symlinks.js +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Symlinks: - * - * @app -> if dev then src folder, if prod then bin folder - * @static -> static - * - * Note: Symlink also in package.json because @app needs to point to bin after compilation - * when running production - */ - -const execSync = require('child_process').execSync - -module.exports = function () { - execSync("rm -rf node_modules/@app && ln -sf ../src node_modules/@app") - execSync("[ -h ./node_modules/@static ] || ln -sf ../static ./node_modules/@static") - execSync("[ -h ./node_modules/@config ] || ln -sf ../config ./node_modules/@config") -} \ No newline at end of file From d53000def0b2066d49d991bc5300dfbbcd0a4fbc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 29 Oct 2019 01:51:21 +0000 Subject: [PATCH 2/2] Bump sshpk from 1.11.0 to 1.16.1 Bumps [sshpk](https://github.com/joyent/node-sshpk) from 1.11.0 to 1.16.1. - [Release notes](https://github.com/joyent/node-sshpk/releases) - [Commits](https://github.com/joyent/node-sshpk/compare/v1.11.0...v1.16.1) Signed-off-by: dependabot[bot] --- yarn.lock | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/yarn.lock b/yarn.lock index 9ae4a6f..0b772ae 100644 --- a/yarn.lock +++ b/yarn.lock @@ -160,8 +160,10 @@ asn1.js@^4.0.0: minimalistic-assert "^1.0.0" asn1@~0.2.3: - version "0.2.3" - resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.3.tgz#dac8787713c9966849fc8180777ebe9c1ddf3b86" + version "0.2.4" + resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.4.tgz#8d2475dfab553bb33e77b54e59e880bb8ce23136" + dependencies: + safer-buffer "~2.1.0" assert-plus@1.0.0, assert-plus@^1.0.0: version "1.0.0" @@ -782,8 +784,8 @@ base64-js@^1.0.2: resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.2.0.tgz#a39992d723584811982be5e290bb6a53d86700f1" bcrypt-pbkdf@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz#63bc5dcb61331b92bc05fd528953c33462a06f8d" + version "1.0.2" + resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e" dependencies: tweetnacl "^0.14.3" @@ -1604,10 +1606,11 @@ duplexify@^3.2.0: stream-shift "^1.0.0" ecc-jsbn@~0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz#0fc73a9ed5f0d53c38193398523ef7e543777505" + version "0.1.2" + resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" dependencies: jsbn "~0.1.0" + safer-buffer "^2.1.0" ee-first@1.1.1: version "1.1.1" @@ -2194,8 +2197,8 @@ get-stdin@^4.0.1: resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe" getpass@^0.1.1: - version "0.1.6" - resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.6.tgz#283ffd9fc1256840875311c1b60e8c40187110e6" + version "0.1.7" + resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" dependencies: assert-plus "^1.0.0" @@ -2722,12 +2725,6 @@ isstream@~0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" -jodid25519@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/jodid25519/-/jodid25519-1.0.2.tgz#06d4912255093419477d425633606e0e90782967" - dependencies: - jsbn "~0.1.0" - jquery@>=1.9.1: version "3.2.1" resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.2.1.tgz#5c4d9de652af6cd0a770154a631bba12b015c787" @@ -4808,6 +4805,10 @@ safe-buffer@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.0.1.tgz#d263ca54696cd8a306b5ca6551e92de57918fbe7" +safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: + version "2.1.2" + resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" + sass-graph@^2.1.1: version "2.1.2" resolved "https://registry.yarnpkg.com/sass-graph/-/sass-graph-2.1.2.tgz#965104be23e8103cb7e5f710df65935b317da57b" @@ -5014,18 +5015,17 @@ sprintf@^0.1.5: resolved "https://registry.yarnpkg.com/sprintf/-/sprintf-0.1.5.tgz#8f83e39a9317c1a502cb7db8050e51c679f6edcf" sshpk@^1.7.0: - version "1.11.0" - resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.11.0.tgz#2d8d5ebb4a6fab28ffba37fa62a90f4a3ea59d77" + version "1.16.1" + resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.16.1.tgz#fb661c0bef29b39db40769ee39fa70093d6f6877" dependencies: asn1 "~0.2.3" assert-plus "^1.0.0" - dashdash "^1.12.0" - getpass "^0.1.1" - optionalDependencies: bcrypt-pbkdf "^1.0.0" + dashdash "^1.12.0" ecc-jsbn "~0.1.1" - jodid25519 "^1.0.0" + getpass "^0.1.1" jsbn "~0.1.0" + safer-buffer "^2.0.2" tweetnacl "~0.14.0" stackframe@^0.3.1: