├── .babelrc ├── .bumpedrc ├── .editorconfig ├── .gitattributes ├── .gitignore ├── .npmignore ├── .npmrc ├── .travis.yml ├── CHANGELOG.md ├── LICENSE.md ├── README.md ├── bin └── server.js ├── config.json ├── index.ejs ├── package.json ├── postcss.config.js ├── src ├── app │ ├── App │ │ └── index.js │ ├── Counter │ │ └── index.js │ ├── Layout │ │ └── index.js │ ├── index.js │ └── index.scss └── www │ ├── appcache │ ├── manifest.appcache │ └── manifest.html │ ├── report.html │ ├── stats.json │ └── sw.js ├── webpack.config.js └── webpack.dev.config.js /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | ["env", { 4 | "modules": false, 5 | "targets": { "browsers": [ 6 | ">0.25%", 7 | "not ie 11", 8 | "not op_mini all" 9 | ] } 10 | }], 11 | "react" 12 | ], 13 | "plugins": [ 14 | "transform-class-properties", 15 | "transform-object-rest-spread" 16 | ], 17 | "env": { 18 | "production": { 19 | "plugins": [ 20 | "transform-react-inline-elements", 21 | ["transform-react-remove-prop-types", {"removeImport": true}], 22 | "transform-react-pure-class-to-function", 23 | "transform-react-constant-elements" 24 | ] 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /.bumpedrc: -------------------------------------------------------------------------------- 1 | files: [ 2 | 'package.json' 3 | ] 4 | 5 | plugins: 6 | 7 | prerelease: 8 | 9 | 'Linting config files': 10 | plugin: 'bumped-finepack' 11 | 12 | postrelease: 13 | 14 | 'Generating CHANGELOG file': 15 | plugin: 'bumped-changelog' 16 | 17 | 'Commiting new version': 18 | plugin: 'bumped-terminal' 19 | command: 'git add CHANGELOG.md package.json && git commit -m "Release $newVersion"' 20 | 21 | 'Detecting problems before publish': 22 | plugin: 'bumped-terminal' 23 | command: 'git-dirty && npm test' 24 | 25 | 'Publishing tag at GitHub': 26 | plugin: 'bumped-terminal' 27 | command: 'git tag $newVersion && git push && git push --tags' 28 | 29 | 'Publishing at NPM': 30 | plugin: 'bumped-terminal' 31 | command: 'npm publish' 32 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # http://editorconfig.org 2 | 3 | root = true 4 | 5 | [*] 6 | indent_style = space 7 | indent_size = 2 8 | end_of_line = lf 9 | charset = utf-8 10 | trim_trailing_whitespace = true 11 | insert_final_newline = true 12 | max_line_length = 80 13 | indent_brace_style = 1TBS 14 | spaces_around_operators = true 15 | quote_type = auto 16 | 17 | [package.json] 18 | indent_style = space 19 | indent_size = 2 20 | 21 | [*.md] 22 | trim_trailing_whitespace = false 23 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ############################ 2 | # npm 3 | ############################ 4 | node_modules 5 | npm-debug.log 6 | 7 | ############################ 8 | # tmp, editor & OS files 9 | ############################ 10 | .tmp 11 | *.swo 12 | *.swp 13 | *.swn 14 | *.swm 15 | .DS_Store 16 | *# 17 | *~ 18 | .idea 19 | *sublime* 20 | nbproject 21 | 22 | ############################ 23 | # Tests 24 | ############################ 25 | testApp 26 | coverage 27 | .nyc_output 28 | 29 | ############################ 30 | # Other 31 | ############################ 32 | .node_history 33 | .node_history 34 | src/www/assets/css 35 | src/www/assets/js 36 | src/www/index.html 37 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | .idea 2 | .project 3 | *.sublime-* 4 | .DS_Store 5 | *.seed 6 | *.log 7 | *.csv 8 | *.dat 9 | *.out 10 | *.pid 11 | *.swp 12 | *.swo 13 | node_modules 14 | coverage 15 | *.tgz 16 | *.xml 17 | -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | unsafe-perm=true 2 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "node" 4 | 5 | env: 6 | global: 7 | - GIT_NAME: Travis CI 8 | - GIT_EMAIL: nobody@nobody.org 9 | - GITHUB_REPO: Kikobeats/react-boilerplatinum 10 | - GIT_SOURCE: src/www 11 | - GIT_BRANCH: gh-pages 12 | 13 | after_script: 14 | - | 15 | declare exitCode; 16 | # -- [1] ------------------------------------------------------- 17 | $(npm bin)/travis-after-all 18 | exitCode=$? 19 | # -- [2] ------------------------------------------------------- 20 | if [ "$TRAVIS_BRANCH" = "master" -a "$TRAVIS_PULL_REQUEST" = "false" -a $exitCode -eq 0 ]; then 21 | npm install git-update-ghpages 22 | npm run build && ./node_modules/.bin/git-update-ghpages -e 23 | fi 24 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | 2 | ## 1.6.1 (2018-01-18) 3 | 4 | * Add a11y plugin ([75b6841](https://github.com/Kikobeats/react-boilerplatinum/commit/75b6841)) 5 | * Remove prop-types for production build ([924b6b2](https://github.com/Kikobeats/react-boilerplatinum/commit/924b6b2)) 6 | * Update README.md ([068ecde](https://github.com/Kikobeats/react-boilerplatinum/commit/068ecde)) 7 | * Update README.md ([2aa9af3](https://github.com/Kikobeats/react-boilerplatinum/commit/2aa9af3)) 8 | * fix(package): update autoprefixer to version 7.2.0 ([cce0dac](https://github.com/Kikobeats/react-boilerplatinum/commit/cce0dac)) 9 | * fix(package): update compression-webpack-plugin to version 1.1.0 ([16d7077](https://github.com/Kikobeats/react-boilerplatinum/commit/16d7077)) 10 | * fix(package): update node-sass to version 4.6.0 ([c4015ce](https://github.com/Kikobeats/react-boilerplatinum/commit/c4015ce)) 11 | * fix(package): update node-sass to version 4.7.1 ([2e913c6](https://github.com/Kikobeats/react-boilerplatinum/commit/2e913c6)) 12 | * fix(package): update offline-plugin to version 4.9.0 ([6b2efb4](https://github.com/Kikobeats/react-boilerplatinum/commit/6b2efb4)) 13 | * fix(package): update postcss-focus to version 3.0.0 ([e8f8e3b](https://github.com/Kikobeats/react-boilerplatinum/commit/e8f8e3b)) 14 | * fix(package): update preload-webpack-plugin to version 2.1.0 ([53da83d](https://github.com/Kikobeats/react-boilerplatinum/commit/53da83d)) 15 | * fix(package): update preload-webpack-plugin to version 2.2.0 ([a4829ea](https://github.com/Kikobeats/react-boilerplatinum/commit/a4829ea)) 16 | * fix(package): update react to version 16.1.0 ([8dd1acc](https://github.com/Kikobeats/react-boilerplatinum/commit/8dd1acc)) 17 | * fix(package): update react to version 16.2.0 ([4aa0b77](https://github.com/Kikobeats/react-boilerplatinum/commit/4aa0b77)) 18 | * fix(package): update react-dom to version 16.1.0 ([97896b9](https://github.com/Kikobeats/react-boilerplatinum/commit/97896b9)) 19 | * fix(package): update react-dom to version 16.2.0 ([577536b](https://github.com/Kikobeats/react-boilerplatinum/commit/577536b)) 20 | * fix(package): update react-hot-loader to version 3.1.0 ([e72ea6c](https://github.com/Kikobeats/react-boilerplatinum/commit/e72ea6c)) 21 | * fix(package): update react-hot-loader to version 4.0.0-beta.1 ([7f79555](https://github.com/Kikobeats/react-boilerplatinum/commit/7f79555)) 22 | * fix(package): update tachyons-sass to version 4.9.0 ([98235cf](https://github.com/Kikobeats/react-boilerplatinum/commit/98235cf)) 23 | * fix(package): update webpack to version 3.10.0 ([2c7b13a](https://github.com/Kikobeats/react-boilerplatinum/commit/2c7b13a)) 24 | * fix(package): update webpack to version 3.8.0 ([212baf8](https://github.com/Kikobeats/react-boilerplatinum/commit/212baf8)) 25 | * fix(package): update webpack to version 3.9.0 ([3346770](https://github.com/Kikobeats/react-boilerplatinum/commit/3346770)) 26 | * docs(readme): add Greenkeeper badge ([a000ac7](https://github.com/Kikobeats/react-boilerplatinum/commit/a000ac7)) 27 | * docs(readme): add Greenkeeper badge ([014ea6d](https://github.com/Kikobeats/react-boilerplatinum/commit/014ea6d)) 28 | 29 | 30 | 31 | 32 | # 1.6.0 (2017-10-12) 33 | 34 | * Update deps ([130a949](https://github.com/Kikobeats/react-boilerplatinum/commit/130a949)) 35 | 36 | 37 | 38 | 39 | # 1.5.0 (2017-10-12) 40 | 41 | * Add transform-class-properties plugin ([8919d03](https://github.com/Kikobeats/react-boilerplatinum/commit/8919d03)) 42 | 43 | 44 | 45 | 46 | ## 1.4.1 (2017-10-12) 47 | 48 | * Add babel eslint ([b419387](https://github.com/Kikobeats/react-boilerplatinum/commit/b419387)) 49 | * Remove unnecessary deps ([5020c7d](https://github.com/Kikobeats/react-boilerplatinum/commit/5020c7d)) 50 | * fix(package): update babel-core to version 6.26.0 ([c702125](https://github.com/Kikobeats/react-boilerplatinum/commit/c702125)) 51 | * fix(package): update babel-plugin-transform-object-rest-spread to version 6.26.0 ([a2057fd](https://github.com/Kikobeats/react-boilerplatinum/commit/a2057fd)) 52 | * fix(package): update html-webpack-plugin to version 2.30.0 ([506da3b](https://github.com/Kikobeats/react-boilerplatinum/commit/506da3b)) 53 | * fix(package): update optimize-css-assets-webpack-plugin to version 3.1.0 ([d6b4785](https://github.com/Kikobeats/react-boilerplatinum/commit/d6b4785)) 54 | * fix(package): update optimize-css-assets-webpack-plugin to version 3.2.0 ([2a28e6a](https://github.com/Kikobeats/react-boilerplatinum/commit/2a28e6a)) 55 | * fix(package): update preload-webpack-plugin to version 2.0.0 ([6a202fe](https://github.com/Kikobeats/react-boilerplatinum/commit/6a202fe)) 56 | * fix(package): update react to version 16.0.0 ([c47bf51](https://github.com/Kikobeats/react-boilerplatinum/commit/c47bf51)) 57 | * fix(package): update react-dom to version 16.0.0 ([0f0d7b4](https://github.com/Kikobeats/react-boilerplatinum/commit/0f0d7b4)) 58 | * fix(package): update style-loader to version 0.19.0 ([13cd6af](https://github.com/Kikobeats/react-boilerplatinum/commit/13cd6af)) 59 | * fix(package): update tachyons-sass to version 4.8.1 ([07ef190](https://github.com/Kikobeats/react-boilerplatinum/commit/07ef190)) 60 | * fix(package): update webpack to version 3.5.0 ([c7bed58](https://github.com/Kikobeats/react-boilerplatinum/commit/c7bed58)) 61 | * fix(package): update webpack to version 3.6.0 ([c676fe1](https://github.com/Kikobeats/react-boilerplatinum/commit/c676fe1)) 62 | * fix(package): update webpack to version 3.7.0 ([53af794](https://github.com/Kikobeats/react-boilerplatinum/commit/53af794)) 63 | * fix(package): update webpack-bundle-analyzer to version 2.9.0 ([6e7ec07](https://github.com/Kikobeats/react-boilerplatinum/commit/6e7ec07)) 64 | 65 | 66 | 67 | 68 | # 1.4.0 (2017-07-29) 69 | 70 | * Add webpack-common-shake ([52d937a](https://github.com/Kikobeats/react-boilerplatinum/commit/52d937a)) 71 | 72 | 73 | 74 | 75 | ## 1.3.5 (2017-07-27) 76 | 77 | * Add compression plugin ([5982d88](https://github.com/Kikobeats/react-boilerplatinum/commit/5982d88)) 78 | * Initialize minimal dashboard ([d18572f](https://github.com/Kikobeats/react-boilerplatinum/commit/d18572f)) 79 | * Remove undeed dep ([cc24607](https://github.com/Kikobeats/react-boilerplatinum/commit/cc24607)) 80 | * Update deps ([7b702d3](https://github.com/Kikobeats/react-boilerplatinum/commit/7b702d3)) 81 | * Update README.md ([310e0d5](https://github.com/Kikobeats/react-boilerplatinum/commit/310e0d5)) 82 | * fix(package): update file-loader to version 1.0.0-rc.0 ([671c295](https://github.com/Kikobeats/react-boilerplatinum/commit/671c295)) 83 | * fix(package): update optimize-css-assets-webpack-plugin to version 3.0.0 ([8936649](https://github.com/Kikobeats/react-boilerplatinum/commit/8936649)) 84 | * fix(package): update webpack to version 3.4.0 ([d1c3a03](https://github.com/Kikobeats/react-boilerplatinum/commit/d1c3a03)) 85 | * docs(readme): add Greenkeeper badge ([47d724b](https://github.com/Kikobeats/react-boilerplatinum/commit/47d724b)) 86 | * chore(package): update dependencies ([ce55bfb](https://github.com/Kikobeats/react-boilerplatinum/commit/ce55bfb)) 87 | 88 | 89 | 90 | 91 | ## 1.3.4 (2017-06-27) 92 | 93 | * Better default meta ([7535571](https://github.com/Kikobeats/react-boilerplatinum/commit/7535571)) 94 | * Better GA script ([2fe5c63](https://github.com/Kikobeats/react-boilerplatinum/commit/2fe5c63)) 95 | 96 | 97 | 98 | 99 | ## 1.3.3 (2017-06-27) 100 | 101 | * Add missing dep ([c193f60](https://github.com/Kikobeats/react-boilerplatinum/commit/c193f60)) 102 | 103 | 104 | 105 | 106 | ## 1.3.2 (2017-06-27) 107 | 108 | * Tweaks ([6f5b558](https://github.com/Kikobeats/react-boilerplatinum/commit/6f5b558)) 109 | * Upgrade deps ([915c890](https://github.com/Kikobeats/react-boilerplatinum/commit/915c890)) 110 | 111 | 112 | 113 | 114 | ## 1.3.1 (2017-06-07) 115 | 116 | * Tweaks ([7a39290](https://github.com/Kikobeats/react-boilerplatinum/commit/7a39290)) 117 | * Update deps ([34942fd](https://github.com/Kikobeats/react-boilerplatinum/commit/34942fd)) 118 | 119 | 120 | 121 | 122 | # 1.3.0 (2017-05-26) 123 | 124 | * Add OptimizeCssAssetsPlugin ([6c9b6a2](https://github.com/Kikobeats/react-boilerplatinum/commit/6c9b6a2)) 125 | * Use a global stylesheet ([81cd65a](https://github.com/Kikobeats/react-boilerplatinum/commit/81cd65a)) 126 | * chore(package): update babel-preset-env to version 1.5.1 ([20fd81a](https://github.com/Kikobeats/react-boilerplatinum/commit/20fd81a)) 127 | * chore(package): update offline-plugin to version 4.8.0 ([cd6a351](https://github.com/Kikobeats/react-boilerplatinum/commit/cd6a351)) 128 | * chore(package): update style-loader to version 0.18.0 ([e62400e](https://github.com/Kikobeats/react-boilerplatinum/commit/e62400e)) 129 | * chore(package): update webpack to version 2.6.0 ([0cf295f](https://github.com/Kikobeats/react-boilerplatinum/commit/0cf295f)) 130 | 131 | 132 | 133 | 134 | ## 1.2.3 (2017-05-17) 135 | 136 | * Add purify as dependency ([f1c1f24](https://github.com/Kikobeats/react-boilerplatinum/commit/f1c1f24)) 137 | * Updaate postcss parser loader ([82b7b4a](https://github.com/Kikobeats/react-boilerplatinum/commit/82b7b4a)) 138 | * Update offline settings ([4fbd223](https://github.com/Kikobeats/react-boilerplatinum/commit/4fbd223)) 139 | * chore(package): update autoprefixer to version 7.0.0 ([e6c178f](https://github.com/Kikobeats/react-boilerplatinum/commit/e6c178f)) 140 | * chore(package): update autoprefixer to version 7.1.0 ([4fd30ce](https://github.com/Kikobeats/react-boilerplatinum/commit/4fd30ce)) 141 | * chore(package): update babel-loader to version 7.0.0 ([c0344ab](https://github.com/Kikobeats/react-boilerplatinum/commit/c0344ab)) 142 | * chore(package): update postcss-focus to version 2.0.0 ([4bc89b1](https://github.com/Kikobeats/react-boilerplatinum/commit/4bc89b1)) 143 | * chore(package): update postcss-loader to version 2.0.1 ([93a3c35](https://github.com/Kikobeats/react-boilerplatinum/commit/93a3c35)) 144 | * chore(package): update postcss-scss to version 1.0.0 ([de4a0ce](https://github.com/Kikobeats/react-boilerplatinum/commit/de4a0ce)) 145 | * chore(package): update purifycss-webpack to version 0.7.0 ([8119fd5](https://github.com/Kikobeats/react-boilerplatinum/commit/8119fd5)) 146 | * chore(package): update style-loader to version 0.17.0 ([8062c79](https://github.com/Kikobeats/react-boilerplatinum/commit/8062c79)) 147 | * chore(package): update webpack to version 2.5.0 ([ef72684](https://github.com/Kikobeats/react-boilerplatinum/commit/ef72684)) 148 | * chore(package): update webpack-bundle-analyzer to version 2.6.0 ([b9f088a](https://github.com/Kikobeats/react-boilerplatinum/commit/b9f088a)) 149 | * chore(package): update webpack-bundle-analyzer to version 2.7.0 ([255e6e9](https://github.com/Kikobeats/react-boilerplatinum/commit/255e6e9)) 150 | * chore(package): update webpack-bundle-analyzer to version 2.8.1 ([d47b38c](https://github.com/Kikobeats/react-boilerplatinum/commit/d47b38c)) 151 | 152 | 153 | 154 | 155 | ## 1.2.2 (2017-04-15) 156 | 157 | * Fix typo ([3657c39](https://github.com/Kikobeats/react-boilerplatinum/commit/3657c39)) 158 | 159 | 160 | 161 | 162 | ## 1.2.1 (2017-04-15) 163 | 164 | * Enable postcss sourcemap ([3ebf1f2](https://github.com/Kikobeats/react-boilerplatinum/commit/3ebf1f2)) 165 | * Remove unnecessary files ([3dadd19](https://github.com/Kikobeats/react-boilerplatinum/commit/3dadd19)) 166 | * Upgrade node version ([8185798](https://github.com/Kikobeats/react-boilerplatinum/commit/8185798)) 167 | 168 | 169 | 170 | 171 | # 1.2.0 (2017-04-14) 172 | 173 | * Better reload and css bundle ([adb983e](https://github.com/Kikobeats/react-boilerplatinum/commit/adb983e)) 174 | * Update deps ([9797ca5](https://github.com/Kikobeats/react-boilerplatinum/commit/9797ca5)) 175 | * chore(package): update babel-plugin-transform-react-remove-prop-types to version 0.4.0 ([da9b14d](https://github.com/Kikobeats/react-boilerplatinum/commit/da9b14d)) 176 | * chore(package): update babel-preset-env to version 1.4.0 ([b1c325a](https://github.com/Kikobeats/react-boilerplatinum/commit/b1c325a)) 177 | * chore(package): update offline-plugin to version 4.7.0 ([4986c98](https://github.com/Kikobeats/react-boilerplatinum/commit/4986c98)) 178 | * chore(package): update purifycss-webpack to version 0.6.0 ([6ac5022](https://github.com/Kikobeats/react-boilerplatinum/commit/6ac5022)) 179 | * chore(package): update webpack to version 2.4.1 ([87dad63](https://github.com/Kikobeats/react-boilerplatinum/commit/87dad63)) 180 | * chore(package): update webpack-bundle-analyzer to version 2.4.0 ([5ebe030](https://github.com/Kikobeats/react-boilerplatinum/commit/5ebe030)) 181 | 182 | 183 | 184 | 185 | ## 1.1.2 (2017-04-08) 186 | 187 | * Sort plugins ([2e4573b](https://github.com/Kikobeats/react-boilerplatinum/commit/2e4573b)) 188 | * Update dependencies ([5a65874](https://github.com/Kikobeats/react-boilerplatinum/commit/5a65874)) 189 | * chore(package): update babel-preset-react to version 6.24.1 ([43f2bfc](https://github.com/Kikobeats/react-boilerplatinum/commit/43f2bfc)) 190 | 191 | 192 | 193 | 194 | ## 1.1.1 (2017-04-04) 195 | 196 | * Setup correctly purify prod css build ([db52cb8](https://github.com/Kikobeats/react-boilerplatinum/commit/db52cb8)) 197 | 198 | 199 | 200 | 201 | # 1.1.0 (2017-04-03) 202 | 203 | * Add preload and bundle analyzer plugins ([ccbcf9a](https://github.com/Kikobeats/react-boilerplatinum/commit/ccbcf9a)) 204 | * Enable cache mode ([3cb2453](https://github.com/Kikobeats/react-boilerplatinum/commit/3cb2453)) 205 | * Enable HMR correctly ([04829f0](https://github.com/Kikobeats/react-boilerplatinum/commit/04829f0)) 206 | * Update deps ([2196bd6](https://github.com/Kikobeats/react-boilerplatinum/commit/2196bd6)) 207 | * Update purify dep ([d8d3284](https://github.com/Kikobeats/react-boilerplatinum/commit/d8d3284)) 208 | 209 | 210 | 211 | 212 | ## 1.0.2 (2017-04-01) 213 | 214 | * Sort plugins ([b6b2334](https://github.com/Kikobeats/react-boilerplatinum/commit/b6b2334)) 215 | 216 | 217 | 218 | 219 | ## 1.0.1 (2017-04-01) 220 | 221 | * Don't register hot two times ([aeb11b2](https://github.com/Kikobeats/react-boilerplatinum/commit/aeb11b2)) 222 | * Update deps ([9bf2ca6](https://github.com/Kikobeats/react-boilerplatinum/commit/9bf2ca6)) 223 | * Update deps ([7b038e7](https://github.com/Kikobeats/react-boilerplatinum/commit/7b038e7)) 224 | * Update README.md ([5a81c5f](https://github.com/Kikobeats/react-boilerplatinum/commit/5a81c5f)) 225 | * chore(package): update babel-core to version 6.24.0 ([dd247cf](https://github.com/Kikobeats/react-boilerplatinum/commit/dd247cf)) 226 | * chore(package): update babel-loader to version 6.4.1 ([29a9b47](https://github.com/Kikobeats/react-boilerplatinum/commit/29a9b47)) 227 | * chore(package): update babel-preset-latest to version 6.24.0 ([2541aa0](https://github.com/Kikobeats/react-boilerplatinum/commit/2541aa0)) 228 | * chore(package): update css-loader to version 0.27.1 ([cce38cc](https://github.com/Kikobeats/react-boilerplatinum/commit/cce38cc)) 229 | * chore(package): update css-loader to version 0.28.0 ([64496d1](https://github.com/Kikobeats/react-boilerplatinum/commit/64496d1)) 230 | * chore(package): update file-loader to version 0.11.0 ([a6c08b8](https://github.com/Kikobeats/react-boilerplatinum/commit/a6c08b8)) 231 | * chore(package): update style-loader to version 0.14.0 ([dd150ae](https://github.com/Kikobeats/react-boilerplatinum/commit/dd150ae)) 232 | * chore(package): update style-loader to version 0.15.0 ([cf3b0d5](https://github.com/Kikobeats/react-boilerplatinum/commit/cf3b0d5)) 233 | * chore(package): update style-loader to version 0.16.0 ([119f226](https://github.com/Kikobeats/react-boilerplatinum/commit/119f226)) 234 | * chore(package): update webpack to version 2.3.1 ([bdca7ee](https://github.com/Kikobeats/react-boilerplatinum/commit/bdca7ee)) 235 | 236 | 237 | 238 | 239 | # 1.0.0 (2017-03-02) 240 | 241 | * Add webpack-dashboard ([9fb542d](https://github.com/Kikobeats/react-boilerplatinum/commit/9fb542d)) 242 | * Fix dependency reference ([ff980bf](https://github.com/Kikobeats/react-boilerplatinum/commit/ff980bf)) 243 | * Remove include ([5aa6f19](https://github.com/Kikobeats/react-boilerplatinum/commit/5aa6f19)) 244 | * Update docs ([d8bece4](https://github.com/Kikobeats/react-boilerplatinum/commit/d8bece4)) 245 | 246 | 247 | 248 | 249 | ## 0.8.5 (2017-02-15) 250 | 251 | * Avoid deprecated references ([6e5468a](https://github.com/Kikobeats/react-boilerplatinum/commit/6e5468a)) 252 | * chore(package): update babel-core to version 6.23.1 ([7a93716](https://github.com/Kikobeats/react-boilerplatinum/commit/7a93716)) 253 | * chore(package): update babel-loader to version 6.3.0 ([7926770](https://github.com/Kikobeats/react-boilerplatinum/commit/7926770)) 254 | * chore(package): update babel-plugin-transform-object-rest-spread to version 6.23.0 ([9dc659b](https://github.com/Kikobeats/react-boilerplatinum/commit/9dc659b)) 255 | * chore(package): update babel-plugin-transform-react-constant-elements to version 6.23.0 ([852f516](https://github.com/Kikobeats/react-boilerplatinum/commit/852f516)) 256 | * chore(package): update babel-plugin-transform-react-remove-prop-types to version 0.3.0 ([dc1ebcd](https://github.com/Kikobeats/react-boilerplatinum/commit/dc1ebcd)) 257 | * chore(package): update babel-preset-react to version 6.23.0 ([9b672a9](https://github.com/Kikobeats/react-boilerplatinum/commit/9b672a9)) 258 | * chore(package): update html-webpack-harddisk-plugin to version 0.1.0 ([0e4bfb5](https://github.com/Kikobeats/react-boilerplatinum/commit/0e4bfb5)) 259 | * chore(package): update postcss-loader to version 1.3.0 ([50ac4bb](https://github.com/Kikobeats/react-boilerplatinum/commit/50ac4bb)) 260 | * chore(package): update sass-loader to version 5.0.0 ([cfcdc43](https://github.com/Kikobeats/react-boilerplatinum/commit/cfcdc43)) 261 | * chore(package): update sass-loader to version 6.0.0 ([863caa2](https://github.com/Kikobeats/react-boilerplatinum/commit/863caa2)) 262 | 263 | 264 | 265 | 266 | ## 0.8.4 (2017-02-04) 267 | 268 | * Better overlay ([06bcb24](https://github.com/Kikobeats/react-boilerplatinum/commit/06bcb24)) 269 | * Refactor ([98f510e](https://github.com/Kikobeats/react-boilerplatinum/commit/98f510e)) 270 | * chore(package): update offline-plugin to version 4.6.0 ([7c72e02](https://github.com/Kikobeats/react-boilerplatinum/commit/7c72e02)) 271 | 272 | 273 | 274 | 275 | ## 0.8.3 (2017-02-02) 276 | 277 | * Add production build ([c519bc3](https://github.com/Kikobeats/react-boilerplatinum/commit/c519bc3)) 278 | * Little refactor ([c18394d](https://github.com/Kikobeats/react-boilerplatinum/commit/c18394d)) 279 | * Update dev config ([9c49d12](https://github.com/Kikobeats/react-boilerplatinum/commit/9c49d12)) 280 | * Upgrade deps ([483c04e](https://github.com/Kikobeats/react-boilerplatinum/commit/483c04e)) 281 | * chore(package): update autoprefixer to version 6.7.0 ([564ed3d](https://github.com/Kikobeats/react-boilerplatinum/commit/564ed3d)) 282 | * chore(package): update file-loader to version 0.10.0 ([91562ec](https://github.com/Kikobeats/react-boilerplatinum/commit/91562ec)) 283 | * chore(package): update html-webpack-plugin to version 2.28.0 ([15d238f](https://github.com/Kikobeats/react-boilerplatinum/commit/15d238f)) 284 | * chore(package): update node-sass to version 4.4.0 ([490160b](https://github.com/Kikobeats/react-boilerplatinum/commit/490160b)) 285 | * chore(package): update node-sass to version 4.5.0 ([829562d](https://github.com/Kikobeats/react-boilerplatinum/commit/829562d)) 286 | * chore(package): update webpack to version 2.2.1 ([83d21ec](https://github.com/Kikobeats/react-boilerplatinum/commit/83d21ec)) 287 | * chore(package): update webpack-dev-server to version 2.2.1 ([d52ec51](https://github.com/Kikobeats/react-boilerplatinum/commit/d52ec51)) 288 | 289 | 290 | 291 | 292 | ## 0.8.2 (2016-12-08) 293 | 294 | * Fix Purify setup ([737a6be](https://github.com/Kikobeats/react-boilerplatinum/commit/737a6be)) 295 | * Remove unnecessary dep ([35ea196](https://github.com/Kikobeats/react-boilerplatinum/commit/35ea196)) 296 | * Remove unnecessary dep ([248886d](https://github.com/Kikobeats/react-boilerplatinum/commit/248886d)) 297 | * Some English language mistakes corrected ([36d2e79](https://github.com/Kikobeats/react-boilerplatinum/commit/36d2e79)) 298 | * chore(package): update babel-core to version 6.18.0 ([2104470](https://github.com/Kikobeats/react-boilerplatinum/commit/2104470)) 299 | * chore(package): update css-loader to version 0.26.1 ([00a7f96](https://github.com/Kikobeats/react-boilerplatinum/commit/00a7f96)) 300 | * chore(package): update html-webpack-plugin to version 2.23.0 ([aa724b9](https://github.com/Kikobeats/react-boilerplatinum/commit/aa724b9)) 301 | * chore(package): update html-webpack-plugin to version 2.24.0 ([68e1836](https://github.com/Kikobeats/react-boilerplatinum/commit/68e1836)) 302 | * chore(package): update postcss-loader to version 1.0.0 ([627d532](https://github.com/Kikobeats/react-boilerplatinum/commit/627d532)) 303 | * chore(package): update postcss-loader to version 1.2.0 ([2be0fa3](https://github.com/Kikobeats/react-boilerplatinum/commit/2be0fa3)) 304 | * chore(package): update webpack to version 1.14.0 ([bc8d35f](https://github.com/Kikobeats/react-boilerplatinum/commit/bc8d35f)) 305 | 306 | 307 | 308 | 309 | ## 0.8.1 (2016-10-13) 310 | 311 | * Add custom template ([df75f45](https://github.com/Kikobeats/react-boilerplatinum/commit/df75f45)) 312 | * chore(package): update autoprefixer to version 6.5.1 ([8c628bc](https://github.com/Kikobeats/react-boilerplatinum/commit/8c628bc)) 313 | * chore(package): update browser-sync to version 2.17.3 ([a583a65](https://github.com/Kikobeats/react-boilerplatinum/commit/a583a65)) 314 | * chore(package): update html-webpack-template to version 5.4.1 ([f4e5b13](https://github.com/Kikobeats/react-boilerplatinum/commit/f4e5b13)) 315 | * chore(package): update standard to version 8.4.0 ([7fff40d](https://github.com/Kikobeats/react-boilerplatinum/commit/7fff40d)) 316 | * chore(package): update webpack-dev-server to version 1.16.2 ([280c482](https://github.com/Kikobeats/react-boilerplatinum/commit/280c482)) 317 | 318 | 319 | 320 | 321 | # 0.8.0 (2016-10-10) 322 | 323 | * Add badges ([d34e9cd](https://github.com/Kikobeats/react-boilerplatinum/commit/d34e9cd)) 324 | * Add correct deploy settings ([93b573d](https://github.com/Kikobeats/react-boilerplatinum/commit/93b573d)) 325 | * Add deploy settings ([f377539](https://github.com/Kikobeats/react-boilerplatinum/commit/f377539)) 326 | * Ignore build files ([5bade6c](https://github.com/Kikobeats/react-boilerplatinum/commit/5bade6c)) 327 | * Remove unused CSS ([d2484f7](https://github.com/Kikobeats/react-boilerplatinum/commit/d2484f7)) 328 | 329 | 330 | 331 | 332 | ## 0.7.1 (2016-09-27) 333 | 334 | * Little main scaffold refactor ([e4d59ab](https://github.com/Kikobeats/react-boilerplatinum/commit/e4d59ab)) 335 | 336 | 337 | 338 | 339 | # 0.7.0 (2016-09-26) 340 | 341 | * Add transform-react-remove-prop-types prod setting ([87995a5](https://github.com/Kikobeats/react-boilerplatinum/commit/87995a5)) 342 | 343 | 344 | 345 | 346 | # 0.6.0 (2016-09-26) 347 | 348 | * Add postcss-focus ([e57cca5](https://github.com/Kikobeats/react-boilerplatinum/commit/e57cca5)) 349 | 350 | 351 | 352 | 353 | # 0.5.0 (2016-09-26) 354 | 355 | * Add file loaders ([94221be](https://github.com/Kikobeats/react-boilerplatinum/commit/94221be)) 356 | * Disable inject assets ([77cbe19](https://github.com/Kikobeats/react-boilerplatinum/commit/77cbe19)) 357 | * Remove prod files ([07cd40f](https://github.com/Kikobeats/react-boilerplatinum/commit/07cd40f)) 358 | * Remove sass in favour of postcss ([1a0671e](https://github.com/Kikobeats/react-boilerplatinum/commit/1a0671e)) 359 | * Update docs ([7170199](https://github.com/Kikobeats/react-boilerplatinum/commit/7170199)) 360 | * Update docs ([aff71df](https://github.com/Kikobeats/react-boilerplatinum/commit/aff71df)) 361 | * Update prod loader ([2de174a](https://github.com/Kikobeats/react-boilerplatinum/commit/2de174a)) 362 | * WIP ([5b0f396](https://github.com/Kikobeats/react-boilerplatinum/commit/5b0f396)) 363 | 364 | 365 | 366 | 367 | # 0.4.0 (2016-09-26) 368 | 369 | * Little refactor, more readable ([27024f2](https://github.com/Kikobeats/react-boilerplatinum/commit/27024f2)) 370 | * Update dep reference ([6a27e4f](https://github.com/Kikobeats/react-boilerplatinum/commit/6a27e4f)) 371 | 372 | 373 | 374 | 375 | ## 0.3.5 (2016-09-26) 376 | 377 | * Better server ([0370888](https://github.com/Kikobeats/react-boilerplatinum/commit/0370888)) 378 | * Setup node version ([96c6b54](https://github.com/Kikobeats/react-boilerplatinum/commit/96c6b54)) 379 | 380 | 381 | 382 | 383 | ## 0.3.4 (2016-09-25) 384 | 385 | * Add missin dep ([6d6dadc](https://github.com/Kikobeats/react-boilerplatinum/commit/6d6dadc)) 386 | * Update docs ([e1b8684](https://github.com/Kikobeats/react-boilerplatinum/commit/e1b8684)) 387 | 388 | 389 | 390 | 391 | ## 0.3.3 (2016-09-24) 392 | 393 | * Fix deps ([d55d727](https://github.com/Kikobeats/react-boilerplatinum/commit/d55d727)) 394 | * Release 0.3.2 ([e8f8c8c](https://github.com/Kikobeats/react-boilerplatinum/commit/e8f8c8c)) 395 | * Use default components ([b57f478](https://github.com/Kikobeats/react-boilerplatinum/commit/b57f478)) 396 | 397 | 398 | 399 | 400 | ## 0.3.2 (2016-09-24) 401 | 402 | * Fix deps ([d55d727](https://github.com/Kikobeats/react-boilerplatinum/commit/d55d727)) 403 | * Use default components ([b57f478](https://github.com/Kikobeats/react-boilerplatinum/commit/b57f478)) 404 | 405 | 406 | 407 | 408 | ## 0.3.1 (2016-09-24) 409 | 410 | * Add html minification rules ([8a893f1](https://github.com/Kikobeats/react-boilerplatinum/commit/8a893f1)) 411 | * Add plugin ([3328d44](https://github.com/Kikobeats/react-boilerplatinum/commit/3328d44)) 412 | * Basic scaffold ([b1549de](https://github.com/Kikobeats/react-boilerplatinum/commit/b1549de)) 413 | * Load styles ([f0de70a](https://github.com/Kikobeats/react-boilerplatinum/commit/f0de70a)) 414 | * Update presets ([36f9ee0](https://github.com/Kikobeats/react-boilerplatinum/commit/36f9ee0)) 415 | 416 | 417 | 418 | 419 | # 0.3.0 (2016-09-17) 420 | 421 | * Auto-generate main html ([a82ffee](https://github.com/Kikobeats/react-boilerplatinum/commit/a82ffee)) 422 | * Fix publicPath on local ([11c1d3a](https://github.com/Kikobeats/react-boilerplatinum/commit/11c1d3a)) 423 | * HMR for CSS ([4b7d818](https://github.com/Kikobeats/react-boilerplatinum/commit/4b7d818)) 424 | * Little refactor ([418d0c9](https://github.com/Kikobeats/react-boilerplatinum/commit/418d0c9)) 425 | * Update docs ([ec1ba93](https://github.com/Kikobeats/react-boilerplatinum/commit/ec1ba93)) 426 | * Update prod config ([7f6df46](https://github.com/Kikobeats/react-boilerplatinum/commit/7f6df46)) 427 | * Update scripts ([f5bd670](https://github.com/Kikobeats/react-boilerplatinum/commit/f5bd670)) 428 | * WIP ([a97ec7b](https://github.com/Kikobeats/react-boilerplatinum/commit/a97ec7b)) 429 | * WIP ([e6cff37](https://github.com/Kikobeats/react-boilerplatinum/commit/e6cff37)) 430 | * WIP ([b87d5b0](https://github.com/Kikobeats/react-boilerplatinum/commit/b87d5b0)) 431 | 432 | 433 | 434 | 435 | # 0.2.0 (2016-09-14) 436 | 437 | * Ability to load styles ([9792f04](https://github.com/Kikobeats/react-boilerplatinum/commit/9792f04)) 438 | * Add missing dep ([2361d24](https://github.com/Kikobeats/react-boilerplatinum/commit/2361d24)) 439 | * Add shorthand loader ([8d2f9e4](https://github.com/Kikobeats/react-boilerplatinum/commit/8d2f9e4)) 440 | * Disable local minification ([4a64359](https://github.com/Kikobeats/react-boilerplatinum/commit/4a64359)) 441 | * Fix badges ([71830e3](https://github.com/Kikobeats/react-boilerplatinum/commit/71830e3)) 442 | * Isolate components scaffold ([ea97831](https://github.com/Kikobeats/react-boilerplatinum/commit/ea97831)) 443 | * Update docs ([6320364](https://github.com/Kikobeats/react-boilerplatinum/commit/6320364)) 444 | * Update react deps ([c4c9dab](https://github.com/Kikobeats/react-boilerplatinum/commit/c4c9dab)) 445 | 446 | 447 | 448 | 449 | # 0.1.0 (2016-09-14) 450 | 451 | * first commit ([2e3a3b5](https://github.com/Kikobeats/react-boilerplatinum/commit/2e3a3b5)) 452 | * Fix content base path ([e4cbe91](https://github.com/Kikobeats/react-boilerplatinum/commit/e4cbe91)) 453 | * New folder scaffold ([fdb5aa8](https://github.com/Kikobeats/react-boilerplatinum/commit/fdb5aa8)) 454 | * Remove all comments ([a22fe61](https://github.com/Kikobeats/react-boilerplatinum/commit/a22fe61)) 455 | * Unify index across env ([6f9baa8](https://github.com/Kikobeats/react-boilerplatinum/commit/6f9baa8)) 456 | * Update docs ([7117e06](https://github.com/Kikobeats/react-boilerplatinum/commit/7117e06)) 457 | * Update prod build ([83d103c](https://github.com/Kikobeats/react-boilerplatinum/commit/83d103c)) 458 | 459 | 460 | 461 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright © 2016 Kiko Beats (https://github.com/Kikobeats) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | 7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | 9 | THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 10 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # react-boilerplatinum 2 | 3 | ![Last version](https://img.shields.io/github/tag/Kikobeats/react-boilerplatinum.svg?style=flat-square) 4 | [![Build Status](http://img.shields.io/travis/Kikobeats/react-boilerplatinum/master.svg?style=flat-square)](https://travis-ci.org/Kikobeats/react-boilerplatinum) 5 | [![Dependency status](http://img.shields.io/david/Kikobeats/react-boilerplatinum.svg?style=flat-square)](https://david-dm.org/Kikobeats/react-boilerplatinum) 6 | [![Dev Dependencies Status](http://img.shields.io/david/dev/Kikobeats/react-boilerplatinum.svg?style=flat-square)](https://david-dm.org/Kikobeats/react-boilerplatinum#info=devDependencies) 7 | [![Donate](https://img.shields.io/badge/donate-paypal-blue.svg?style=flat-square)](https://paypal.me/kikobeats) 8 | > A React scaffold focused in developer experience. 9 | 10 | ![](https://d3uepj124s5rcx.cloudfront.net/items/183w3E0R082W2r0a0822/Screen%20Recording%202017-03-02%20at%2008.52%20pm.gif?v=36a77851) 11 | 12 | The premise of this React scaffolding is provide the best development experience but also with the best production tips. 13 | 14 | About **development**: 15 | 16 | - Real time coding feedback with DevTools errors overlay. 17 | - Device synchronization for mobile testing using [BrowserSync](https://www.browsersync.io). 18 | - JavaScript transpiling by [Babel](https://babeljs.io) and latest preset by default. 19 | - Stylesheets transpiling by [PostCSS](http://postcss.org). 20 | 21 | About **production**: 22 | 23 | - JS, CSS & HTML minification. 24 | - Offline Support using ServiceWorkers. 25 | - Remove unused CSS and autoprefix vendors. 26 | - Final bundle split into `vendor` and `main`. 27 | 28 | 29 | It's inspired by [react-hot-boilerplate](https://github.com/gaearon/react-hot-boilerplate). 30 | 31 | ## License 32 | 33 | MIT © [Kiko Beats](https://github.com/kikobeats). 34 | -------------------------------------------------------------------------------- /bin/server.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const WebpackDevServer = require('webpack-dev-server') 4 | const config = require('../webpack.dev.config') 5 | const webpack = require('webpack') 6 | 7 | const compiler = webpack(config) 8 | 9 | const server = new WebpackDevServer(compiler, { 10 | publicPath: config.output.publicPath, 11 | hot: true, 12 | historyApiFallback: true, 13 | overlay: true, 14 | contentBase: 'src/www' 15 | }) 16 | 17 | server.listen(3000, 'localhost', function (err) { 18 | if (err) throw err 19 | }) 20 | -------------------------------------------------------------------------------- /config.json: -------------------------------------------------------------------------------- 1 | { 2 | "appMountId": "app", 3 | "title": "react-boilerplatinum", 4 | "baseHref": "https://kikobeats.github.io/react-boilerplatinum", 5 | "description": "Boilerplate for ReactJS project with hot code reloading", 6 | "googleAnalytics": "" 7 | } 8 | -------------------------------------------------------------------------------- /index.ejs: -------------------------------------------------------------------------------- 1 | <% var item, key %> 2 | <% var isProduction = process.env.NODE_ENV === 'production' %> 3 | 4 | <% htmlWebpackPlugin.options.appMountIds = htmlWebpackPlugin.options.appMountIds || [] %> 5 | <% htmlWebpackPlugin.options.links = htmlWebpackPlugin.options.links || [] %> 6 | <% htmlWebpackPlugin.options.meta = htmlWebpackPlugin.options.meta || {} %> 7 | <% htmlWebpackPlugin.options.scripts = htmlWebpackPlugin.options.scripts || [] %> 8 | 9 | 10 | 11 | 12 | 13 | 14 | manifest="<%= htmlWebpackPlugin.files.manifest %>"<% } %>> 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | <%= htmlWebpackPlugin.options.title %> 33 | 34 | 35 | <% for (item of htmlWebpackPlugin.options.links) { %> 36 | <% if (typeof item === 'string' || item instanceof String) { item = { href: item, rel: 'stylesheet' } } %> 37 | <%= key %>="<%= item[key] %>"<% } %>> 38 | <% } %> 39 | 40 | <% for (key in htmlWebpackPlugin.files.css) { %> 41 | 42 | <% } %> 43 | 44 | 45 | <% if (htmlWebpackPlugin.options.unsupportedBrowser) { %> 46 | 47 |
48 | Sorry, your browser is not supported. Please upgrade to the latest version or switch your browser to use this 49 | site. See outdatedbrowser.com for options. 50 |
51 | <% } %> 52 | <% if (htmlWebpackPlugin.options.appMountId) { htmlWebpackPlugin.options.appMountIds.unshift(htmlWebpackPlugin.options.appMountId) } %> 53 | <% for (item of htmlWebpackPlugin.options.appMountIds) { %> 54 |
55 | <% } %> 56 | <% if (htmlWebpackPlugin.options.window) { %> 57 | 62 | <% } %> 63 | <% for (item of htmlWebpackPlugin.options.scripts) { %> 64 | <% if (typeof item === 'string' || item instanceof String) { item = { src: item, type: 'text/javascript' } } %> 65 | <%= key %>="<%= item[key] %>"<% } %>> 66 | <% } %> 67 | <% for (key in htmlWebpackPlugin.files.chunks) { %> 68 | 69 | <% } %> 70 | <% if (htmlWebpackPlugin.options.devServer) { %> 71 | 72 | <% } %> 73 | <% if (isProduction && htmlWebpackPlugin.options.googleAnalytics) { %> 74 | 83 | <% } %> 84 | 85 | 86 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "react-boilerplatinum", 3 | "description": "Boilerplate for ReactJS project with hot code reloading", 4 | "homepage": "https://github.com/Kikobeats/react-boilerplatinum", 5 | "version": "1.6.1", 6 | "author": { 7 | "email": "josefrancisco.verdu@gmail.com", 8 | "name": "Kiko Beats", 9 | "url": "https://github.com/Kikobeats" 10 | }, 11 | "repository": { 12 | "type": "git", 13 | "url": "git+https://github.com/Kikobeats/react-boilerplatinum.git" 14 | }, 15 | "bugs": { 16 | "url": "https://github.com/Kikobeats/react-boilerplatinum/issues" 17 | }, 18 | "keywords": [ 19 | "boilerplate", 20 | "edit", 21 | "hmr", 22 | "hot", 23 | "live", 24 | "react", 25 | "reactjs", 26 | "reload", 27 | "webpack" 28 | ], 29 | "dependencies": { 30 | "autoprefixer": "latest", 31 | "babel-core": "latest", 32 | "babel-loader": "latest", 33 | "babel-preset-env": "latest", 34 | "babel-preset-react": "latest", 35 | "compression-webpack-plugin": "latest", 36 | "css-loader": "latest", 37 | "extract-text-webpack-plugin": "latest", 38 | "glob": "latest", 39 | "html-webpack-harddisk-plugin": "latest", 40 | "html-webpack-plugin": "latest", 41 | "node-sass": "latest", 42 | "offline-plugin": "latest", 43 | "optimize-css-assets-webpack-plugin": "latest", 44 | "postcss-focus": "latest", 45 | "postcss-loader": "latest", 46 | "postcss-scss": "latest", 47 | "preload-webpack-plugin": "latest", 48 | "purify-css": "latest", 49 | "purifycss-webpack": "latest", 50 | "react": "latest", 51 | "react-dom": "latest", 52 | "react-hot-loader": "latest", 53 | "sass-loader": "latest", 54 | "style-loader": "latest", 55 | "tachyons-sass": "latest", 56 | "travis-after-all": "latest", 57 | "webpack": "latest", 58 | "webpack-bundle-analyzer": "latest", 59 | "webpack-common-shake": "latest" 60 | }, 61 | "devDependencies": { 62 | "babel-eslint": "latest", 63 | "babel-plugin-transform-class-properties": "latest", 64 | "babel-plugin-transform-object-rest-spread": "latest", 65 | "babel-plugin-transform-react-constant-elements": "latest", 66 | "babel-plugin-transform-react-inline-elements": "latest", 67 | "babel-plugin-transform-react-pure-class-to-function": "latest", 68 | "babel-plugin-transform-react-remove-prop-types": "latest", 69 | "browser-sync": "latest", 70 | "browser-sync-webpack-plugin": "latest", 71 | "eslint-plugin-jsx-a11y": "latest", 72 | "standard": "latest", 73 | "webpack-dashboard": "latest", 74 | "webpack-dev-server": "latest" 75 | }, 76 | "engines": { 77 | "node": ">= 8" 78 | }, 79 | "scripts": { 80 | "build": "NODE_ENV=production webpack --progress --debug --config webpack.config.js", 81 | "dev": "webpack-dashboard -m -- node bin/server", 82 | "lint": "standard", 83 | "test": "echo 'not yet implemented, wanna help?'" 84 | }, 85 | "license": "MIT", 86 | "standard": { 87 | "globals": [ 88 | "React" 89 | ], 90 | "parser": "babel-eslint", 91 | "plugins": [ 92 | "jsx-a11y" 93 | ] 94 | } 95 | } 96 | -------------------------------------------------------------------------------- /postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: [ 3 | require('postcss-focus'), 4 | require('autoprefixer') 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /src/app/App/index.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react' 2 | 3 | import Layout from '../Layout' 4 | import Counter from '../Counter' 5 | 6 | // If you use React Router, make this component 7 | // render with your routes. Currently, 8 | // only synchronous routes are hot reloaded, and 9 | // you will see a warning from on every reload. 10 | // You can ignore this warning. For details, see: 11 | // https://github.com/reactjs/react-router/issues/2182 12 | 13 | export default class App extends Component { 14 | render () { 15 | return ( 16 | 17 | 18 | 19 | ) 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/app/Counter/index.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react' 2 | 3 | export default class Counter extends Component { 4 | constructor (props) { 5 | super(props) 6 | this.state = { counter: 0 } 7 | } 8 | 9 | componentDidMount () { 10 | this.interval = setInterval(this.tick.bind(this), 1000) 11 | } 12 | 13 | tick () { 14 | this.setState({ 15 | counter: this.state.counter + 1 16 | }) 17 | } 18 | 19 | componentWillUnmount () { 20 | clearInterval(this.interval) 21 | } 22 | 23 | render () { 24 | return ( 25 |

Counter: {this.state.counter}

26 | ) 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/app/Layout/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | export default function Layout ({ children }) { 4 | return ( 5 |
6 |
7 |

Hello, world!

8 | {children} 9 |
10 |
11 | ) 12 | } 13 | -------------------------------------------------------------------------------- /src/app/index.js: -------------------------------------------------------------------------------- 1 | import { AppContainer } from 'react-hot-loader' 2 | import ReactDOM from 'react-dom' 3 | import React from 'react' 4 | import App from './App' 5 | 6 | import './index.scss' 7 | 8 | const el = document.getElementById('app') 9 | 10 | const render = component => ReactDOM.render( 11 | 12 | 13 | , 14 | el 15 | ) 16 | render(App) 17 | 18 | if (module.hot) module.hot.accept('./App', () => render(App)) 19 | 20 | if (process.env.NODE_ENV === 'production') { 21 | require('offline-plugin/runtime').install() 22 | } 23 | -------------------------------------------------------------------------------- /src/app/index.scss: -------------------------------------------------------------------------------- 1 | @import '~tachyons-sass/tachyons'; 2 | -------------------------------------------------------------------------------- /src/www/appcache/manifest.appcache: -------------------------------------------------------------------------------- 1 | CACHE MANIFEST 2 | #ver:2017-7-29 18:54:01 3 | #plugin:4.8.3 4 | 5 | CACHE: 6 | ../ 7 | ../assets/js/bundle.js 8 | ../assets/js/bundle.js.gz 9 | 10 | NETWORK: 11 | * 12 | 13 | FALLBACK: 14 | / / -------------------------------------------------------------------------------- /src/www/appcache/manifest.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/www/sw.js: -------------------------------------------------------------------------------- 1 | var __wpo = {"assets":{"main":["./","./assets/js/bundle.js","./assets/js/bundle.js.gz"],"additional":["./assets/js/vendor.bundle.js","./assets/css/bundle.css"],"optional":["https://static.hotjar.com/c/hotjar-342795.js?sv=5","https://www.google-analytics.com/analytics.js","https://cdn.headwayapp.co/widget.js"]},"externals":["https://static.hotjar.com/c/hotjar-342795.js?sv=5","https://www.google-analytics.com/analytics.js","https://cdn.headwayapp.co/widget.js"],"hashesMap":{"3908b2decc70a06f8c5034132ef93a6a21b32235":"./assets/js/bundle.js","109e8e4ccf6244f0f1c23e74b77218070b662f75":"./assets/js/vendor.bundle.js","d3d8a0e328118db7dd326805dcea31227eab382a":"./assets/css/bundle.css","cd448a15c0b287dfd54b23a399a0f85030c84dc4":"./assets/js/bundle.js.gz"},"strategy":"changed","responseStrategy":"cache-first","version":"2017-7-29 18:54:01","name":"webpack-offline","pluginVersion":"4.8.3","relativePaths":true}; 2 | 3 | !function(e){function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}var t={};n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},n.p="",n(n.s="rEv2")}({"/oeJ":function(e,n){},rEv2:function(e,n,t){"use strict";function r(e,n){return caches.match(e,{cacheName:n}).then(function(t){return a()?t:c(t).then(function(t){return caches.open(n).then(function(n){return n.put(e,t)}).then(function(){return t})})}).catch(function(){})}function o(e,n){return e+(-1!==e.indexOf("?")?"&":"?")+"__uncache="+encodeURIComponent(n)}function i(e){return"navigate"===e.mode||e.headers.get("Upgrade-Insecure-Requests")||-1!==(e.headers.get("Accept")||"").indexOf("text/html")}function a(e){return!e||!e.redirected||!e.ok||"opaqueredirect"===e.type}function c(e){return a(e)?Promise.resolve(e):("body"in e?Promise.resolve(e.body):e.blob()).then(function(n){return new Response(n,{headers:e.headers,status:e.status})})}function s(e){return Object.keys(e).reduce(function(n,t){return n[t]=e[t],n},{})}function u(e,n){console.groupCollapsed("[SW]:",e),n.forEach(function(e){console.log("Asset:",e)}),console.groupEnd()}if(function(){var e=ExtendableEvent.prototype.waitUntil,n=FetchEvent.prototype.respondWith,t=new WeakMap;ExtendableEvent.prototype.waitUntil=function(n){var r=this,o=t.get(r);return o?void o.push(Promise.resolve(n)):(o=[Promise.resolve(n)],t.set(r,o),e.call(r,Promise.resolve().then(function e(){var n=o.length;return Promise.all(o.map(function(e){return e.catch(function(){})})).then(function(){return o.length!=n?e():(t.delete(r),Promise.all(o))})})))},FetchEvent.prototype.respondWith=function(e){return this.waitUntil(e),n.call(this,e)}}(),void 0===f)var f=!1;!function(e,n){function t(){if(!R.additional.length)return Promise.resolve();f&&console.log("[SW]:","Caching additional");var e=void 0;return e="changed"===b?l("additional"):a("additional"),e.catch(function(e){console.error("[SW]:","Cache section `additional` failed to load")})}function a(n){var t=R[n];return caches.open(q).then(function(n){return w(n,t,{bust:e.version,request:e.prefetchRequest})}).then(function(){u("Cached assets: "+n,t)}).catch(function(e){throw console.error(e),e})}function l(n){return d().then(function(t){if(!t)return a(n);var r=t[0],o=t[1],i=t[2],c=i.hashmap,s=i.version;if(!i.hashmap||s===e.version)return a(n);var f=Object.keys(c).map(function(e){return c[e]}),l=o.map(function(e){var n=new URL(e.url);return n.search="",n.hash="",n.toString()}),h=R[n],d=[],p=h.filter(function(e){return-1===l.indexOf(e)||-1===f.indexOf(e)});Object.keys(W).forEach(function(e){var n=W[e];if(-1!==h.indexOf(n)&&-1===p.indexOf(n)&&-1===d.indexOf(n)){var t=c[e];t&&-1!==l.indexOf(t)?d.push([t,n]):p.push(n)}}),u("Changed assets: "+n,p),u("Moved assets: "+n,d);var v=Promise.all(d.map(function(e){return r.match(e[0]).then(function(n){return[e[1],n]})}));return caches.open(q).then(function(n){var t=v.then(function(e){return Promise.all(e.map(function(e){return n.put(e[0],e[1])}))});return Promise.all([t,w(n,p,{bust:e.version,request:e.prefetchRequest})])})})}function h(){return caches.keys().then(function(e){var n=e.map(function(e){if(0===e.indexOf(P)&&0!==e.indexOf(q))return console.log("[SW]:","Delete cache:",e),caches.delete(e)});return Promise.all(n)})}function d(){return caches.keys().then(function(e){for(var n=e.length,t=void 0;n--&&(t=e[n],0!==t.indexOf(P)););if(t){var r=void 0;return caches.open(t).then(function(e){return r=e,e.match(new URL(j,location).toString())}).then(function(e){if(e)return Promise.all([r,r.keys(),e.json()])})}})}function p(){return caches.open(q).then(function(n){var t=new Response(JSON.stringify({version:e.version,hashmap:W}));return n.put(new URL(j,location).toString(),t)})}function v(e,n,t){return r(t,q).then(function(r){return r?(f&&console.log("[SW]:","URL ["+t+"]("+n+") from cache"),r):fetch(e.request).then(function(r){return r.ok?(f&&console.log("[SW]:","URL ["+n+"] from network"),t===n&&function(){var t=r.clone(),o=caches.open(q).then(function(e){return e.put(n,t)}).then(function(){console.log("[SW]:","Cache asset: "+n)});e.waitUntil(o)}(),r):(f&&console.log("[SW]:","URL ["+n+"] wrong response: ["+r.status+"] "+r.type),r)})})}function g(e,n,t){return fetch(e.request).then(function(e){if(e.ok)return f&&console.log("[SW]:","URL ["+n+"] from network"),e;throw new Error("Response is not ok")}).catch(function(){return f&&console.log("[SW]:","URL ["+n+"] from cache if possible"),r(t,q)})}function m(e){return e.catch(function(){}).then(function(e){var n=e&&e.ok,t=e&&"opaqueredirect"===e.type;return n||t&&!F?e:(f&&console.log("[SW]:","Loading navigation fallback ["+C+"] from cache"),r(C,q))})}function w(e,n,t){var r=!1!==t.allowLoaders,i=t&&t.bust,a=t.request||{credentials:"omit",mode:"cors"};return Promise.all(n.map(function(e){return i&&(e=o(e,i)),fetch(e,a).then(c)})).then(function(o){if(o.some(function(e){return!e.ok}))return Promise.reject(new Error("Wrong response status"));var i=[],a=o.map(function(t,o){return r&&i.push(y(n[o],t)),e.put(n[o],t)});return i.length?function(){var r=s(t);r.allowLoaders=!1;var o=a;a=Promise.all(i).then(function(t){var i=[].concat.apply([],t);return n.length&&(o=o.concat(w(e,i,r))),Promise.all(o)})}():a=Promise.all(a),a})}function y(e,n){var t=Object.keys(U).map(function(t){if(-1!==U[t].indexOf(e)&&O[t])return O[t](n.clone())}).filter(function(e){return!!e});return Promise.all(t).then(function(e){return[].concat.apply([],e)})}function x(e){var n=e.url,t=new URL(n),r=void 0;r="navigate"===e.mode?"navigate":t.origin===location.origin?"same-origin":"cross-origin";for(var o=0;o file.replace('src/www/', '')) 147 | ) 148 | }), 149 | new HtmlWebpackPlugin(Object.assign({}, config, { 150 | template: path.resolve('index.ejs'), 151 | alwaysWriteToDisk: true, 152 | inject: false, 153 | hash: true, 154 | minify: { 155 | collapseWhitespace: true, 156 | decodeEntities: true, 157 | html5: true, 158 | processConditionalComments: true, 159 | removeAttributeQuotes: true, 160 | removeComments: true, 161 | removeEmptyAttributes: true, 162 | removeOptionalTags: true, 163 | removeRedundantAttributes: true, 164 | removeScriptTypeAttributes: true, 165 | removeStyleLinkTypeAttributes: true, 166 | removeTagWhitespace: true, 167 | sortAttributes: true, 168 | sortClassName: true, 169 | useShortDoctype: true, 170 | keepClosingSlash: true, 171 | minifyJS: true, 172 | minifyCSS: true, 173 | minifyURLs: true 174 | } 175 | })), 176 | new PreloadWebpackPlugin(), 177 | new HtmlWebpackHarddiskPlugin(), 178 | new BundleAnalyzerPlugin({ 179 | analyzerMode: 'static', 180 | openAnalyzer: false, 181 | generateStatsFile: true, 182 | logLevel: 'error' 183 | }) 184 | ] 185 | } 186 | -------------------------------------------------------------------------------- /webpack.dev.config.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const HtmlWebpackHarddiskPlugin = require('html-webpack-harddisk-plugin') 4 | const BrowserSyncPlugin = require('browser-sync-webpack-plugin') 5 | const DashboardPlugin = require('webpack-dashboard/plugin') 6 | const HtmlWebpackPlugin = require('html-webpack-plugin') 7 | const webpack = require('webpack') 8 | const path = require('path') 9 | 10 | const pkg = require('./package.json') 11 | const config = require('./config.json') 12 | const {HotModuleReplacementPlugin, NamedModulesPlugin} = webpack 13 | 14 | module.exports = { 15 | performance: { 16 | hints: false 17 | }, 18 | devtool: 'eval', 19 | cache: true, 20 | entry: [ 21 | // activate HMR for React 22 | 'react-hot-loader/patch', 23 | // bundle the client for webpack-dev-server 24 | // and connect to the provided endpoint 25 | 'webpack-dev-server/client?http://0.0.0.0:3000', 26 | // bundle the client for hot reloading 27 | // only- means to only hot reload for successful updates 28 | 'webpack/hot/only-dev-server', 29 | // the entry point of our app 30 | './src/app/index.js' 31 | ], 32 | output: { 33 | path: path.resolve('src/www'), 34 | filename: 'assets/js/bundle.js' 35 | }, 36 | resolve: { 37 | extensions: ['.scss', '.css', '.js', '.json'], 38 | modules: ['node_modules'] 39 | }, 40 | module: { 41 | rules: [{ 42 | test: /(\.js|\.jsx)$/, 43 | exclude: /node_modules/, 44 | use: ['babel-loader?cacheDirectory'] 45 | }, { 46 | test: /(\.scss|\.css)$/, 47 | use: [{ 48 | loader: 'style-loader' 49 | }, { 50 | loader: 'css-loader', 51 | options: { 52 | importLoaders: 2 53 | } 54 | }, { 55 | loader: 'postcss-loader', 56 | options: { 57 | parser: 'postcss-scss' 58 | } 59 | }, { 60 | loader: 'sass-loader', 61 | options: { 62 | data: '@import "index.scss";', 63 | includePaths: [ 64 | path.resolve('src/app') 65 | ] 66 | } 67 | }] 68 | }] 69 | }, 70 | plugins: [ 71 | new HotModuleReplacementPlugin(), 72 | new DashboardPlugin(), 73 | new NamedModulesPlugin(), 74 | new webpack.DefinePlugin({ 75 | 'process.env.NODE_ENV': JSON.stringify('development'), 76 | 'APP_VERSION': JSON.stringify(pkg.version) 77 | }), 78 | new HtmlWebpackPlugin(Object.assign({}, config, { 79 | template: path.resolve('index.ejs'), 80 | alwaysWriteToDisk: true, 81 | inject: false 82 | })), 83 | new HtmlWebpackHarddiskPlugin(), 84 | new BrowserSyncPlugin( 85 | // BrowserSync options 86 | { 87 | // browse to http://localhost:3000/ during development 88 | host: 'localhost', 89 | port: 3001, 90 | // proxy the Webpack Dev Server endpoint 91 | // (which should be serving on http://localhost:3100/) 92 | // through BrowserSync 93 | proxy: 'http://localhost:3000', 94 | open: false 95 | }, 96 | // plugin options 97 | { 98 | // prevent BrowserSync from reloading the page 99 | // and let Webpack Dev Server take care of this 100 | reload: false 101 | } 102 | ) 103 | ] 104 | } 105 | --------------------------------------------------------------------------------