mirror of
https://github.com/vuejs/vue-cli.git
synced 2026-05-12 14:58:26 -05:00
@@ -1,9 +1,14 @@
|
||||
<template>
|
||||
<div class="home">
|
||||
<img src="../assets/logo.png">
|
||||
<%_ if (!rootOptions.bare) { _%>
|
||||
<HelloWorld msg="Welcome to Your Vue.js App"/>
|
||||
<%_ } else { _%>
|
||||
<h1>Welcome to Your Vue.js App</h1>
|
||||
<%_ } _%>
|
||||
</div>
|
||||
</template>
|
||||
<%_ if (!rootOptions.bare) { _%>
|
||||
|
||||
<script>
|
||||
// @ is an alias to /src
|
||||
@@ -16,3 +21,4 @@ export default {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<%_ } _%>
|
||||
|
||||
@@ -2,9 +2,14 @@
|
||||
<template>
|
||||
<div id="app">
|
||||
<img src="./assets/logo.png">
|
||||
<%_ if (!rootOptions.bare) { _%>
|
||||
<HelloWorld msg="Welcome to Your Vue.js App"/>
|
||||
<%_ } else { _%>
|
||||
<h1>Welcome to Your Vue.js App</h1>
|
||||
<%_ } _%>
|
||||
</div>
|
||||
</template>
|
||||
<%_ if (!rootOptions.bare) { _%>
|
||||
|
||||
<script>
|
||||
import HelloWorld from './components/HelloWorld.vue'
|
||||
@@ -16,6 +21,7 @@ export default {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<%_ } _%>
|
||||
<%_ } else { _%>
|
||||
<template>
|
||||
<div id="app">
|
||||
@@ -27,8 +33,9 @@ export default {
|
||||
</div>
|
||||
</template>
|
||||
<%_ } _%>
|
||||
|
||||
<%_ if (!rootOptions.bare) { _%>
|
||||
<%_ if (rootOptions.cssPreprocessor !== 'stylus') { _%>
|
||||
|
||||
<style<%-
|
||||
rootOptions.cssPreprocessor
|
||||
? ` lang="${
|
||||
@@ -99,3 +106,4 @@ export default {
|
||||
<%_ } _%>
|
||||
</style>
|
||||
<%_ } _%>
|
||||
<%_ } _%>
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
<%_ if (!rootOptions.bare) { _%>
|
||||
<template>
|
||||
<div class="hello">
|
||||
<h1>{{ msg }}</h1>
|
||||
@@ -83,3 +84,4 @@ a
|
||||
color #42b983
|
||||
</style>
|
||||
<%_ } _%>
|
||||
<%_ } _%>
|
||||
|
||||
@@ -54,6 +54,7 @@ program
|
||||
.option('-f, --force', 'Overwrite target directory if it exists')
|
||||
.option('-c, --clone', 'Use git clone when fetching remote preset')
|
||||
.option('-x, --proxy', 'Use specified proxy when creating project')
|
||||
.option('-b, --bare', 'Scaffold project without beginner instructions')
|
||||
.action((name, cmd) => {
|
||||
const options = cleanArgs(cmd)
|
||||
// --no-git makes commander to default git to true
|
||||
|
||||
@@ -87,6 +87,7 @@ module.exports = class Creator extends EventEmitter {
|
||||
preset = cloneDeep(preset)
|
||||
// inject core service
|
||||
preset.plugins['@vue/cli-service'] = Object.assign({
|
||||
bare: cliOptions.bare,
|
||||
projectName: name
|
||||
}, preset)
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ const { createSchema, validate } = require('@vue/cli-shared-utils/lib/validate')
|
||||
const rcPath = exports.rcPath = getRcPath('.vuerc')
|
||||
|
||||
const presetSchema = createSchema(joi => joi.object().keys({
|
||||
bare: joi.boolean(),
|
||||
useConfigFiles: joi.boolean(),
|
||||
router: joi.boolean(),
|
||||
routerHistoryMode: joi.boolean(),
|
||||
|
||||
Reference in New Issue
Block a user