cleanup + update

This commit is contained in:
Simon Haugen 2021-02-13 11:38:58 +01:00
parent 0dc94a8024
commit 69d3ab74dd
5 changed files with 1154 additions and 45 deletions

1178
example/package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -15,7 +15,7 @@
"@types/react-dom": "^17.0.0", "@types/react-dom": "^17.0.0",
"@vitejs/plugin-react-refresh": "^1.1.0", "@vitejs/plugin-react-refresh": "^1.1.0",
"typescript": "^4.1.2", "typescript": "^4.1.2",
"vite": "^2.0.0-beta.65", "vite": "^2.0.0-beta.69",
"vite-plugin-typescript-starter": "file:.." "vite-plugin-package-version": "file:.."
} }
} }

View file

@ -1,8 +1,8 @@
import reactRefresh from '@vitejs/plugin-react-refresh'; import reactRefresh from '@vitejs/plugin-react-refresh';
import { defineConfig } from 'vite'; import { defineConfig } from 'vite';
import { ViteStarter } from 'vite-plugin-typescript-starter'; import loadVersion from 'vite-plugin-package-version';
// https://vitejs.dev/config/ // https://vitejs.dev/config/
export default defineConfig({ export default defineConfig({
plugins: [reactRefresh(), ViteStarter()], plugins: [reactRefresh(), loadVersion()],
}); });

View file

@ -26,12 +26,12 @@
"postinstall": "cd example && npm install" "postinstall": "cd example && npm install"
}, },
"peerDependencies": { "peerDependencies": {
"vite": ">=2.0.0-beta.65" "vite": ">=2.0.0-beta.69"
}, },
"devDependencies": { "devDependencies": {
"concurrently": "^5.3.0", "concurrently": "^5.3.0",
"tsup": "^3.12.1", "tsup": "^3.12.1",
"typescript": "^4.1.3", "typescript": "^4.1.3",
"vite": "^2.0.0-beta.65" "vite": "^2.0.0-beta.69"
} }
} }

View file

@ -1,12 +1,9 @@
import { Plugin } from 'vite'; import type { Plugin } from 'vite';
export const ViteStarter = (): Plugin => { const createPlugin = (): Plugin => {
return { return {
name: 'vite-plugin-package-version', name: 'vite-plugin-package-version',
// plugin code: https://vitejs.dev/guide/api-plugin.html
}; };
}; };
export default { export default createPlugin;
ViteStarter,
};