Skip to content

Commit

Permalink
chore: migrate from yarn to npm (#1452)
Browse files Browse the repository at this point in the history
* chore: migrate from yarn to npm

- Replace yarn commands with npm equivalents in package.json
- Update README.md with npm instructions
- Update GitHub Actions workflows to use npm
- Remove yarn.lock and add package-lock.json
- Update .gitignore to remove yarn references

* Update package.json

* update to react-split-pane-r17

* fixes

---------

Co-authored-by: openhands <[email protected]>
  • Loading branch information
domoritz and openhands-agent authored Nov 19, 2024
1 parent 92d9543 commit 0b28f1f
Show file tree
Hide file tree
Showing 10 changed files with 11,291 additions and 6,167 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v4
- name: Install Node dependencies
run: yarn --frozen-lockfile
run: npm ci
- name: Build
run: yarn build
run: npm run build
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ jobs:
- uses: actions/setup-node@v4

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

- run: yarn lint
- run: yarn tsc
- run: yarn build:only
- run: npm run lint
- run: npx tsc
- run: npm run build:only
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@ coverage
dist
node_modules
npm-debug.log*
package-lock.json
public/data/
public/spec/
stats.json
yarn-debug.log*
yarn-error.log*
.parcel-cache
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,41 +12,41 @@ You can reset the Vega Editor by going to https://vega.github.io/editor/#/reset

### Run Vega-Editor With Docker
```bash
sudo docker run -it --rm -p 1234:1234 node:21 bash -xc 'mkdir -p vega/editor && git clone --depth=1 https://github.com/vega/editor.git vega/editor && cd vega/editor && yarn && yarn start'
sudo docker run -it --rm -p 1234:1234 node:21 bash -xc 'mkdir -p vega/editor && git clone --depth=1 https://github.com/vega/editor.git vega/editor && cd vega/editor && npm install && npm start'
```

### Development Setup
We assume you have [yarn](https://yarnpkg.com/), `bash`, `curl`, and `tar` installed.
We assume you have [Node.js and npm](https://nodejs.org/), `bash`, `curl`, and `tar` installed.

Your working copy of this git repository must be located at least two levels below the system root `/`.
E.g. `/home/user/editor` or `/vega/editor`, but not `/editor`.

Inside your working copy ...

1. Install the dependencies:
`$ yarn`
`$ npm install`

2. Launch the local web server:
`$ yarn start`
`$ npm start`

3. The local web server will be accessible via [http://localhost:1234](http://localhost:1234).

## Local Testing & Debugging

The editor is useful for testing if you are involved in Vega and Vega-Lite development. To use Vega, Vega-Lite, or Vega Datasets from another directory on your computer, you need to link it. For this, run `yarn link` in the directory of the library that you want to link. Then, in this directory run `yarn link <name of library>`, e.g. `yarn link vega` or `yarn link vega-lite`.
The editor is useful for testing if you are involved in Vega and Vega-Lite development. To use Vega, Vega-Lite, or Vega Datasets from another directory on your computer, you need to link it. For this, run `npm link` in the directory of the library that you want to link. Then, in this directory run `npm link <name of library>`, e.g. `npm link vega` or `npm link vega-lite`.

For example, to link Vega, run

```bash
cd VEGA_DIR
yarn link
npm link

cd VEGA_LITE_DIR
yarn link
npm link

cd VEGA_EDITOR_DIR
yarn link vega
yarn link vega-lite
npm link vega
npm link vega-lite
```

The Vega editor supports [React Developer Tools](https://github.com/facebook/react-devtools) and [Redux DevTools](https://github.com/zalmoxisus/redux-devtools-extension).
Expand Down
Loading

0 comments on commit 0b28f1f

Please sign in to comment.