mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
chore(create-app): prettier codes
This commit is contained in:
parent
1691451813
commit
9993bb16aa
@ -1,3 +1,3 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
presets: ['@vant/cli/preset']
|
presets: ['@vant/cli/preset'],
|
||||||
};
|
};
|
||||||
|
@ -12,9 +12,9 @@ export default {
|
|||||||
color: String,
|
color: String,
|
||||||
type: {
|
type: {
|
||||||
type: String,
|
type: String,
|
||||||
default: 'primary'
|
default: 'primary',
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -5,8 +5,8 @@ module.exports = {
|
|||||||
preprocessor: '<%= preprocessor %>',
|
preprocessor: '<%= preprocessor %>',
|
||||||
},
|
},
|
||||||
site: {
|
site: {
|
||||||
publicPath: '/<%= name %>/'
|
publicPath: '/<%= name %>/',
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
site: {
|
site: {
|
||||||
title: '<%= name %>',
|
title: '<%= name %>',
|
||||||
@ -17,23 +17,23 @@ module.exports = {
|
|||||||
items: [
|
items: [
|
||||||
{
|
{
|
||||||
path: 'home',
|
path: 'home',
|
||||||
title: '介绍'
|
title: '介绍',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'quickstart',
|
path: 'quickstart',
|
||||||
title: '快速上手'
|
title: '快速上手',
|
||||||
}
|
},
|
||||||
]
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '基础组件',
|
title: '基础组件',
|
||||||
items: [
|
items: [
|
||||||
{
|
{
|
||||||
path: 'demo-button',
|
path: 'demo-button',
|
||||||
title: 'DemoButton 按钮'
|
title: 'DemoButton 按钮',
|
||||||
}
|
},
|
||||||
]
|
],
|
||||||
}
|
},
|
||||||
]
|
],
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
|
@ -10,23 +10,23 @@ const PROMPTS = [
|
|||||||
name: 'preprocessor',
|
name: 'preprocessor',
|
||||||
message: 'Select css preprocessor',
|
message: 'Select css preprocessor',
|
||||||
type: 'list',
|
type: 'list',
|
||||||
choices: ['Less', 'Sass']
|
choices: ['Less', 'Sass'],
|
||||||
}
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
export class VanGenerator extends Generator {
|
export class VanGenerator extends Generator {
|
||||||
inputs = {
|
inputs = {
|
||||||
name: '',
|
name: '',
|
||||||
cssLang: '',
|
cssLang: '',
|
||||||
preprocessor: ''
|
preprocessor: '',
|
||||||
};
|
};
|
||||||
|
|
||||||
constructor(name: string) {
|
constructor(name: string) {
|
||||||
super([], {
|
super([], {
|
||||||
env: {
|
env: {
|
||||||
cwd: join(CWD, name)
|
cwd: join(CWD, name),
|
||||||
},
|
},
|
||||||
resolved: GENERATOR_DIR
|
resolved: GENERATOR_DIR,
|
||||||
});
|
});
|
||||||
|
|
||||||
this.inputs.name = name;
|
this.inputs.name = name;
|
||||||
@ -76,7 +76,7 @@ export class VanGenerator extends Generator {
|
|||||||
npm: false,
|
npm: false,
|
||||||
bower: false,
|
bower: false,
|
||||||
yarn: true,
|
yarn: true,
|
||||||
skipMessage: true
|
skipMessage: true,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8,8 +8,8 @@ const PROMPTS = [
|
|||||||
{
|
{
|
||||||
type: 'input',
|
type: 'input',
|
||||||
name: 'name',
|
name: 'name',
|
||||||
message: 'Your package name'
|
message: 'Your package name',
|
||||||
}
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
export default async function run() {
|
export default async function run() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user