Skip to content

Commit 2203e17

Browse files
feat(analytics): Track Vue.js project type
Currently CLI tracks Angular, TypeScript and JavaScript project types. Add a new project category - `Vue.js`. The project will be tracked as `Vue.js` when it has nativscript-vue in the package.json.
1 parent 2c708a2 commit 2203e17

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

lib/project-data.ts

+4
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ export class ProjectData implements IProjectData {
2222
type: "Angular",
2323
requiredDependencies: ["@angular/core", "nativescript-angular"]
2424
},
25+
{
26+
type: "Vue.js",
27+
requiredDependencies: ["nativescript-vue"]
28+
},
2529
{
2630
type: "Pure TypeScript",
2731
requiredDependencies: ["typescript", "nativescript-dev-typescript"]

test/project-data.ts

+8
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,14 @@ describe("projectData", () => {
6464
assertProjectType({ "nativescript-angular": "*" }, null, "Angular");
6565
});
6666

67+
it("detects project as Vue.js when nativescript-vue exists as dependency", () => {
68+
assertProjectType({ "nativescript-vue": "*" }, null, "Vue.js");
69+
});
70+
71+
it("detects project as Vue.js when nativescript-vue exists as dependency and typescript is devDependency", () => {
72+
assertProjectType({ "nativescript-vue": "*" }, { "typescript": "*" }, "Vue.js");
73+
});
74+
6775
it("detects project as TypeScript when nativescript-dev-typescript exists as dependency", () => {
6876
assertProjectType(null, { "nativescript-dev-typescript": "*" }, "Pure TypeScript");
6977
});

0 commit comments

Comments
 (0)