Skip to content

Commit 825dc2e

Browse files
committed
Update prompt.js
Remove web based items from package.json when Native Only
1 parent 224ea12 commit 825dc2e

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

generator/index.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,16 @@ module.exports = (api, options, rootOptions) => {
9292
delete pkg.scripts['serve'],
9393
delete pkg.scripts['build']
9494

95+
if(options.isNativeOnly) {
96+
delete pkg.dependencies['vue']
97+
delete pkg.devDependencies['vue-template-compiler']
98+
delete pkg.browserslist
99+
}
100+
95101
})
96102

103+
104+
97105
console.log('doing template rendering');
98106

99107
// use the answer from the invoke prompt and if it's a new project use the new template

prompts.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Example: com.company.app`
2929
name: 'isNewProject',
3030
type: 'confirm',
3131
message: 'Is this a brand new project? (Default: No)',
32-
default: true
32+
default: false
3333
},
3434
{
3535
name: 'isNativeOnly',

0 commit comments

Comments
 (0)