Skip to content
This repository was archived by the owner on Jun 14, 2024. It is now read-only.

feat: support custom vite config #20

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file modified .commitlintrc.js
100644 → 100755
Empty file.
Empty file modified .eslintignore
100644 → 100755
Empty file.
Empty file modified .eslintrc.js
100644 → 100755
Empty file.
Empty file modified .github/CODEOWNERS
100644 → 100755
Empty file.
Empty file modified .github/workflows/lint.yml
100644 → 100755
Empty file.
Empty file modified .github/workflows/semantic-release.yml
100644 → 100755
Empty file.
Empty file modified .gitignore
100644 → 100755
Empty file.
Empty file modified .husky/.gitignore
100644 → 100755
Empty file.
Empty file modified .lintstagedrc.js
100644 → 100755
Empty file.
Empty file modified .prettierignore
100644 → 100755
Empty file.
Empty file modified .releaserc.js
100644 → 100755
Empty file.
Empty file modified CHANGELOG.md
100644 → 100755
Empty file.
Empty file modified LICENSE.md
100644 → 100755
Empty file.
Empty file modified README.md
100644 → 100755
Empty file.
Empty file modified examples/react/index.html
100644 → 100755
Empty file.
Empty file modified examples/react/package.json
100644 → 100755
Empty file.
Empty file modified examples/react/src/App.css
100644 → 100755
Empty file.
Empty file modified examples/react/src/App.jsx
100644 → 100755
Empty file.
Empty file modified examples/react/src/App.test.jsx
100644 → 100755
Empty file.
Empty file modified examples/react/src/favicon.svg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified examples/react/src/index.css
100644 → 100755
Empty file.
Empty file modified examples/react/src/logo.svg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified examples/react/src/main.jsx
100644 → 100755
Empty file.
Empty file modified examples/react/vite.config.js
100644 → 100755
Empty file.
Empty file modified examples/react/web-test-runner.config.js
100644 → 100755
Empty file.
Empty file modified examples/svelte/index.html
100644 → 100755
Empty file.
Empty file modified examples/svelte/jsconfig.json
100644 → 100755
Empty file.
Empty file modified examples/svelte/package.json
100644 → 100755
Empty file.
Empty file modified examples/svelte/public/favicon.ico
100644 → 100755
Empty file.
Empty file modified examples/svelte/src/App.svelte
100644 → 100755
Empty file.
Empty file modified examples/svelte/src/App.test.js
100644 → 100755
Empty file.
Empty file modified examples/svelte/src/assets/svelte.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified examples/svelte/src/global.d.ts
100644 → 100755
Empty file.
Empty file modified examples/svelte/src/lib/Counter.svelte
100644 → 100755
Empty file.
Empty file modified examples/svelte/src/main.js
100644 → 100755
Empty file.
Empty file modified examples/svelte/vite.config.js
100644 → 100755
Empty file.
Empty file modified examples/svelte/web-test-runner.config.js
100644 → 100755
Empty file.
Empty file modified examples/vue/index.html
100644 → 100755
Empty file.
Empty file modified examples/vue/package.json
100644 → 100755
Empty file.
Empty file modified examples/vue/public/favicon.ico
100644 → 100755
Empty file.
Empty file modified examples/vue/src/App.test.js
100644 → 100755
Empty file.
Empty file modified examples/vue/src/App.vue
100644 → 100755
Empty file.
Empty file modified examples/vue/src/assets/logo.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified examples/vue/src/components/HelloWorld.vue
100644 → 100755
Empty file.
Empty file modified examples/vue/src/main.js
100644 → 100755
Empty file.
Empty file modified examples/vue/vite.config.js
100644 → 100755
Empty file.
Empty file modified examples/vue/web-test-runner.config.js
100644 → 100755
Empty file.
3 changes: 2 additions & 1 deletion index.js
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const vite = require("vite");

module.exports = function () {
module.exports = function (viteConfig) {
let server;

return {
Expand All @@ -9,6 +9,7 @@ module.exports = function () {
async serverStart({ app }) {
server = await vite.createServer({
clearScreen: false,
...viteConfig,
});
await server.listen();
const port = server.config.server.port;
Expand Down
Empty file modified package-lock.json
100644 → 100755
Empty file.
24 changes: 12 additions & 12 deletions package.json
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vite-web-test-runner-plugin",
"version": "0.0.0-semantic-release",
"version": "0.0.1-semantic-release",
"main": "index.js",
"license": "MIT",
"scripts": {
Expand All @@ -12,20 +12,20 @@
"semantic-release": "semantic-release"
},
"devDependencies": {
"@commitlint/cli": "^12.1.4",
"@commitlint/config-conventional": "^12.1.4",
"@semantic-release/changelog": "^5.0.1",
"@semantic-release/git": "^9.0.0",
"@web/test-runner": "^0.12.20",
"eslint": "^7.29.0",
"husky": "^6.0.0",
"@commitlint/cli": "^17.1.2",
"@commitlint/config-conventional": "^17.1.0",
"@semantic-release/changelog": "^6.0.1",
"@semantic-release/git": "^10.0.1",
"@web/test-runner": "^0.14.1",
"eslint": "^8.25.0",
"husky": "^8.0.1",
"is-ci": "^3.0.0",
"lint-staged": "^11.0.0",
"lint-staged": "^13.0.3",
"prettier": "^2.2.1",
"semantic-release": "^17.4.4"
"semantic-release": "^19.0.5"
},
"peerDependencies": {
"vite": "2.x"
"vite": "^3.x"
},
"files": [
"index.js",
Expand All @@ -35,4 +35,4 @@
"type": "git",
"url": "https://github.com/material-svelte/vite-web-test-runner-plugin.git"
}
}
}
Loading