From 8a5a31de155ea788f6df41c0ec5e80e061e05487 Mon Sep 17 00:00:00 2001 From: Kevin Qi Date: Sat, 10 Feb 2018 22:44:38 -0800 Subject: [PATCH] move build => dist, include styles.css in dist --- .gitignore | 1 - README.md | 8 +++++--- {src => dist}/styles.css | 0 package.json | 8 ++++++-- 4 files changed, 11 insertions(+), 6 deletions(-) rename {src => dist}/styles.css (100%) diff --git a/.gitignore b/.gitignore index 000fe4a..edc3a0a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,6 @@ node_modules npm-debug.log .DS_Store -build .cache *.iml .idea diff --git a/README.md b/README.md index 174d1b9..a857439 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/src/styles.css b/dist/styles.css similarity index 100% rename from src/styles.css rename to dist/styles.css diff --git a/package.json b/package.json index 1ec63d3..f592f2c 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "version": "0.7.0", "description": "A circular progress indicator component", "author": "Kevin Qi ", - "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",