Skip to content

Commit

Permalink
Package updates and required changes. Use vite.
Browse files Browse the repository at this point in the history
  • Loading branch information
stevekirks committed Dec 17, 2023
1 parent e3c46dd commit bab4fae
Show file tree
Hide file tree
Showing 9 changed files with 1,146 additions and 76 deletions.
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
VITE_DATA_SERVICES_URL='/data/services.json'
1 change: 0 additions & 1 deletion .env.development

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:

- name: Install and Build
env:
REACT_APP_DATA_SERVICES_URL: "data/services.json"
VITE_DATA_SERVICES_URL: "data/services.json"
run: |
npm install
npm run build
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<h1 align="center">D3 Force Diagram | <a href="https://stevekirks.github.io/d3-force-diagram">Demo</a></h1>

Built using [Typescript](https://www.typescriptlang.org/) and [d3 v7](https://d3js.org/)
Built in [Typescript](https://www.typescriptlang.org/) with [d3 v7](https://d3js.org/)

### Features
- node highlighting (type in search field or click one or more nodes)
Expand All @@ -15,11 +15,11 @@ Built using [Typescript](https://www.typescriptlang.org/) and [d3 v7](https://d3
- node hierarchy up to two levels in depth (double-click a node to explode or re-group)

### Usage
Clone this repository, copy the ./public/data file to ./dist/data, then run
Requires npm. Clone this repository, then run
```
npx parcel ./public/index.html
npm install
npm run start
```
Parcel builds the source files into the ./dist folder and runs a web server.

### Data format
Sample data is stored in the `public/data` folder.
Sample data is stored in the `public/data` folder and set in the `.env` file.
8 changes: 4 additions & 4 deletions public/index.html → index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@

<head>
<meta charset="utf-8" />
<link rel="icon" href="favicon.ico" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta name="description" content="D3 Force Diagram" />
<link rel="apple-touch-icon" href="logo192.png" />
<link rel="manifest" href="manifest.json" />
<link rel="apple-touch-icon" href="/logo192.png" />
<link rel="manifest" href="/manifest.json" />
<title>D3 Force Diagram</title>
</head>

Expand Down Expand Up @@ -47,7 +47,7 @@ <h2 class="title">Diagram</h2>
</div>
</div>

<script src="../src/index.ts"></script>
<script type="module" src="/src/index.ts"></script>
</body>

</html>
Loading

0 comments on commit bab4fae

Please sign in to comment.