Skip to content

Commit

Permalink
feat: 优化fs参数
Browse files Browse the repository at this point in the history
  • Loading branch information
novlan1 committed Sep 19, 2022
1 parent 2a9b856 commit 175de98
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 23 deletions.
40 changes: 20 additions & 20 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
{
// 以下程序用于格式化Vue项目,其他项目可以根据原理一通百通。
// 设置保存时格式化。只用于用于格式化css/less程序
"editor.formatOnSave": true,
"javascript.format.enable": false,
"typescript.format.enable": false,
// 关闭vetur的js/ts/html的formatter。html用eslint-plugin-vue格式化。
// js/ts程序用eslint,防止vetur中的prettier与eslint格式化冲突
"vetur.format.defaultFormatter.html": "none",
"vetur.format.defaultFormatter.js": "none",
"vetur.format.defaultFormatter.ts": "none",
"vetur.format.defaultFormatter.css": "none",
"vetur.format.defaultFormatter.scss": "none",
// 开启eslint自动修复js/ts功能
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"cSpell.words": [
"wecom"
],
}
// 以下程序用于格式化Vue项目,其他项目可以根据原理一通百通。
// 设置保存时格式化。只用于用于格式化css/less程序
"editor.formatOnSave": true,
"javascript.format.enable": false,
"typescript.format.enable": false,
// 关闭vetur的js/ts/html的formatter。html用eslint-plugin-vue格式化。
// js/ts程序用eslint,防止vetur中的prettier与eslint格式化冲突
"vetur.format.defaultFormatter.html": "none",
"vetur.format.defaultFormatter.js": "none",
"vetur.format.defaultFormatter.ts": "none",
"vetur.format.defaultFormatter.css": "none",
"vetur.format.defaultFormatter.scss": "none",
// 开启eslint自动修复js/ts功能
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"cSpell.words": [
"wecom"
],
}
6 changes: 3 additions & 3 deletions src/version-tip/gen-version-tip.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
async function generatePublishInfo({
fs,
version: targetVersion,
repoLink,
appName,
homepage,
issueLink,
readmeFilePath,
}) {
// eslint-disable-next-line global-require
const fs = require('fs')
if (!fs.existsSync(readmeFilePath)) {
console.log(
'\x1b[33m%s\x1b[0m',
Expand Down Expand Up @@ -47,7 +48,7 @@ async function generatePublishInfo({
return content
}

export function genVersionTip({ readmeFilePath, appInfo, fs }) {
export function genVersionTip({ readmeFilePath, appInfo }) {
const { name: appName, version, homepage = '', bugs, repository } = appInfo

// const repoName = '';
Expand All @@ -68,6 +69,5 @@ export function genVersionTip({ readmeFilePath, appInfo, fs }) {
homepage,
issueLink,
readmeFilePath,
fs,
})
}

0 comments on commit 175de98

Please sign in to comment.