Skip to content

Commit

Permalink
chore: move to npm, update rollup typescript, remove need for rsync
Browse files Browse the repository at this point in the history
  • Loading branch information
domoritz committed Nov 5, 2024
1 parent 31083bc commit 1510815
Show file tree
Hide file tree
Showing 12 changed files with 11,169 additions and 7,187 deletions.
1 change: 0 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ module.exports = {
'prettier/prettier': 'warn',
// https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/eslint-plugin#supported-rules
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/ban-types': 'warn',
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/prefer-for-of': 'error',
'@typescript-eslint/no-for-in-array': 'error',
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@ jobs:

- uses: actions/setup-node@v4
with:
cache: 'yarn'
cache: 'npm'

- name: Install Node dependencies
run: yarn --frozen-lockfile
run: npm ci

- run: yarn lint
- run: yarn build
- run: npm run lint
- run: npm run build

- name: Test coverage
run: yarn jest test/ --collectCoverage=true
run: npx jest test/ --collectCoverage=true

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4.6.0
Expand Down
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,3 @@ examples/data
node_modules
npm-debug.log*
src/style.ts
yarn-debug.log*
yarn-error.log*
2 changes: 1 addition & 1 deletion .release-it.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"release": true
},
"hooks": {
"after:bump": "yarn build"
"after:bump": "npm run build"
},
"plugins": {
"@release-it/conventional-changelog": {
Expand Down
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@ http://vega.github.io/vega-tooltip/

We recommend using [Vega-Embed](https://github.com/vega/vega-embed), which already comes with this tooltip plugin.

### NPM or Yarn

Use `npm install vega-tooltip` or `yarn add vega-tooltip`.
You can install Vega tooltip directly with `npm install vega-tooltip`.

### Using Vega-tooltip with a CDN

Expand Down Expand Up @@ -71,10 +69,10 @@ See the [API documentation](docs/APIs.md) for details.

## Run Instructions

1. In the project folder `vega-tooltip`, type command `yarn` to install dependencies.
2. Then, type `yarn start`. This will build the library and start a web server.
1. In the project folder `vega-tooltip`, type command `npm i` to install dependencies.
2. Then, type `npm run start`. This will build the library and start a web server.
3. In your browser, navigate to `http://localhost:8000/`, where you can see various Vega-Lite and Vega visualizations with tooltip interaction.

## Publishing

To make a release, run `npm run release`. The update the website with `yarn deploy:gh`.
To make a release, run `npm run release`. The update the website with `npm run deploy:gh`.
2 changes: 1 addition & 1 deletion build-style.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env bash

printf "// generated with build-style.sh\nexport default \`" > src/style.ts
yarn -s sass vega-tooltip.scss >> src/style.ts
npx sass vega-tooltip.scss >> src/style.ts
echo "\`;" >> src/style.ts
6 changes: 0 additions & 6 deletions docs/creating_your_tooltip.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,6 @@

## Step 1. Add The Library

If you use [`yarn`](https://yarnpkg.com/), you can install the library via:

```bash
yarn add vega-tooltip
```

With npm, you can install it as

```bash
Expand Down
Loading

0 comments on commit 1510815

Please sign in to comment.