Skip to content

Commit

Permalink
Merge pull request #32 from SpiriitLabs/dev
Browse files Browse the repository at this point in the history
Version 2.0.1
  • Loading branch information
Applelo authored Nov 28, 2023
2 parents d238f42 + e95a503 commit 551585e
Show file tree
Hide file tree
Showing 10 changed files with 185 additions and 80 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ jobs:

lint:
runs-on: ubuntu-latest
name: 'Lint: node-18, ubuntu-latest'
name: 'Lint: node-20, ubuntu-latest'

steps:
- uses: actions/checkout@v3
Expand Down
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
auto-install-peers=true
ignore-workspace-root-check=true
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,16 +144,18 @@ You can see the usage in the [corresponding demo folder](/demo/vue/src/App.vue).

ViteJS allows to be use to [serve assets](https://vitejs.dev/guide/backend-integration.html). So, you can connect ViteJS with Wordpress, Drupal or any kind of backend.

To make `vite-plugin-svg-spritemap` works with this kind of environnment, you will need to handle the right url inside your backend if you are on dev or build.
> [!IMPORTANT]
> To make `vite-plugin-svg-spritemap` works with this kind of environnment, you will need to handle the right url inside your backend if you are on dev or build.
For example, with `<use>` on dev, using direcly the id of the svg (with the `injectSVGOnDev` option).

For example, with `<use>` on dev:
```html
<svg>
<use xlink:href="#sprite-spiriit"></use>
</svg>
```

and in prod:
And in prod, by putting the correct URL manually thanks to [the manifest.json file](https://vitejs.dev/guide/backend-integration.html) information :
```html
<svg>
<use xlink:href="https://my-cool-website.com/dist/assets/spritemap.95b4c41a.svg#sprite-spiriit"></use>
Expand Down
1 change: 1 addition & 0 deletions demo/basic/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "demo",
"type": "module",
"version": "0.0.0",
"private": true,
"scripts": {
Expand Down
File renamed without changes.
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@spiriit/vite-plugin-svg-spritemap",
"type": "module",
"version": "2.0.0",
"version": "2.0.1",
"packageManager": "[email protected]",
"description": "Generates symbol-based SVG spritemap from all .svg files in a directory",
"author": "Spiriit",
Expand Down Expand Up @@ -74,13 +74,14 @@
"devDependencies": {
"@antfu/eslint-config": "2.0.0",
"@types/hash-sum": "^1.0.2",
"@types/node": "^20.9.4",
"@types/node": "^20.10.0",
"@types/xmldom": "^0.1.34",
"@vitejs/plugin-vue": "^4.5.0",
"@vitest/coverage-v8": "^0.34.6",
"c8": "^8.0.1",
"eslint": "^8.54.0",
"playwright": "^1.40.0",
"rollup": "^4.5.2",
"svg-element-attributes": "^2.1.0",
"tsup": "^8.0.1",
"typescript": "^5.3.2",
Expand Down
Loading

0 comments on commit 551585e

Please sign in to comment.