0

I'm confused on where should i really install packages like ngxs, bootstrap, chart.js, ng-bootstrap, ng-select, sweetalert? I have come acrossed several questions but i'm still confused on where should i really put these packages? Can anyone tell if this code below is correct? Thanks

"dependencies": {
    "@angular/animations": "^7.2.11",
    "@angular/common": "^7.2.11",
    "@angular/compiler": "^7.2.11",
    "@angular/core": "^7.2.11",
    "@angular/forms": "^7.2.11",
    "@angular/http": "^7.2.11",
    "@angular/platform-browser": "^7.2.11",
    "@angular/platform-browser-dynamic": "^7.2.11",
    "@angular/platform-server": "^7.2.11",
    "@angular/pwa": "^0.10.7",
    "@angular/router": "^7.2.11",
    "@angular/service-worker": "^7.2.11",
    "@ngxs/router-plugin": "^3.4.3",
    "@ngxs/storage-plugin": "^3.4.3",
    "@ngxs/store": "^3.4.3",
    "bootstrap": "4.0.0",
    "classlist.js": "^1.1.20150312",
    "core-js": "^2.6.5",
    "intl": "^1.2.5",
    "ngx-perfect-scrollbar": "5.3.5",
    "node-sass": "^4.11.0",
    "resize-observer-polyfill": "^1.5.1",
    "rxjs": "^6.4.0",
    "web-animations-js": "^2.3.1",
    "zone.js": "^0.8.29"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "^0.10.7",
    "@angular/cli": "^7.1.0",
    "@angular/compiler-cli": "^7.1.0",
    "@angular/language-service": "^7.1.0",
    "@ng-bootstrap/ng-bootstrap": "^4.0.0",
    "@ng-select/ng-select": "^2.12.0",
    "@ngxs/devtools-plugin": "^3.4.1",
    "@ngxs/logger-plugin": "^3.4.1",
    "@types/jasmine": "^2.8.12",
    "@types/node": "^9.6.37",
    "chart.js": "^2.8.0",
    "codelyzer": "^4.5.0",
    "jasmine-core": "^3.3.0",
    "jasmine-spec-reporter": "^4.2.1",
    "karma": "^2.0.0",
    "karma-chrome-launcher": "^2.2.0",
    "karma-cli": "~1.0.1",
    "karma-coverage-istanbul-reporter": "^1.4.2",
    "karma-jasmine": "^1.1.1",
    "karma-jasmine-html-reporter": "^1.4.0",
    "ngx-pagination": "^3.2.1",
    "protractor": "^5.4.1",
    "rxjs-compat": "^6.3.3",
    "sweetalert2": "^7.29.2",
    "ts-node": "^5.0.1",
    "tslint": "^5.7.0",
    "typescript": "3.2.4"
  }
Sourav Dutta
  • 1,267
  • 1
  • 19
  • 25
Joseph
  • 7,042
  • 23
  • 83
  • 181

1 Answers1

-1

I think it's quite easy to tell what should go in dependencies or devDependencies. Anything that would be packaged at build time to your bundles must go in dependencies while other things that you need only at build time or helps you build the solution locally should go in devDependencies (gulp, grunt, typescript, types etc.).

In your above example ng-select, ng-bootstrap, ngx-pagination and sweetalert2 must be inside dependencies.

Digvijay
  • 774
  • 5
  • 10