Skip to content

Commit

Permalink
Merge pull request #206 from Mathys-Gasnier/main
Browse files Browse the repository at this point in the history
Updating to use vite HMR to consolidate snippets
  • Loading branch information
Mathys-Gasnier authored Jan 8, 2025
2 parents 52e7c9c + 145a139 commit f446d74
Show file tree
Hide file tree
Showing 36 changed files with 56 additions and 3,709 deletions.
39 changes: 0 additions & 39 deletions .github/workflows/consolidate-snippets.yml

This file was deleted.

4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,7 @@ dist-ssr
*.njsproj
*.sln
*.sw?

# Consolidated snippets
public/consolidated
public/icons
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,11 +141,11 @@ console.log(formatDate(new Date())); // Output: '2024-12-10'
It will return nothing if they are well formatted, otherwise it will tell you what the error is.
---
To preview the snippets, you need to consolidate them, use the `snippets:consolidate` script:
To preview the snippets, start the vite server using:
```
$ npm run snippets:consolidate
$ npm run dev
```
It will update the snippets in the `/public` folder, making them available to the frontend.
It will use HMR to update the snippets in the `/public` folder, making them available to the frontend.
Expected file structure:
Expand Down
16 changes: 16 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"snippets:consolidate": "node ./utils/consolidateSnippets.js"
},
"dependencies": {
"@types/node": "^22.10.5",
"motion": "^11.15.0",
"prismjs": "^1.29.0",
"react": "^18.3.1",
Expand Down
72 changes: 0 additions & 72 deletions public/consolidated/_index.json

This file was deleted.

146 changes: 0 additions & 146 deletions public/consolidated/c.json

This file was deleted.

Loading

0 comments on commit f446d74

Please sign in to comment.