This commit is contained in:
Simon Haugen 2021-02-13 10:32:50 +01:00
parent 0cc51e747c
commit 0dc94a8024
4 changed files with 151 additions and 253 deletions

View file

@ -1,29 +1,3 @@
# vite-plugin-typescript-starter # vite-plugin-package-version
Typescript Starter Template for vite plugins. Plugin for vite to load package version into environment
### Includes:
- Plugin build with [tsup](https://github.com/egoist/tsup)
- Example app (React-TS)
- Parallel development of plugin and example-app with [concurrently](https://github.com/kimmobrunfeldt/concurrently)
## Getting started
Click "Use this Template" or use [degit](https://github.com/Rich-Harris/degit) to clone this repository.
## Development
- Install dependencies
```
npm install
```
- Start plugin and example-app (react-ts)
```
npm run dev
```
- Open browser on localhost:3000
## Build
```
npm run build
```

362
package-lock.json generated
View file

@ -1,5 +1,5 @@
{ {
"name": "vite-plugin-typescript-starter", "name": "vite-plugin-package-version",
"version": "0.0.1", "version": "0.0.1",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
@ -28,58 +28,6 @@
"@babel/helper-validator-identifier": "^7.12.11", "@babel/helper-validator-identifier": "^7.12.11",
"chalk": "^2.0.0", "chalk": "^2.0.0",
"js-tokens": "^4.0.0" "js-tokens": "^4.0.0"
},
"dependencies": {
"ansi-styles": {
"version": "3.2.1",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
"integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
"dev": true,
"requires": {
"color-convert": "^1.9.0"
}
},
"chalk": {
"version": "2.4.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
"integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
"dev": true,
"requires": {
"ansi-styles": "^3.2.1",
"escape-string-regexp": "^1.0.5",
"supports-color": "^5.3.0"
}
},
"color-convert": {
"version": "1.9.3",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
"integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
"dev": true,
"requires": {
"color-name": "1.1.3"
}
},
"color-name": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
"integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
"dev": true
},
"has-flag": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
"integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
"dev": true
},
"supports-color": {
"version": "5.5.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
"integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
"dev": true,
"requires": {
"has-flag": "^3.0.0"
}
}
} }
}, },
"@nodelib/fs.scandir": { "@nodelib/fs.scandir": {
@ -140,9 +88,9 @@
"dev": true "dev": true
}, },
"@types/node": { "@types/node": {
"version": "14.14.25", "version": "14.14.27",
"resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.25.tgz", "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.27.tgz",
"integrity": "sha512-EPpXLOVqDvisVxtlbvzfyqSsFeQxltFbluZNRndIb8tr9KiBnYNLzrc1N3pyKUCww2RNrfHDViqDWWE1LCJQtQ==", "integrity": "sha512-Ecfmo4YDQPwuqTCl1yBxLV5ihKfRlkBmzUEDcfIRvDxOTGQEeikr317Ln7Gcv0tjA8dVgKI3rniqW2G1OyKDng==",
"dev": true "dev": true
}, },
"@types/parse-json": { "@types/parse-json": {
@ -167,12 +115,12 @@
"dev": true "dev": true
}, },
"ansi-styles": { "ansi-styles": {
"version": "4.3.0", "version": "3.2.1",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
"dev": true, "dev": true,
"requires": { "requires": {
"color-convert": "^2.0.1" "color-convert": "^1.9.0"
} }
}, },
"any-promise": { "any-promise": {
@ -253,13 +201,25 @@
"dev": true "dev": true
}, },
"chalk": { "chalk": {
"version": "4.1.0", "version": "2.4.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
"integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
"dev": true, "dev": true,
"requires": { "requires": {
"ansi-styles": "^4.1.0", "ansi-styles": "^3.2.1",
"supports-color": "^7.1.0" "escape-string-regexp": "^1.0.5",
"supports-color": "^5.3.0"
},
"dependencies": {
"supports-color": {
"version": "5.5.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
"integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
"dev": true,
"requires": {
"has-flag": "^3.0.0"
}
}
} }
}, },
"chokidar": { "chokidar": {
@ -290,18 +250,18 @@
} }
}, },
"color-convert": { "color-convert": {
"version": "2.0.1", "version": "1.9.3",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
"dev": true, "dev": true,
"requires": { "requires": {
"color-name": "~1.1.4" "color-name": "1.1.3"
} }
}, },
"color-name": { "color-name": {
"version": "1.1.4", "version": "1.1.3",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
"dev": true "dev": true
}, },
"colorette": { "colorette": {
@ -337,69 +297,6 @@
"supports-color": "^6.1.0", "supports-color": "^6.1.0",
"tree-kill": "^1.2.2", "tree-kill": "^1.2.2",
"yargs": "^13.3.0" "yargs": "^13.3.0"
},
"dependencies": {
"ansi-styles": {
"version": "3.2.1",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
"integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
"dev": true,
"requires": {
"color-convert": "^1.9.0"
}
},
"chalk": {
"version": "2.4.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
"integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
"dev": true,
"requires": {
"ansi-styles": "^3.2.1",
"escape-string-regexp": "^1.0.5",
"supports-color": "^5.3.0"
},
"dependencies": {
"supports-color": {
"version": "5.5.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
"integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
"dev": true,
"requires": {
"has-flag": "^3.0.0"
}
}
}
},
"color-convert": {
"version": "1.9.3",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
"integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
"dev": true,
"requires": {
"color-name": "1.1.3"
}
},
"color-name": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
"integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
"dev": true
},
"has-flag": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
"integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
"dev": true
},
"supports-color": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz",
"integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==",
"dev": true,
"requires": {
"has-flag": "^3.0.0"
}
}
} }
}, },
"cosmiconfig": { "cosmiconfig": {
@ -413,6 +310,20 @@
"parse-json": "^5.0.0", "parse-json": "^5.0.0",
"path-type": "^4.0.0", "path-type": "^4.0.0",
"yaml": "^1.10.0" "yaml": "^1.10.0"
},
"dependencies": {
"parse-json": {
"version": "5.2.0",
"resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz",
"integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==",
"dev": true,
"requires": {
"@babel/code-frame": "^7.0.0",
"error-ex": "^1.3.1",
"json-parse-even-better-errors": "^2.3.0",
"lines-and-columns": "^1.1.6"
}
}
} }
}, },
"date-fns": { "date-fns": {
@ -458,9 +369,9 @@
} }
}, },
"esbuild": { "esbuild": {
"version": "0.8.43", "version": "0.8.44",
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.8.43.tgz", "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.8.44.tgz",
"integrity": "sha512-ZVE2CpootS4jtnfV0bbtJdgRsHEXcMP0P7ZXGfTmNzzhBr2e5ag7Vp3ry0jmw8zduJz4iHzxg4m5jtPxWERz1w==", "integrity": "sha512-m9yyBZMgWuAB7e7tA2g9L4PovoLa5Xb73+Yg9uBBR2w3Fe4P9/nxqj/HLrw1k/rjdjF1eX1kNJRytboqOtRCCQ==",
"dev": true "dev": true
}, },
"escape-string-regexp": { "escape-string-regexp": {
@ -588,9 +499,9 @@
} }
}, },
"has-flag": { "has-flag": {
"version": "4.0.0", "version": "3.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
"dev": true "dev": true
}, },
"hosted-git-info": { "hosted-git-info": {
@ -884,15 +795,13 @@
} }
}, },
"parse-json": { "parse-json": {
"version": "5.2.0", "version": "4.0.0",
"resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz",
"integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=",
"dev": true, "dev": true,
"requires": { "requires": {
"@babel/code-frame": "^7.0.0",
"error-ex": "^1.3.1", "error-ex": "^1.3.1",
"json-parse-even-better-errors": "^2.3.0", "json-parse-better-errors": "^1.0.1"
"lines-and-columns": "^1.1.6"
} }
}, },
"path-exists": { "path-exists": {
@ -941,9 +850,9 @@
} }
}, },
"postcss": { "postcss": {
"version": "8.2.5", "version": "8.2.6",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.2.5.tgz", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.2.6.tgz",
"integrity": "sha512-wMcb7BpDcm3gxQOQx46NDNT36Kk0Ao6PJLLI2ed5vehbbbxCEuslSQzbQ2sfSKy+gkYxhWcGWSeaK+gwm4KIZg==", "integrity": "sha512-xpB8qYxgPuly166AGlpRjUdEYtmOWx2iCwGmrv4vqZL9YPVviDVPZPRXxnXr6xPZOdxQ9lp3ZBFCRgWJ7LE3Sg==",
"dev": true, "dev": true,
"requires": { "requires": {
"colorette": "^1.2.1", "colorette": "^1.2.1",
@ -961,6 +870,12 @@
"import-cwd": "^3.0.0" "import-cwd": "^3.0.0"
} }
}, },
"queue-microtask": {
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.2.tgz",
"integrity": "sha512-dB15eXv3p2jDlbOiNLyMabYg1/sXvppd8DP2J3EOCQ0AkuSXCW2tP7mnVouVLJKgUMY6yP0kcQDVpLCN13h4Xg==",
"dev": true
},
"read-pkg": { "read-pkg": {
"version": "4.0.1", "version": "4.0.1",
"resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-4.0.1.tgz", "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-4.0.1.tgz",
@ -970,18 +885,6 @@
"normalize-package-data": "^2.3.2", "normalize-package-data": "^2.3.2",
"parse-json": "^4.0.0", "parse-json": "^4.0.0",
"pify": "^3.0.0" "pify": "^3.0.0"
},
"dependencies": {
"parse-json": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz",
"integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=",
"dev": true,
"requires": {
"error-ex": "^1.3.1",
"json-parse-better-errors": "^1.0.1"
}
}
} }
}, },
"readdirp": { "readdirp": {
@ -1006,12 +909,12 @@
"dev": true "dev": true
}, },
"resolve": { "resolve": {
"version": "1.19.0", "version": "1.20.0",
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.19.0.tgz", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz",
"integrity": "sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg==", "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==",
"dev": true, "dev": true,
"requires": { "requires": {
"is-core-module": "^2.1.0", "is-core-module": "^2.2.0",
"path-parse": "^1.0.6" "path-parse": "^1.0.6"
} }
}, },
@ -1028,9 +931,9 @@
"dev": true "dev": true
}, },
"rollup": { "rollup": {
"version": "2.38.5", "version": "2.39.0",
"resolved": "https://registry.npmjs.org/rollup/-/rollup-2.38.5.tgz", "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.39.0.tgz",
"integrity": "sha512-VoWt8DysFGDVRGWuHTqZzT02J0ASgjVq/hPs9QcBOGMd7B+jfTr/iqMVEyOi901rE3xq+Deq66GzIT1yt7sGwQ==", "integrity": "sha512-+WR3bttcq7zE+BntH09UxaW3bQo3vItuYeLsyk4dL2tuwbeSKJuvwiawyhEnvRdRgrII0Uzk00FpctHO/zB1kw==",
"dev": true, "dev": true,
"requires": { "requires": {
"fsevents": "~2.3.1" "fsevents": "~2.3.1"
@ -1047,10 +950,13 @@
} }
}, },
"run-parallel": { "run-parallel": {
"version": "1.1.10", "version": "1.2.0",
"resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.1.10.tgz", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz",
"integrity": "sha512-zb/1OuZ6flOlH6tQyMPUrE3x3Ulxjlo9WIVXR4yVYi4H9UXQaeIsPbLn2R3O3vQCnDKkAl2qHiuocKKX4Tz/Sw==", "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==",
"dev": true "dev": true,
"requires": {
"queue-microtask": "^1.2.2"
}
}, },
"rxjs": { "rxjs": {
"version": "6.6.3", "version": "6.6.3",
@ -1164,12 +1070,12 @@
} }
}, },
"supports-color": { "supports-color": {
"version": "7.2.0", "version": "6.1.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz",
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==",
"dev": true, "dev": true,
"requires": { "requires": {
"has-flag": "^4.0.0" "has-flag": "^3.0.0"
} }
}, },
"thenify": { "thenify": {
@ -1235,12 +1141,63 @@
"rollup": "^2.38.0", "rollup": "^2.38.0",
"rollup-plugin-dts": "^2.0.1", "rollup-plugin-dts": "^2.0.1",
"sucrase": "^3.17.0" "sucrase": "^3.17.0"
},
"dependencies": {
"ansi-styles": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"dev": true,
"requires": {
"color-convert": "^2.0.1"
}
},
"chalk": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
"integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
"dev": true,
"requires": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
}
},
"color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"requires": {
"color-name": "~1.1.4"
}
},
"color-name": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true
},
"has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true
},
"supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"dev": true,
"requires": {
"has-flag": "^4.0.0"
}
}
} }
}, },
"typescript": { "typescript": {
"version": "4.1.3", "version": "4.1.5",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.1.3.tgz", "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.1.5.tgz",
"integrity": "sha512-B3ZIOf1IKeH2ixgHhj6la6xdwR9QrLC5d1VKeCSY4tvkqhF2eqd9O7txNlS0PO3GrBAFIdr3L1ndNwteUbZLYg==", "integrity": "sha512-6OSu9PTIzmn9TCDiovULTnET6BgXtDYL4Gg4szY+cGsc3JP1dQL8qvE8kShTRx1NIw4Q9IBHlwODjkjWEtMUyA==",
"dev": true "dev": true
}, },
"validate-npm-package-license": { "validate-npm-package-license": {
@ -1254,25 +1211,16 @@
} }
}, },
"vite": { "vite": {
"version": "2.0.0-beta.65", "version": "2.0.0-beta.69",
"resolved": "https://registry.npmjs.org/vite/-/vite-2.0.0-beta.65.tgz", "resolved": "https://registry.npmjs.org/vite/-/vite-2.0.0-beta.69.tgz",
"integrity": "sha512-mdHNTP6fGeb8m8lWAM3UbSPw1+un1lUv0i4MQJcNiK2/P01RHIY02VjQeXBv3NemkExkgLji88LN9ySFMUQpIw==", "integrity": "sha512-Wf4bWOK/b6Q+06Wyk7uJIBy/LiENGx26do6tn9gOMRRZLEuLizN/cDzGqnQkGVVevbb18xdilyxhnTes0lFjZg==",
"dev": true, "dev": true,
"requires": { "requires": {
"esbuild": "^0.8.34", "esbuild": "^0.8.34",
"fsevents": "~2.1.2", "fsevents": "~2.3.1",
"postcss": "^8.2.1", "postcss": "^8.2.1",
"resolve": "^1.19.0", "resolve": "^1.19.0",
"rollup": "^2.35.1" "rollup": "^2.38.5"
},
"dependencies": {
"fsevents": {
"version": "2.1.3",
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz",
"integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==",
"dev": true,
"optional": true
}
} }
}, },
"which-module": { "which-module": {
@ -1290,32 +1238,6 @@
"ansi-styles": "^3.2.0", "ansi-styles": "^3.2.0",
"string-width": "^3.0.0", "string-width": "^3.0.0",
"strip-ansi": "^5.0.0" "strip-ansi": "^5.0.0"
},
"dependencies": {
"ansi-styles": {
"version": "3.2.1",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
"integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
"dev": true,
"requires": {
"color-convert": "^1.9.0"
}
},
"color-convert": {
"version": "1.9.3",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
"integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
"dev": true,
"requires": {
"color-name": "1.1.3"
}
},
"color-name": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
"integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
"dev": true
}
} }
}, },
"wrappy": { "wrappy": {

View file

@ -1,17 +1,19 @@
{ {
"name": "vite-plugin-typescript-starter", "name": "vite-plugin-package-version",
"license": "MIT", "license": "MIT",
"description": "typescript starter for vite plugins", "description": "vite plugin to load package version into env",
"version": "0.0.1", "version": "0.0.1",
"keywords": [ "keywords": [
"vite", "vite",
"typescript", "typescript",
"starter" "package",
"version",
"environment"
], ],
"author": "Simon Haugen", "author": "Simon Haugen",
"repository": { "repository": {
"type": "git", "type": "git",
"url": "git+https://github.com/smnhgn/vite-plugin-typescript-starter.git" "url": "git+https://github.com/smnhgn/vite-plugin-package-version.git"
}, },
"main": "dist/index.js", "main": "dist/index.js",
"scripts": { "scripts": {

View file

@ -2,7 +2,7 @@ import { Plugin } from 'vite';
export const ViteStarter = (): Plugin => { export const ViteStarter = (): Plugin => {
return { return {
name: 'vite-plugin-typescript-starter', name: 'vite-plugin-package-version',
// plugin code: https://vitejs.dev/guide/api-plugin.html // plugin code: https://vitejs.dev/guide/api-plugin.html
}; };
}; };