Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wip #1

Closed
wants to merge 1 commit into from
Closed
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
2 changes: 2 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ jobs:
node-version: "20"
- name: Install dependencies
run: npm ci
- name: Linting
run: npm run lint
- name: Build
run: npm run build
env:
Expand Down
215 changes: 215 additions & 0 deletions package-lock.json

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

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"preview": "vite preview",
"test": "vitest run",
"test:cov": "vitest run --coverage",
"test:watch": "vitest watch --coverage"
"test:watch": "vitest watch --coverage",
"lint": "vite-plugin-linter"
},
"devDependencies": {
"@vitest/coverage-istanbul": "^1.4.0",
Expand All @@ -24,6 +25,7 @@
"typescript": "^5.0.3",
"vite": "^4.5.0",
"vite-plugin-fs": "^0.4.4",
"vite-plugin-linter": "^2.1.1",
"vitest": "^1.4.0",
"vitest-canvas-mock": "^0.3.3"
},
Expand Down
10 changes: 7 additions & 3 deletions vite.config.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
import { defineConfig } from 'vite';
import {EsLinter, linterPlugin, TypeScriptLinter} from "vite-plugin-linter";
// import fs from 'vite-plugin-fs';

export default defineConfig(({ mode }) => {
export default defineConfig(configEnv => {
return {
plugins: [/*fs()*/],
plugins: [linterPlugin({
include: ["./src/**/*.ts", "./src/**/*.tsx"],
linters: [new EsLinter({ configEnv: configEnv }), new TypeScriptLinter()],
})],
server: { host: '0.0.0.0', port: 8000 },
clearScreen: false,
build: {
minify: 'esbuild',
sourcemap: false
},
esbuild: {
pure: mode === 'production' ? [ 'console.log' ] : [],
pure: configEnv.mode === 'production' ? [ 'console.log' ] : [],
keepNames: true,
},
}
Expand Down
Loading