Skip to content

fix: remove keys from package.json after project is created #3791

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

Merged
merged 1 commit into from
Aug 3, 2018

Conversation

rosen-vladimirov
Copy link
Contributor

Remove confusing keys from project's package.json when Template v2 is used. Remove name and version as the users may decide we will use the values to set project name and version of the application.

PR Checklist

What is the current behavior?

After project is created and template v2 is used, the package.json contains a lot of confusing and unneeded keys:

{
  "nativescript": {
    "id": "org.nativescript.app7",
    "tns-android": {
      "version": "4.1.3"
    },
    "tns-ios": {
      "version": "4.1.1"
    }
  },
  "name": "tns-template-master-detail-ng",
  "displayName": "Master-Detail with Firebase",
  "templateType": "App template",
  "version": "4.1.2",
  "description": "NativeScript Application",
  "author": "Telerik <[email protected]>",
  "license": "SEE LICENSE IN <your-license-filename>",
  "keywords": [
    "telerik",
    "mobile",
    "nativescript",
    "{N}",
    "tns",
    "appbuilder",
    "template",
    "master-details",
    "detail",
    "category-general"
  ],
  "repository": "<fill-your-repository-here>",
  "homepage": "https://github.com/NativeScript/template-master-detail-ng",
  "bugs": {
    "url": "https://github.com/NativeScript/NativeScript/issues"
  },
  "scripts": {
    "lint": "tslint \"app/**/*.ts\""
  },
  "dependencies": {
    "@angular/animations": "~6.0.6",
    "@angular/common": "~6.0.6",
    "@angular/compiler": "~6.0.6",
    "@angular/core": "~6.0.6",
    "@angular/forms": "~6.0.6",
    "@angular/http": "~6.0.6",
    "@angular/platform-browser": "~6.0.6",
    "@angular/platform-browser-dynamic": "~6.0.6",
    "@angular/router": "~6.0.6",
    "nativescript-angular": "~6.0.6",
    "nativescript-imagepicker": "~6.0.0",
    "nativescript-plugin-firebase": "~6.0.0",
    "nativescript-theme-core": "~1.0.4",
    "nativescript-ui-listview": "~3.5.0",
    "tns-core-modules": "~4.1.0",
    "reflect-metadata": "~0.1.10",
    "rxjs": "~6.1.0",
    "zone.js": "~0.8.18"
  },
  "devDependencies": {
    "codelyzer": "~4.3.0",
    "nativescript-dev-sass": "~1.6.0",
    "nativescript-dev-typescript": "~0.7.0",
    "nativescript-dev-webpack": "~0.14.0",
    "tslint": "~5.10.0",
    "typescript": "~2.7.2",
    "@angular/compiler-cli": "~6.1.0-beta.3",
    "@ngtools/webpack": "6.1.0-rc.0"
  },
  "readme": "NativeScript Application"
}

What is the new behavior?

The package.json contains only required keys:

{
  "nativescript": {
    "id": "org.nativescript.app8",
    "tns-android": {
      "version": "4.1.3"
    },
    "tns-ios": {
      "version": "4.1.1"
    }
  },
  "description": "NativeScript Application",
  "license": "SEE LICENSE IN <your-license-filename>",
  "repository": "<fill-your-repository-here>",
  "scripts": {
    "lint": "tslint \"app/**/*.ts\""
  },
  "dependencies": {
    "@angular/animations": "~6.0.6",
    "@angular/common": "~6.0.6",
    "@angular/compiler": "~6.0.6",
    "@angular/core": "~6.0.6",
    "@angular/forms": "~6.0.6",
    "@angular/http": "~6.0.6",
    "@angular/platform-browser": "~6.0.6",
    "@angular/platform-browser-dynamic": "~6.0.6",
    "@angular/router": "~6.0.6",
    "nativescript-angular": "~6.0.6",
    "nativescript-imagepicker": "~6.0.0",
    "nativescript-plugin-firebase": "~6.0.0",
    "nativescript-theme-core": "~1.0.4",
    "nativescript-ui-listview": "~3.5.0",
    "tns-core-modules": "~4.1.0",
    "reflect-metadata": "~0.1.10",
    "rxjs": "~6.1.0",
    "zone.js": "~0.8.18"
  },
  "devDependencies": {
    "codelyzer": "~4.3.0",
    "nativescript-dev-sass": "~1.6.0",
    "nativescript-dev-typescript": "~0.7.0",
    "nativescript-dev-webpack": "~0.14.0",
    "tslint": "~5.10.0",
    "typescript": "~2.7.2",
    "@angular/compiler-cli": "~6.1.0-beta.3",
    "@ngtools/webpack": "6.1.0-rc.0"
  },
  "readme": "NativeScript Application"
}

Remove confusing keys from project's package.json when Template v2 is used. Remove `name` and `version` as the users may decide we will use the values to set project name and version of the application.
@rosen-vladimirov rosen-vladimirov added this to the 4.2.0 milestone Aug 2, 2018
@rosen-vladimirov rosen-vladimirov self-assigned this Aug 2, 2018
@rosen-vladimirov rosen-vladimirov merged commit 2463279 into release Aug 3, 2018
@rosen-vladimirov rosen-vladimirov deleted the vladimirov/fix-project-creation branch August 3, 2018 09:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants