-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
boilerplate structure for new react library development
- Loading branch information
Dan
authored and
Dan
committed
Aug 5, 2015
1 parent
d77dd23
commit 9ee524b
Showing
17 changed files
with
21,155 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
node_modules | ||
.idea/ | ||
*.sublime-* | ||
.DS_Store | ||
Thumbs.db |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,46 @@ | ||
# react-charts | ||
Charts for React | ||
Chart library for React | ||
|
||
# Examples | ||
|
||
If you just want to run the examples locally: | ||
|
||
1. Clone this repo and `cd` to the newly-created directory | ||
2. Run `npm serve` in your terminal | ||
3. Go to [http://localhost:8000](http://localhost:8000) | ||
|
||
# Development | ||
|
||
If you'd like to contribute to the development this project, first fork & clone this repo, and then follow these steps: | ||
|
||
### Global dependencies | ||
|
||
* This project uses NPM to manage dependencies and run scripts. Run `npm -v` to check if you already have it installed. | ||
If you don't have it, NPM is packaged with Node.js - download and run the | ||
[install package located on nodejs.org](https://nodejs.org/) to install. | ||
* Babel is used to transpile ES6+ code to ES5 syntax. Install by running `npm install --global babel` | ||
* Webpack is used to bundle the JS & styles for the examples. Install by running `npm install --global webpack` | ||
|
||
### Project dependencies | ||
|
||
* Run `npm install` in the project root directory. This will install all of the project dependencies into the | ||
`node_modules` directory. | ||
|
||
### Development process | ||
|
||
* Run `npm run dev` to run the development server (webpack-dev-server), which will serve a live development version of | ||
the examples at [localhost:9876](http://localhost:9876) | ||
* Make changes to the library code in the `src` directory, and/or changes to the examples in the `examples/src` | ||
directory. | ||
* Once you are happy with your changes, run `npm run build` to generate a production build. (This transpiles the ES6 | ||
library code, and transpiles + bundles the examples). | ||
* `git commit` and `git push` your changes to your forked version of the repo. | ||
* Open a Github pull request if you'd like to get your changes merged into the official repository. | ||
|
||
### Notes | ||
|
||
* **Do not make any changes in the `lib` or `examples/build` directories**, as these directories are destroyed and | ||
regenerated on each build. | ||
* The development server uses [react-hot-loader](https://github.com/gaearon/react-hot-loader) to automatically | ||
"hot reload" changes to React components, so refreshing your web browser is usually not necessary. However, some | ||
changes will still require a refresh to propagate. |
Oops, something went wrong.