Nativescript-cli: Add tracking for both React NativeScript and Svelte Native projects

Created on 13 Aug 2019  路  5Comments  路  Source: NativeScript/nativescript-cli

We should start tracking usage of the new community-driven React NativeScript and Svelte Native initiatives in the CLI.

feature

Most helpful comment

Not sure if this is the best place for it, but either way, here's a starter template for React NativeScript. The commit history shows how I built it following tns create mycoolapp --tsc.

It follows the steps of https://github.com/shirakaba/react-nativescript#setup exactly, except for the fact that I've pinned the installed dependency versions.

https://github.com/shirakaba/react-nativescript-starter

All 5 comments

Let's track those as "React" and "Svelte" respectively.

Acceptance Criteria:

  • [x] Projects created as described in https://github.com/shirakaba/react-nativescript#setup should be tracked as "React"
  • [x] Projects created as described in https://svelte-native.technology/ should be tracked as "Svelte"
  • [x] JS or TS projects (without nativescript-angular or nativescript-vue in them) should be tracked as React after npm install react-nativescript --save is executed.
  • [x] JS or TS projects (without nativescript-angular or nativescript-vue in them) should be tracked as Svelte after npm install svelte-native --save is executed.
  • [x] Project which is tracked as React or Svelte should be available for tns update command, i.e. when you execute the tns update in such project, it should pass and update your tns-core-modules, runtimes and nativescript-dev-webpack versions.

NOTE: You can check how CLI tracks each project by checking the cd2 value in the analyticsLogFile, i.e.:

tns usage-reporting enable
tns prepare <platform> --analyticsLogFile analyticsData.txt

After command exits check the analyticsData.txt file and search for:

Setting custom dimension cd2 to value Svelte

or

Setting custom dimension cd2 to value React

Not sure if this is the best place for it, but either way, here's a starter template for React NativeScript. The commit history shows how I built it following tns create mycoolapp --tsc.

It follows the steps of https://github.com/shirakaba/react-nativescript#setup exactly, except for the fact that I've pinned the installed dependency versions.

https://github.com/shirakaba/react-nativescript-starter

Hey Jamie, that's great! I will open a separate issue to keep this issue focused on tracking.

When use command tns update and run
tns usage-reporting enable
tns prepare <platform> --analyticsLogFile analyticsData.txt
You will see exception with update of webpack

Was this page helpful?
0 / 5 - 0 ratings

Related issues

trodellez picture trodellez  路  3Comments

donker picture donker  路  3Comments

bradmartin picture bradmartin  路  3Comments

NickIliev picture NickIliev  路  3Comments

Anilinfo2015 picture Anilinfo2015  路  3Comments