Skip to content

Commit

Permalink
Migrate to Vite
Browse files Browse the repository at this point in the history
Signed-off-by: weeman <[email protected]>
  • Loading branch information
weeman1337 committed Oct 5, 2023
1 parent 51978a6 commit 00b907e
Show file tree
Hide file tree
Showing 102 changed files with 9,554 additions and 16,022 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/build
/dev-dist
3 changes: 2 additions & 1 deletion .github/workflows/build-meshviewer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@ jobs:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm audit
- run: npm run gulp-ci
- run: npm run lint
- run: npm run build
2 changes: 1 addition & 1 deletion .github/workflows/release-meshviewer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm run gulp
- run: npm run build
- run: "cd build; zip -r ../meshviewer-build.zip .; cd .."
- name: Create Release
id: create_release
Expand Down
9 changes: 5 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@
Thumbs.db

# IDE files
/.idea/
/.idea

# Project files
node_modules/
build/
config.js
/node_modules
/build
/config.js
*.zip
/dev-dist
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/build
/dev-dist
23 changes: 13 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,32 +18,35 @@ It is recommended to use the latest release:

- Clone this repository
- Run `npm install`
- Run `npm run gulp`
- Run `npm run build`
- A production build can then be found in [`/build`](./build)

Hint: You can start a development server with `npm run serve`
Hint: You can start a development server with `npm run dev`

### Build & Run using Docker
### Build and run using Docker

Static local test instance:

```bash
docker run -it --rm -u $(id -u):$(id -g) -v "$PWD":/app -w /app node npm install
docker run -it --rm -u $(id -u):$(id -g) -v "$PWD":/app -w /app node npm run gulp-ci
docker run -it --rm -u $(id -u):$(id -g) -v "$PWD":/app -w /app node npm install
docker run -it --rm -u $(id -u):$(id -g) -v "$PWD":/app -w /app node npm run build
docker run -it --rm -v "$PWD/build":/usr/share/nginx/html -p 8080:80 --name nginx nginx
```

The map is reachable at [localhost:8080](http://localhost:8080).
You have to copy `config.example.json` as `build/config.json`.
You have to copy `config.example.json` to `build/config.json`.

Live build / development env:
Start a development environment:

```bash
docker run -it --rm -u $(id -u):$(id -g) -v "$PWD":/app -w /app -e NODE_ENV=development -p 3000:3000 node npm run gulp serve
docker run -it --rm --name meshviewer-dev \
-u $(id -u):$(id -g) \
-v "$PWD":/app -w /app \
-e NODE_ENV=development \
-p 5173:5173 \
node npm run dev -- --host 0.0.0.0
```

The map is reachable at [localhost:3000](http://localhost:3000).

## Configuration

The configuration documentation is nowhere near finished.
Expand Down
40 changes: 0 additions & 40 deletions app.js

This file was deleted.

Binary file removed assets/favicon/android-chrome-192x192.png
Binary file not shown.
Binary file removed assets/favicon/android-chrome-512x512.png
Binary file not shown.
Binary file removed assets/favicon/apple-touch-icon.png
Binary file not shown.
12 changes: 0 additions & 12 deletions assets/favicon/browserconfig.xml

This file was deleted.

Binary file removed assets/favicon/favicon-16x16.png
Binary file not shown.
Binary file removed assets/favicon/favicon-32x32.png
Binary file not shown.
Binary file removed assets/favicon/favicon.ico
Binary file not shown.
Binary file removed assets/favicon/mstile-144x144.png
Binary file not shown.
Binary file removed assets/favicon/mstile-150x150.png
Binary file not shown.
Binary file removed assets/favicon/mstile-310x150.png
Binary file not shown.
Binary file removed assets/favicon/mstile-310x310.png
Binary file not shown.
Binary file removed assets/favicon/mstile-70x70.png
Binary file not shown.
1 change: 0 additions & 1 deletion assets/favicon/safari-pinned-tab.svg

This file was deleted.

21 changes: 0 additions & 21 deletions assets/favicon/site.webmanifest

This file was deleted.

42 changes: 0 additions & 42 deletions assets/faviconData.json

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions assets/icons/icon.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ $cache-breaker: unique-id();
font-style: normal;
font-weight: normal;
src:
url("fonts/meshviewer.woff2?rel=#{$cache-breaker}") format("woff2"),
url("fonts/meshviewer.woff?rel=#{$cache-breaker}") format("woff"),
url("fonts/meshviewer.ttf?rel=#{$cache-breaker}") format("truetype");
url("@fonts/meshviewer.woff2?rel=#{$cache-breaker}") format("woff2"),
url("@fonts/meshviewer.woff?rel=#{$cache-breaker}") format("woff"),
url("@fonts/meshviewer.ttf?rel=#{$cache-breaker}") format("truetype");
}

[class^="ion-"],
Expand Down
47 changes: 0 additions & 47 deletions gulp/config.js

This file was deleted.

Loading

0 comments on commit 00b907e

Please sign in to comment.