Skip to content

Commit 8d7f8d2

Browse files
author
Elena Hristova
committed
feat: add vue tabs navigation template to create project command
1 parent 528fc24 commit 8d7f8d2

File tree

3 files changed

+14
-9
lines changed

3 files changed

+14
-9
lines changed

docs/man_pages/project/creation/create.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ Template | Command
5353
`Angular - Tabs` | tns create --template tns-template-tab-navigation-ng
5454
`Vue.js - Blank`, `--vue`, `--vuejs` | tns create --template tns-template-blank-vue
5555
`Vue.js - SideDrawer`, | tns create --template tns-template-drawer-navigation-vue
56+
`Vue.js - Tabs` | tns create --template tns-template-tab-navigation-vue
5657

5758
### Related Commands
5859

lib/commands/create-project.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,11 @@ or --js flags.)
210210
key: CreateProjectCommand.DrawerTemplateKey,
211211
value: "tns-template-drawer-navigation-vue",
212212
description: CreateProjectCommand.DrawerTemplateDescription
213+
},
214+
{
215+
key: CreateProjectCommand.TabsTemplateKey,
216+
value: "tns-template-tab-navigation-vue",
217+
description: CreateProjectCommand.TabsTemplateDescription
213218
}];
214219

215220
return templates;

test/project-commands.ts

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,14 @@ const expectedFlavorChoices = [
1818
{ key: "Plain TypeScript", description: "Learn more at https://nativescript.org/typescript" },
1919
{ key: "Plain JavaScript", description: "Use NativeScript without any framework" }
2020
];
21-
const expectedTemplateChoices = [
22-
{ key: "Hello World", description: "A Hello World app" },
23-
{ key: "SideDrawer", description: "An app with pre-built pages that uses a drawer for navigation" },
24-
{ key: "Tabs", description: "An app with pre-built pages that uses tabs for navigation" }
25-
];
26-
const expectedTemplateChoicesVue = [
27-
{ key: "Blank", description: "A blank app" },
28-
{ key: "SideDrawer", description: "An app with pre-built pages that uses a drawer for navigation" }
29-
];
21+
const templateChoises = {
22+
helloWorld: { key: "Hello World", description: "A Hello World app" },
23+
blank: { key: "Blank", description: "A blank app" },
24+
sideDrawer: { key: "SideDrawer", description: "An app with pre-built pages that uses a drawer for navigation" },
25+
tabs: { key: "Tabs", description: "An app with pre-built pages that uses tabs for navigation" }
26+
};
27+
const expectedTemplateChoices = [templateChoises.helloWorld, templateChoises.sideDrawer, templateChoises.tabs];
28+
const expectedTemplateChoicesVue = [templateChoises.blank, templateChoises.sideDrawer, templateChoises.tabs];
3029

3130
class ProjectServiceMock implements IProjectService {
3231
async validateProjectName(opts: { projectName: string, force: boolean, pathToProject: string }): Promise<string> {

0 commit comments

Comments
 (0)