Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix build script and update readme #1464

Merged
merged 2 commits into from
Dec 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 14 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,17 +108,27 @@ Take a look at the [folder with examples](docs/examples) or check out some docs:
* [Legends](docs/legends.md) about the legends.

## Development
Make sure you are using the correct version of `node` and `yarn`. To do so, check `package.json` and find the entry "volta", e.g.

To develop on this component, install the dependencies and then build and watch the static files:
```
"volta": {
"node": "14.18.0",
"yarn": "1.22.4"
}
```

It's recommanded to install [volta](https://volta.sh/) to manage node and yarn.

To develop on react-vis, navigate to `packages/react-vis`, and install the dependencies and then build and watch the static files:

npm install && npm run start
yarn && yarn start

Once complete, you can view the component's example in your browser (will open automatically).
Any changes you make to the example code will run the compiler to build the files again.

To lint your code, run the tests, and create code coverage reports:
To run the tests, and create code coverage reports:

npm run full-test
yarn cover

## Requirements

Expand Down
2 changes: 1 addition & 1 deletion packages/react-vis/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"scripts": {
"docs": "./publish-docs.sh",
"clean": "rm -rf dist es bundle.* index.html && mkdir dist es",
"start": "(cd showcase && command -v yarn >/dev/null && yarn && npm start || npm install && npm start)",
"start": "(cd ../showcase && command -v yarn >/dev/null && yarn start)",
"build:browser": "browserify src/index.js -t [ babelify --rootMode upward --global ] --standalone reactVis | uglifyjs > dist/dist.min.js",
"build": "yarn run clean && babel --root-mode upward src -d dist --copy-files && BABEL_ENV=es babel --root-mode upward src -d es --copy-files && node-sass src/main.scss dist/style.css --output-style compressed && yarn run build:browser",
"lint-styles": "stylelint src/styles/*.scss --syntax scss",
Expand Down