-
-
Notifications
You must be signed in to change notification settings - Fork 197
Add tracking for the project types that users are creating and working with #2492
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Add tracking from which template a project is created. This will give us better picture of the usage of CLI and the types of projects that the users are creating.
|
||
version = data[1]; | ||
|
||
templateName = constants.RESERVED_TEMPLATE_NAMES[name.toLowerCase()] || name; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing case when template is case sensitive folder.
If the developer uses App
as originalTemplateName
and then uses app
these can be two different apps. I'm OK with us not supporting this scenario, and either way there aren't such tests, but thought you should know.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In fact the case is handled - when originalTemplateName
is app
, the name
variable will be set to app
.
At this point templateName
will be set to app
.
At another point, when user passes --template App
, originalTemplateName
will be set to App
, the name
variable will be set to App
and the templateName
will be set to App
again.
test/project-service.ts
Outdated
@@ -153,7 +154,7 @@ describe("Project Service Tests", () => { | |||
"readme": "dummy", | |||
"repository": "dummy" | |||
}); | |||
npmInstallationManager.install("tns-template-hello-world", defaultTemplateDir, {dependencyType: "save"}).wait(); | |||
npmInstallationManager.install("tns-template-hello-world", defaultTemplateDir, { dependencyType: "save" }).wait(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can use constants.RESERVED_TEMPLATE_NAMES["default"]
instead of "tns-template-hello-world"
d140234
to
2bb936c
Compare
lib/services/platform-service.ts
Outdated
if (this.$projectData && (this.$projectData.projectFilePath !== this._trackedProjectFilePath)) { | ||
this._trackedProjectFilePath = this.$projectData.projectFilePath; | ||
|
||
this.$analyticsService.track("Working with project type", this.$projectData.projectType); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing .wait()
here
Track the project type (Angular, Pure TypeScript, Pure JavaScript) when any of the commands is executed: * prepare * deploy * run * livesync This will allow us to better understand the type of projects that the users are building.
2bb936c
to
7813962
Compare
test/project-service.ts
Outdated
@@ -166,7 +167,7 @@ describe("Project Service Tests", () => { | |||
"readme": "dummy", | |||
"repository": "dummy" | |||
}); | |||
npmInstallationManager.install("tns-template-hello-world", defaultSpecificVersionTemplateDir, {version: "1.4.0", dependencyType: "save"}).wait(); | |||
npmInstallationManager.install("tns-template-hello-world", defaultSpecificVersionTemplateDir, { version: "1.4.0", dependencyType: "save" }).wait(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can use constants.RESERVED_TEMPLATE_NAMES["default"] instead of "tns-template-hello-world"
Track from which template a project is created
Add tracking from which template a project is created. This will give us better picture of the usage of CLI and the types of projects that the users are creating.
Track project type when deploy/run/livesync is executed …
Track the project type (Angular, TypeScript, JavaScript) when any of the commands is executed:
This will allow us to better understand the type of projects that the users are building.
Implements #2478