Skip to content

Commit

Permalink
Move & minify builded style
Browse files Browse the repository at this point in the history
Closes #237.
  • Loading branch information
balthazar committed Feb 17, 2017
1 parent 77fefbb commit 17fc450
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ node_modules/
coverage/
dist/

# To be removed in next major
main.css

/index.html
bundle.*
npm-debug.log*
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Install react-vis via npm.

Include the built main CSS file in your HTML page or via SASS:
```sass
@import "./node_modules/react-vis/main";
@import "./node_modules/react-vis/dist/style";
```

You can also select only the styles you want to use. This helps minimize the size of the outputted CSS. Here's an example of importing only the legends styles:
Expand Down
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
"description": "Data visualization library based on React and d3.",
"main": "dist/index.js",
"files": [
"dist",
"main.css"
"dist"
],
"repository": {
"type": "git",
Expand All @@ -21,7 +20,7 @@
"docs": "(cd showcase && npm run build && cp bundle.* .. && cd .. && git checkout gh-pages && git commit -am 'Upgrade docs' && git push && git checkout master)",
"start": "(cd showcase && command -v yarn >/dev/null && yarn && npm start || npm install && npm start)",
"clean": "rm -rf dist bundle.* index.html && mkdir dist",
"build": "npm run clean && babel src -d dist --copy-files && node-sass src/main.scss main.css",
"build": "npm run clean && babel src -d dist --copy-files && node-sass src/main.scss dist/style.css --output-style compressed",
"lint": "eslint src tests showcase --ignore-pattern node_modules --ignore-pattern bundle.js",
"lint-styles": "stylelint src/styles/*.scss --syntax scss",
"test": "tape -r babel-register tests/**/*.js",
Expand Down

0 comments on commit 17fc450

Please sign in to comment.