Updated with latest version of react boilerplate
This commit is contained in:
27
README.md
27
README.md
@@ -4,30 +4,21 @@ Based on the architecture suggestions from Facebook, this boilerplate will help
|
||||
|
||||
Read more about FLUX over at [Facebook Flux](http://facebook.github.io/flux/) and I wrote a post about it too: [My experiences building a FLUX application](http://christianalfoni.github.io/javascript/2014/10/27/my-experiences-building-a-flux-application.html) and [React JS and FLUX](http://christianalfoni.github.io/javascript/2014/08/20/react-js-and-flux.html)
|
||||
|
||||
### How to use
|
||||
|
||||
* Clone the repo
|
||||
* Run `npm install`
|
||||
* Open `build/index.html`, run `python -m SimpleHTTPServer` in the `build` folder or set up your own server
|
||||
* **Important!** When adding new libs be sure to add them to "gulpfile.js" vendors. This will keep your rebundling speed very low and you will be happy :-)
|
||||
|
||||
### Development
|
||||
* Run `gulp`
|
||||
* Any changes to `app` folder will automatically rebuild to `build` folder
|
||||
|
||||
### Run all tests with Karma
|
||||
* Run `npm test`
|
||||
|
||||
Karma will launch PhantomJS and run the tests once. If you need to run tests in a normal browser change karma.conf.js to use 'Chrome' as browser. You can also keep running the tests as you write them. Set `autoWatch: true` and `singleRun: false`.
|
||||
* Start a webservice in the `build` folder, f.ex. `python -m SimpleHTTPServer`
|
||||
* Go to `localhost:8000` to display the app
|
||||
* Go to `localhost:8000/testrunner.html` to see your tests
|
||||
* Any changes to `app` or `styles` folder will automatically rebuild to `build` folder
|
||||
* Both tests and application changes will refresh automatically in the browser
|
||||
* Run `gulp test` to run all tests with phantomJS and produce XML reports
|
||||
|
||||
### Minify the code, ready for production
|
||||
* Run `gulp deploy` to deploy to `dist` folder
|
||||
* Run `gulp deploy`
|
||||
|
||||
### Directory
|
||||
* **app/**: Where you develop the application
|
||||
* **build/**: Where your automatically builds to. This is where you launch your app in development
|
||||
* **dist/**: Where the deployed code exists, ready for production
|
||||
* **tests/**: Where you put your test files
|
||||
* **styles/**: Where you put your css files
|
||||
* **specs/**: Where you put your test files
|
||||
* **gulpfile**: Gulp configuration
|
||||
* **karma.conf.js**: Karma configuration
|
||||
* **test.html**: Open when running specific test files
|
||||
|
||||
Reference in New Issue
Block a user