├── .eslintrc
├── .gitignore
├── .travis.yml
├── LICENSE
├── README.md
├── app
├── __tests__
│ └── test_helper.js
├── components
│ ├── App.jsx
│ ├── Hello.jsx
│ ├── __tests__
│ │ ├── App_test.js
│ │ └── Hello_test.js
│ ├── app.css
│ ├── hello.css
│ └── shared
│ │ ├── backgrounds.css
│ │ ├── borders.css
│ │ ├── button.css
│ │ ├── layout.css
│ │ └── typography.css
├── index.css
├── index.jsx
└── routes.jsx
├── conf
└── tmpl.html
├── package.json
└── webpack.config.js
/.eslintrc:
--------------------------------------------------------------------------------
1 | {
2 | "parser": "babel-eslint",
3 | "plugins": [
4 | "react"
5 | ],
6 | "env": {
7 | "browser": true,
8 | "node": true
9 | },
10 | "rules": {
11 | "quotes": [2, "single"],
12 | "eol-last": [0],
13 | "semi": [2, "never"],
14 | "no-mixed-requires": [0],
15 | "no-underscore-dangle": [0]
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules/
2 | dist/
3 | static/
4 | npm-debug.log
5 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | language: node_js
2 | node_js:
3 | - "5.1.0"
4 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2015 Chris Keathley
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Webpack & React - Skeleton
2 |
3 |
4 |
5 | This is just the basic skeleton that I use to create a new react apps. I've included all of the things that I like:
6 |
7 | * React
8 | * Webpack
9 | * PostCSS
10 | * CSS Modules
11 | * React-Router
12 | * Babel support
13 | * Hot reloading and push state
14 | * ESLint
15 | * Mocha + Chai + Enzyme
16 |
17 | and more!
18 |
19 | ## Getting started
20 |
21 | To get started you just need to run the following:
22 |
23 | $ npm install
24 | $ webpack
25 | $ npm start
26 |
27 | Running `npm start` will start webpack and the webpack hot reload server.
28 |
29 | ## Production Builds
30 |
31 | If you want to deploy your assets then run this:
32 |
33 | $ npm run deploy
34 |
35 | You'll now have a minified and hashed version of all of your assets. By default vendor files and css are split out of the main bundle and cached separately. If you add more vendor files and want them to be split out then make sure you add them to the vendor entrypoint.
36 |
37 | ## Contributing
38 |
39 | If you have something that you think goes in here then feel free to open an issue, PR, or message me directly at @ChrisKeathley.
40 |
--------------------------------------------------------------------------------
/app/__tests__/test_helper.js:
--------------------------------------------------------------------------------
1 | import chai from 'chai'
2 | import chaiImmutable from 'chai-immutable'
3 | import 'css-modules-require-hook/preset'
4 |
5 | chai.use(chaiImmutable)
6 |
--------------------------------------------------------------------------------
/app/components/App.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 |
3 | import { app } from './app.css'
4 | import { mastHead } from './shared/typography'
5 |
6 | const App = React.createClass({
7 | render() {
8 | return (
9 |
10 |
16 | Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
17 | eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim
18 | ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut
19 | aliquip ex ea commodo consequat. Duis aute irure dolor in
20 | reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
21 | pariatur. Excepteur sint occaecat cupidatat non proident, sunt in
22 | culpa qui officia deserunt mollit anim id est laborum.
23 |