Skip to content

Commit

Permalink
Merge pull request #848 from marekdedic/vite
Browse files Browse the repository at this point in the history
Building with Vite
  • Loading branch information
marekdedic authored Feb 24, 2024
2 parents 96d79d5 + cf2db24 commit 7e990a8
Show file tree
Hide file tree
Showing 42 changed files with 4,231 additions and 19,796 deletions.
13 changes: 4 additions & 9 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ jobs:
- name: "Upload artifact"
uses: actions/upload-artifact@v4
with:
name: "build-artifact"
path: dist
name: "docs"
path: docs

test:
name: "Test"
Expand Down Expand Up @@ -70,13 +70,8 @@ jobs:
- name: "Download build artifact"
uses: actions/download-artifact@v4
with:
name: "build-artifact"
path: dist

- name: "Copy over build artifacts"
run: |
cp dist/imagelightbox.css docs/stylesheets/
cp dist/imagelightbox.min.js docs/javascripts/
name: "docs"
path: docs

- name: "Test"
run: |
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ jobs:
run: |
npm ci
- name: "Build"
- name: "Build docs"
run: |
npm run build
npm run build:docs
- name: "Upload artifact"
uses: actions/upload-artifact@v4
with:
name: "demo-page"
name: "docs"
path: docs

deploy:
Expand All @@ -50,7 +50,7 @@ jobs:
- name: "Download artifact"
uses: actions/download-artifact@v4
with:
name: "demo-page"
name: "docs"
path: docs

- name: Deploy
Expand Down
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,5 @@ tags

# End of https://www.gitignore.io/api/vim,node,intellij

docs/javascripts/imagelightbox.min.js
docs/javascripts/imagelightbox.min.js.map
docs/stylesheets/imagelightbox.css
dist/
docs/
10 changes: 10 additions & 0 deletions docs.vite.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/* eslint-env node */

import { defineConfig } from "vite";

export default defineConfig({
build: {
outDir: "../docs",
},
root: "src",
});
4 changes: 0 additions & 4 deletions docs/javascripts/jquery.min.js

This file was deleted.

Loading

0 comments on commit 7e990a8

Please sign in to comment.