move build => dist, include styles.css in dist

This commit is contained in:
Kevin Qi 2018-02-10 22:44:38 -08:00
parent 42ad725fab
commit 8a5a31de15
4 changed files with 11 additions and 6 deletions

1
.gitignore vendored
View File

@ -1,7 +1,6 @@
node_modules
npm-debug.log
.DS_Store
build
.cache
*.iml
.idea

View File

@ -15,14 +15,16 @@ Install the npm module:
npm install react-circular-progressbar
```
**Important**: you'll also need to copy [src/styles.css](src/styles.css) into your repo to use the default styling!
## Usage
Import the component:
```javascript
import CircularProgressbar from 'react-circular-progressbar';
// If you have a CSS loader configured, you can import the stylesheet.
// Otherwise, you can copy this CSS file into your project.
import 'react-circular-progressbar/dist/styles.css';
```
..and use the component in your JSX:
@ -52,7 +54,7 @@ For more in-depth examples, take a look at the [demo code](docs/demo.jsx) to see
## Customizing styles
Use plain CSS to customize the styling - the [default CSS](src/styles.css) is a good starting point, but you can modify it as needed.
Use plain CSS to customize the styling - the default CSS is a good starting point, but you can override it as needed.
#### CSS hooks

View File

View File

@ -3,7 +3,7 @@
"version": "0.7.0",
"description": "A circular progress indicator component",
"author": "Kevin Qi <iqnivek@gmail.com>",
"main": "./build/index.js",
"main": "./dist/index.js",
"repository": "https://github.com/iqnivek/react-circular-progressbar.git",
"license": "MIT",
"keywords": [
@ -12,9 +12,13 @@
"react-component",
"svg"
],
"style": "dist/styles.css",
"files": {
"dist"
},
"scripts": {
"build": "NODE_ENV=production webpack && npm run build:demo",
"build:demo": "NODE_ENV=demo webpack && cp ./src/styles.css ./docs/styles.css",
"build:demo": "NODE_ENV=demo webpack && cp ./dist/styles.css ./docs/styles.css",
"clean": "rimraf build",
"lint": "eslint src test",
"prepare": "npm run clean && npm run build",