You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[](https://gitter.im/davezuko/react-redux-starter-kit?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
This starter kit is designed to get you up and running with a bunch of awesome new front-end technologies, all on top of a configurable, feature-rich webpack build system that's already setup to provide hot reloading, CSS preprocessing with Sass, unit testing, code coverage reports, bundle splitting, and more.
10
-
11
-
The primary goal of this project is to remain as **unopinionated** as possible. Its purpose is not to dictate your project structure or to demonstrate a complete sample application, but to provide a set of tools intended to make front-end development robust, easy, and, most importantly, fun. Check out the full feature list below!
12
-
13
-
Finally, This project wouldn't be possible without the help of our many contributors, so [thank you](#thank-you) for all of your help.
3
+
This is the main repository of es6console.com. A tool for playing around with ECMAScript 6 to 5 transformers.
14
4
15
5
## Table of Contents
16
6
1.[Features](#features)
@@ -33,68 +23,62 @@ Finally, This project wouldn't be possible without the help of our many contribu
After confirming that your development environment meets the specified [requirements](#requirements), you can create a new project based on `react-redux-starter-kit` by doing the following:
Then install dependencies and check to see it works. It is recommended that you use [Yarn](https://yarnpkg.com/) for deterministic installs, but `npm install` will work just as well.
63
48
64
49
```bash
65
-
$ yarn install # Install project dependencies
66
-
$ yarn start# Compile and launch (same as `npm start`)
50
+
$ npm install # Install project dependencies
51
+
$ npm run dev# Compile and launch (same as `npm start`)
67
52
```
68
-
If everything works, you should see the following:
69
-
70
-
<imgsrc="http://i.imgur.com/Kk2qTHC.png" />
71
53
72
-
While developing, you will probably rely mostly on `npm start`; however, there are additional scripts at your disposal:
54
+
While developing, you will probably rely mostly on `npm dev`; however, there are additional scripts at your disposal:
73
55
74
56
|`npm run <script>`|Description|
75
57
|------------------|-----------|
76
-
|`start`|Serves your app at `localhost:3000`. HMR will be enabled in development.|
58
+
|`start`|Serves your app at `localhost:8000`. HMR will be enabled in development.|
77
59
|`compile`|Compiles the application to disk (`~/dist` by default).|
78
60
|`dev`|Same as `npm start`, but enables nodemon for the server as well.|
79
61
|`test`|Runs unit tests with Karma and generates a coverage report.|
80
62
|`test:dev`|Runs Karma and watches for changes to re-run tests; does not generate coverage reports.|
81
63
|`deploy`|Runs linter, tests, and then, on success, compiles your application to disk.|
82
-
|`deploy:dev`|Same as `deploy` but overrides `NODE_ENV` to "development".|
64
+
|`deploy:staging`|Same as `deploy` but overrides `NODE_ENV` to "development".|
83
65
|`deploy:prod`|Same as `deploy` but overrides `NODE_ENV` to "production".|
66
+
|`deploy_lambda`|Same as `deploy_lambda` but overrides `NODE_ENV` to "production".|
67
+
|`deploy_lambda:staging`|Same as `deploy_lambda` but overrides `NODE_ENV` to "production".|
68
+
|`deploy_lambda:prod`|Same as `deploy_lambda` but overrides `NODE_ENV` to "production".|
84
69
|`lint`|Lint all `.js` files.|
85
70
|`lint:fix`|Lint and fix all `.js` files. [Read more on this](http://eslint.org/docs/user-guide/command-line-interface.html#fix).|
86
71
87
72
## Application Structure
88
73
89
-
The application structure presented in this boilerplate is **fractal**, where functionality is grouped primarily by feature rather than file type. Please note, however, that this structure is only meant to serve as a guide, it is by no means prescriptive. That said, it aims to represent generally accepted guidelines and patterns for building scalable applications. If you wish to read more about this pattern, please check out this [awesome writeup](https://github.com/davezuko/react-redux-starter-kit/wiki/Fractal-Project-Structure) by [Justin Greenberg](https://github.com/justingreenberg).
90
74
91
75
```
92
76
.
93
77
├── bin # Build/Start scripts
94
78
├── config # Project and build configurations
95
79
├── public # Static public assets (not imported anywhere in source code)
96
80
├── server # Express application that provides webpack middleware
97
-
│ └── main.js # Server application entry point
81
+
│ └── main.js # Development Server application entry point
98
82
├── src # Application source code
99
83
│ ├── index.html # Main HTML page container for app
100
84
│ ├── main.js # Application bootstrap and rendering
@@ -111,46 +95,23 @@ The application structure presented in this boilerplate is **fractal**, where fu
**We recommend using the [Redux DevTools Chrome Extension](https://chrome.google.com/webstore/detail/redux-devtools/lmhkpmbekcpmknklioeibfkpmmfibljd).**
131
-
Using the chrome extension allows your monitors to run on a separate thread and affords better performance and functionality. It comes with several of the most popular monitors, is easy to configure, filters actions, and doesn’t require installing any packages.
132
-
133
-
However, adding the DevTools components to your project is simple. First, grab the packages from npm:
134
-
135
-
```bash
136
-
npm i --save-dev redux-devtools redux-devtools-log-monitor redux-devtools-dock-monitor
137
-
```
138
-
139
-
Then follow the [manual integration walkthrough](https://github.com/gaearon/redux-devtools/blob/master/docs/Walkthrough.md).
140
-
141
-
### Routing
142
-
We use `react-router`[route definitions](https://github.com/reactjs/react-router/blob/master/docs/API.md#plainroute) (`<route>/index.js`) to define units of logic within our application. See the [application structure](#application-structure) section for more information.
143
-
144
110
## Testing
145
111
To add a unit test, simply create a `.spec.js` file anywhere in `~/tests`. Karma will pick up on these files automatically, and Mocha and Chai will be available within your test without the need to import them. Coverage reports will be compiled to `~/coverage` by default. If you wish to change what reporters are used and where reports are compiled, you can do so by modifying `coverage_reporters` in `~/config/project.config.js`.
146
112
147
113
## Deployment
148
-
Out of the box, this starter kit is deployable by serving the `~/dist` folder generated by `npm run deploy` (make sure to specify your target `NODE_ENV` as well). This project does not concern itself with the details of server-side rendering or API structure, since that demands an opinionated structure that makes it difficult to extend the starter kit. However, if you do need help with more advanced deployment strategies, here are a few tips:
149
-
150
-
### Static Deployments
151
-
If you are serving the application via a web server such as nginx, make sure to direct incoming routes to the root `~/dist/index.html` file and let react-router take care of the rest. If you are unsure of how to do this, you might find [this documentation](https://github.com/reactjs/react-router/blob/master/docs/guides/Histories.md#configuring-your-server) helpful. The Express server that comes with the starter kit is able to be extended to serve as an API or whatever else you need, but that's entirely up to you.
152
-
153
-
## Build System
114
+
ES6Console is hosted on Amazon S3. When running `npm run deploy` the `~/dist` folder is synced up to the s3 bucket configured in `config/environment.config.js`. The website requires several backend scripts which are hosted on AWS Lambda using the serverless framework. When running `npm run deploy_lambda` these lambdas are automatically deployed.
154
115
155
116
### Configuration
156
117
@@ -193,29 +154,6 @@ These are global variables available to you anywhere in your source code. If you
193
154
194
155
Both `.scss` and `.css` file extensions are supported out of the box. After being imported, styles will be processed with [PostCSS](https://github.com/postcss/postcss) for minification and autoprefixing, and will be extracted to a `.css` file during production builds.
195
156
196
-
### Server
197
-
198
-
This starter kit comes packaged with an Express server. It's important to note that the sole purpose of this server is to provide `webpack-dev-middleware` and `webpack-hot-middleware` for hot module replacement. Using a custom Express app in place of [webpack-dev-server](https://github.com/webpack/webpack-dev-server) makes it easier to extend the starter kit to include functionality such as API's, universal rendering, and more -- all without bloating the base boilerplate.
199
-
200
157
### Production Optimization
201
158
202
159
Babel is configured to use [babel-plugin-transform-runtime](https://www.npmjs.com/package/babel-plugin-transform-runtime) so transforms aren't inlined. In production, webpack will extract styles to a `.css` file, minify your JavaScript, and perform additional optimizations such as module deduplication.
203
-
204
-
## Learning Resources
205
-
206
-
*[Starting out with react-redux-starter-kit](https://suspicious.website/2016/04/29/starting-out-with-react-redux-starter-kit/) is an introduction to the components used in this starter kit with a small example in the end.
207
-
208
-
## FAQ
209
-
210
-
Having trouble? Check out our [FAQ](https://github.com/davezuko/react-redux-starter-kit/wiki/FAQ:-Frequently-Asked-Questions) or submit an issue. Please be considerate by only posting issues that are directly related to this project; questions about how to implement certain React or Redux features are both best suited for StackOverflow or their respective repositories.
211
-
212
-
## Thank You
213
-
214
-
This project wouldn't be possible without help from the community, so I'd like to highlight some of its biggest contributors. Thank you all for your hard work, you've made my life a lot easier and taught me a lot in the process.
215
-
216
-
*[Justin Greenberg](https://github.com/justingreenberg) - For all of your PR's, getting us to Babel 6, and constant work improving our patterns.
217
-
*[Roman Pearah](https://github.com/neverfox) - For your bug reports, help in triaging issues, and PR contributions.
218
-
*[Spencer Dixon](https://github.com/SpencerCDixon) - For your creation of [redux-cli](https://github.com/SpencerCDixon/redux-cli).
219
-
*[Jonas Matser](https://github.com/mtsr) - For your help in triaging issues and unending support in our Gitter channel.
220
-
221
-
And to everyone else who has contributed, even if you are not listed here your work is appreciated.
0 commit comments