Skip to content

Commit

Permalink
chore: minify
Browse files Browse the repository at this point in the history
  • Loading branch information
FliPPeDround committed Jul 11, 2023
1 parent 1f3fa53 commit cafc6d7
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 7 deletions.
1 change: 1 addition & 0 deletions scripts/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ await esbuild.build({
format: 'cjs',
platform: 'node',
target: 'node14',
minify: true,
})
8 changes: 4 additions & 4 deletions src/question/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default (): PromptObject<string>[] => {
{
name: 'needsJsx',
type: 'toggle',
message: '添加JSX?(不支持小程序平台)',
message: `添加JSX?${dim('(不支持小程序平台)')}`,
initial: false,
active: 'Yes',
inactive: 'No',
Expand Down Expand Up @@ -54,17 +54,17 @@ export default (): PromptObject<string>[] => {
message: '选择ESlint风格?',
choices: [
{
title: 'default',
title: 'Default',
description: 'Default',
value: 'default',
},
{
title: 'airbnb',
title: 'Airbnb',
description: `Airbnb ${dim('(https://airbnb.io/javascript/)')}`,
value: 'airbnb',
},
{
title: 'standard',
title: 'Standard',
description: `Standard ${dim('(https://standardjs.com/)')}`,
value: 'standard',
},
Expand Down
5 changes: 4 additions & 1 deletion src/question/name.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,16 @@ export default (): PromptObject<string>[] => {
},
{
name: 'shouldOverwrite',
type: () => (canSkipEmptying(targetDir) ? null : 'confirm'),
type: () => (canSkipEmptying(targetDir) ? null : 'toggle'),
message: () => {
const dirForPrompt
= targetDir === '.' ? '当前文件' : `目标文件"${targetDir}"`

return `${dirForPrompt}不是空的。要删除现有文件并继续吗?`
},
initial: false,
active: 'Yes',
inactive: 'No',
},
{
name: 'overwriteChecker',
Expand Down
2 changes: 1 addition & 1 deletion src/question/template/templateDate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import type { TemplateList } from './type'

export const templateList: TemplateList[] = [
{
title: `vitesse-uni-app(${bold('推荐')})`,
title: `vitesse-uni-app${dim('(推荐)')}`,
description: `由${green('Uni Helper')}${dim('(https://github.com/uni-helper)')}维护的快速启动模板`,
value: {
type: 'vitesse',
Expand Down
1 change: 0 additions & 1 deletion src/utils/renderLint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ export function renderLint(root: string, lint: LintConfig) {
if (!lint.eslint)
return

console.log(lint.style)
const { pkg, files } = createESLintConfig({
vueVersion: '3.x',
styleGuide: lint.style,
Expand Down

0 comments on commit cafc6d7

Please sign in to comment.