npm create vue@latest
pnpm i
项目基础架子
查看npm下载源:
npm config get registry
设置npm官方下载源
npm config set registry https://registry.npmjs.org
全程参与了 - 把控/管控App的生命周期
细分周期
除了已有的基础架子之外,还要在这基础上再加一些规范化的产物
scripts:{
...
"lint:style":"stylelint \"src/**/*.{vue,css}\" --fix",
"spellcheck":"cspell \"src/**/*.{vue,ts,tsx}\""
}
"devDependencies": {
"stylelint":"16.2.1",
"cspell":"8.6.0"
}
创建cpell.json文件:
创建custom-words.txt
{
"import": ["@cspell/dict-lorem-ipsum/cspell-ext.json"],
"caseSensitive": false,
"dictionaries": ["custom-words"],
"dictionaryDefinitions": [
{
"name": "custom-words",
"path": "./.cspell/custom-words.txt",
"addWords": true
}
],
"ignorePaths": ["**/node_modules/**", "**/dist/**", "**/lib/**", "**/docs/**", "**/stats.html","**/detect.ts"]
}
byelide
pinia
rushstack
stylelint
固定版本:版本前面"^"符号去掉:
版本统一:
package.json:
{
"name": "byelide",
"version": "0.0.0",
"private": true,
"type": "module",
"scripts": {
"dev": "vite",
"build": "run-p type-check \"build-only {@}\" --",
"preview": "vite preview",
"test:unit": "vitest"