Skip to content

Commit

Permalink
update libs and code format prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
tbo47 committed Sep 28, 2024
1 parent f14d9a1 commit e9b481d
Show file tree
Hide file tree
Showing 33 changed files with 3,453 additions and 400 deletions.
16 changes: 15 additions & 1 deletion .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,21 @@ module.exports = {
node: true,
},
extends: ['eslint:recommended', 'plugin:import/recommended'],
overrides: [],
overrides: [
{
files: ['**/*.test.js', 'test/**/*.js'],
env: {
// technically, we are using vitest, but that's pretty similar to jest
jest: true,
},
settings: {
'import/ignore': [
// for some reason, `import {it} from "vitest";` throws an error
/node_modules\/vitest\/dist\/index\.js$/.source,
],
},
},
],
parserOptions: {
sourceType: 'module',
},
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ on:
pull_request:

jobs:
lint:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
node-version: [18.x, 20.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- uses: actions/checkout@v3
Expand All @@ -18,11 +18,13 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm ci # throws an error if the package-lock.json file is out of sync
- run: npm ci
- name: Check for linting errors (run `npm run lint:fix` to fix)
run: npm run lint
- name: Check for prettier errors (run `npm run format` to fix)
run: npx prettier --check .
- name: Run unit tests
run: npm test
- name: Build the npm package to publish
run: npm pack
- uses: actions/upload-artifact@v3
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ node_modules
dist
.vscode
*.d.ts
*.tgz
tsconfig.tsbuildinfo
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
<p align="center">
<a href="https://www.npmjs.com/dagre-d3-es">
<img src="https://img.shields.io/npm/v/dagre-d3-es.svg?logo=npm&logoColor=fff&label=NPM+package&color=limegreen" alt="dagre-d3-es on npm" />
</a>&nbsp;
<a href="https://www.npmjs.com/dagre-d3-es"><img src="https://img.shields.io/npm/v/dagre-d3-es.svg?logo=npm&logoColor=fff&label=NPM+package&color=limegreen" alt="dagre-d3-es on npm" /></a>&nbsp;
<a href="https://www.npmjs.com/dagre-d3-es"><img src="https://img.shields.io/npm/dw/dagre-d3-es.svg?logo=npm&logoColor=fff&label=NPM+package&color=limegreen" alt="dagre-d3-es on npm" /></a>
</p>

# dagre-d3-es

The [dagre-d3](https://github.com/dagrejs) library is not maintained anymore.
[dagre-d3-es](https://www.npmjs.com/package/dagre-d3-es) is a fork of [dagre-d3](https://github.com/dagrejs) using the more modern ES6 javascript syntax.

[dagre-d3-es](https://www.npmjs.com/package/dagre-d3-es) is a fork using the more modern ES6 javascript syntax.
It uses [ES](https://262.ecma-international.org/6.0/) modules, thus the name [dagre-d3-es](https://www.npmjs.com/package/dagre-d3-es).

[dagre-d3-es](https://www.npmjs.com/package/dagre-d3-es) follows [d3](https://www.npmjs.com/package/d3) versions. Ex: dagre-d3-es version 7 depends on [d3](https://www.npmjs.com/package/d3) version 7.

## Demos

[Simple graph demo](https://codesandbox.io/s/dagre-d3-es-tree-9ywg9) using react, dagre-d3-es, [d3](https://www.npmjs.com/package/d3) version 7.2.
[Simple graph demo](https://codesandbox.io/s/dagre-d3-es-tree-9ywg9) using react, dagre-d3-es.

Clone and run [dagre-es-example](https://github.com/tbo47/dagre-es-example) using angular.

## Install

```
npm install dagre-d3-es --save
npm install dagre-d3-es
```

## Code example
Expand Down
Loading

0 comments on commit e9b481d

Please sign in to comment.