mirror of
https://github.com/element-plus/element-plus.git
synced 2026-03-13 07:51:17 +08:00
chore(project): add vite init & update vite config with ts (#3519)
This commit is contained in:
@@ -34,7 +34,7 @@
|
||||
"docs:gen-locale": "rimraf docs/.vitepress/i18n && esno build/crowdin-generate.ts",
|
||||
"docs:crowdin": "esno build/crowdin-credentials.ts",
|
||||
"prepare": "husky install",
|
||||
"postinstall": "yarn gen:version && cp play/play.example play/play.vue"
|
||||
"postinstall": "yarn gen:version"
|
||||
},
|
||||
"config": {
|
||||
"commitizen": {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import './vite.init'
|
||||
import { defineConfig } from 'vite'
|
||||
import vue from '@vitejs/plugin-vue'
|
||||
|
||||
8
play/vite.init.ts
Normal file
8
play/vite.init.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
import { existsSync, writeFileSync, readFileSync } from 'fs'
|
||||
|
||||
const play = 'play.vue'
|
||||
const example = 'play.example'
|
||||
|
||||
if (!existsSync(play)) {
|
||||
writeFileSync(play, readFileSync(example))
|
||||
}
|
||||
Reference in New Issue
Block a user