package.json 8.8 KB
Newer Older
1
{
2
  "name": "kubernetes-dashboard",
3
  "version": "2.0.0",
4 5 6 7 8
  "repository": {
    "type": "git",
    "url": "https://github.com/kubernetes/dashboard.git"
  },
  "license": "Apache-2.0",
9
  "scripts": {
10 11 12 13
    "start": "concurrently \"npm run start:backend --kubernetes-dashboard:sidecar_host=$npm_package_config_sidecar_host\" \"npm run start:frontend --kubernetes-dashboard:bind_address=$npm_package_config_bind_address --kubernetes-dashboard:port=$npm_package_config_port\"",
    "start:https": "concurrently \"npm run start:backend:https --kubernetes-dashboard:sidecar_host=$npm_package_config_sidecar_host\" \"npm run start:frontend:https --kubernetes-dashboard:bind_address=$npm_package_config_bind_address --kubernetes-dashboard:port=$npm_package_config_port\"",
    "start:frontend": "npm run postversion && ng serve --aot --progress=false --proxy-config aio/proxy.conf.json --host=$npm_package_config_bind_address --port $npm_package_config_port",
    "start:frontend:https": "node aio/scripts/version.js && ng serve --progress=false --aot --proxy-config aio/https-proxy.conf.json --ssl --host=$npm_package_config_bind_address --port $npm_package_config_port",
14 15
    "start:backend": "KUBECONFIG=${KUBECONFIG:-$npm_package_config_kubeconfig}; gulp serve --kubeconfig $KUBECONFIG --sidecarServerHost $npm_package_config_sidecar_host",
    "start:backend:https": "KUBECONFIG=${KUBECONFIG:-$npm_package_config_kubeconfig}; gulp serve --kubeconfig $KUBECONFIG --autoGenerateCerts true --sidecarServerHost $npm_package_config_sidecar_host",
16
    "start:prod": "npm run build && ./$npm_package_config_dashboard_binary_path --kubeconfig $npm_package_config_kubeconfig --locale-config $npm_package_config_dashboard_locale_config --auto-generate-certificates --bind-address $npm_package_config_bind_address --sidecar-host $npm_package_config_sidecar_host --port $npm_package_config_port",
17 18
    "build": "./aio/scripts/build.sh",
    "build:cross": "./aio/scripts/build.sh -c",
S
Sebastian Florek 已提交
19
    "build:frontend": "npm run clean && ng build --aot --prod --localize --outputPath=$npm_package_config_frontend_build_dir",
20 21
    "build:backend": "npm run clean && gulp backend:prod",
    "build:backend:cross": "npm run clean && gulp backend:prod:cross",
S
Sebastian Florek 已提交
22 23 24 25
    "docker:build": "npm run clean && npm run build:cross && gulp docker-image:release:cross",
    "docker:build:head": "npm run clean && npm run build:cross && gulp docker-image:head:cross",
    "docker:push": "npm run docker:build && gulp push-to-docker:release:cross",
    "docker:push:head": "npm run docker:build:head && gulp push-to-docker:head:cross",
26 27 28
    "cy:open": "npx cypress open",
    "cy:run": "npx cypress run",
    "test": "npm run test:frontend && npm run test:backend && npm run e2e",
29 30 31
    "test:frontend": "ng test --karma-config ./aio/karma.conf.js --watch=false",
    "test:frontend:coverage": "ng test --karma-config ./aio/karma.conf.js --watch=false --code-coverage",
    "test:frontend:watch": "ng test --karma-config ./aio/karma.conf.js",
32 33 34
    "test:backend": "go test github.com/kubernetes/dashboard/src/app/backend/...",
    "test:backend:coverage": "./aio/scripts/coverage-backend.sh",
    "test:coverage": "npm run test:frontend:coverage && npm run test:backend:coverage",
35
    "e2e": "concurrently -kill-others --success first \"npm run start\" \"wait-on http://localhost:8080 && npm run cy:run\"",
J
Jeffrey Sica 已提交
36 37
    "cluster:start": "./aio/scripts/start-cluster.sh",
    "cluster:stop": "./aio/scripts/stop-cluster.sh",
38
    "check": "concurrently \"npm run check:backend\" \"npm run check:codegen\" \"npm run check:frontend\" \"npm run check:license\" \"npm run check:i18n\"",
S
Shu Muto 已提交
39
    "check:backend": "golangci-lint run -c .golangci.yml src/app/backend/...",
40
    "check:codegen": "aio/scripts/verify-codegen.sh",
M
Marcin Maciaszczyk 已提交
41 42 43 44
    "check:frontend": "concurrently \"npm run check:frontend:ts\" \"npm run check:frontend:scss\" \"npm run check:frontend:html\"",
    "check:frontend:ts": "gts check",
    "check:frontend:scss": "./aio/scripts/format.sh --styles --check && ./node_modules/sass-lint/bin/sass-lint.js -c .sass-lint.yml 'src/app/frontend/**/*.scss' -v -q",
    "check:frontend:html": "./aio/scripts/format.sh --html --check",
S
Shu Muto 已提交
45
    "check:license": "license-check-and-add check",
46
    "check:i18n": "ng xi18n --outFile ../i18n/messages.xlf && aio/scripts/xliffmerge.sh",
47
    "fix": "concurrently \"npm run fix:backend\" \"npm run fix:frontend\" \"npm run fix:license\" \"npm run fix:i18n\"",
48
    "fix:backend": "golangci-lint run -c .golangci.yml --fix src/app/backend/...",
M
Marcin Maciaszczyk 已提交
49 50
    "fix:frontend": "concurrently \"npm run fix:frontend:ts\" \"npm run fix:frontend:scss\" \"npm run fix:frontend:html\"",
    "fix:frontend:ts": "gts fix",
51
    "fix:frontend:scss": "scssfmt -r 'src/**/*.scss'",
M
Marcin Maciaszczyk 已提交
52
    "fix:frontend:html": "./aio/scripts/format.sh --html",
S
Shu Muto 已提交
53
    "fix:license": "license-check-and-add add",
54
    "fix:i18n": "ng xi18n --outFile ../i18n/messages.xlf && aio/scripts/xliffmerge.sh",
M
Marcin Maciaszczyk 已提交
55
    "clean": "rm -rf .go_workspace .tmp coverage dist npm-debug.log",
56
    "postversion": "node aio/scripts/version.js",
S
Sebastian Florek 已提交
57
    "postinstall": "node aio/scripts/version.js && command -v golangci-lint >/dev/null 2>&1 || { curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.23.6; } && go mod download && ngcc"
58
  },
59 60
  "husky": {
    "hooks": {
61
      "pre-commit": "lint-staged"
62 63
    }
  },
64 65 66 67
  "lint-staged": {
    "src/**/*.ts": [
      "gts fix",
      "git add"
68 69 70 71
    ],
    "src/**/*.scss": [
      "scssfmt",
      "git add"
72 73
    ],
    "src/**/*.go": [
74
      "./aio/scripts/pre-commit-golangci-lint.sh",
75
      "git add"
S
Shu Muto 已提交
76 77
    ],
    "src/**/*.html": [
S
Sebastian Florek 已提交
78
      "./aio/scripts/pre-commit-i18n.sh",
S
Shu Muto 已提交
79
      "git add"
80 81
    ]
  },
82 83 84 85 86
  "xliffmergeOptions": {
    "srcDir": "i18n",
    "genDir": "i18n",
    "defaultLanguage": "en",
    "languages": [
87
      "de",
88
      "fr",
H
Holegots 已提交
89
      "ja",
90
      "ko",
S
Sebastian Florek 已提交
91 92 93
      "zh-Hans",
      "zh-Hant",
      "zh-Hant-HK"
94 95 96
    ],
    "beautifyOutput": true
  },
97
  "dependencies": {
S
Sebastian Florek 已提交
98
    "@angular/animations": "9.0.2",
99
    "@angular/cdk": "9.1.1",
S
Sebastian Florek 已提交
100 101 102 103 104 105
    "@angular/common": "9.0.2",
    "@angular/compiler": "9.0.2",
    "@angular/core": "9.0.2",
    "@angular/flex-layout": "9.0.0-beta.29",
    "@angular/forms": "9.0.2",
    "@angular/http": "8.0.0-beta.10",
106
    "@angular/localize": "9.0.6",
107
    "@angular/material": "9.1.1",
S
Sebastian Florek 已提交
108 109 110
    "@angular/platform-browser": "9.0.2",
    "@angular/platform-browser-dynamic": "9.0.2",
    "@angular/router": "9.0.2",
111
    "@swimlane/ngx-charts": "13.0.2",
112
    "@types/c3": "0.7.1",
113
    "@types/d3": "5.7.2",
114
    "@types/d3-scale": "2.2.0",
115
    "@types/file-saver": "2.0.1",
116
    "@types/highlight.js": "9.12.3",
117
    "ace-builds": "1.4.8",
118
    "ansi-to-html": "0.6.14",
119
    "c3": "0.7.15",
120
    "core-js": "3.6.4",
121
    "d3": "5.15.0",
122
    "file-saver": "2.0.2",
123
    "highlight.js": "9.18.1",
124
    "js-yaml": "3.13.1",
125
    "material-design-icons": "3.0.1",
126
    "ngx-cookie-service": "2.4.0",
127
    "ngx-filter-pipe": "2.1.2",
S
Sebastian Florek 已提交
128
    "normalize.css": "8.0.1",
129
    "roboto-fontface": "0.10.0",
130
    "rxjs": "6.5.4",
131
    "rxjs-compat": "6.5.4",
132
    "sockjs-client": "1.4.0",
133
    "systemjs": "6.2.6",
134
    "truncate-url": "1.0.0",
135
    "tslib": "1.11.1",
S
Sebastian Florek 已提交
136
    "web-animations-js": "2.3.2",
137 138
    "xterm": "4.5.0",
    "xterm-addon-fit": "0.3.0",
S
Sebastian Florek 已提交
139
    "zone.js": "0.10.2"
140
  },
141
  "devDependencies": {
142
    "@angular-devkit/build-angular": "0.900.6",
143
    "@angular/cli": "9.0.6",
S
Sebastian Florek 已提交
144
    "@angular/compiler-cli": "9.0.2",
145
    "@angular/language-service": "9.0.6",
146
    "@cypress/webpack-preprocessor": "4.1.3",
147
    "@types/jasmine": "3.5.9",
148
    "@types/jasminewd2": "2.0.8",
149
    "@types/js-yaml": "3.12.2",
150
    "@types/lodash": "4.14.149",
151
    "@types/node": "13.9.1",
152
    "babel-cli": "6.26.0",
153 154
    "babel-preset-env": "1.7.0",
    "babel-register": "6.26.0",
155
    "codelyzer": "5.2.1",
156
    "concurrently": "5.1.0",
157
    "cypress": "4.4.1",
158
    "del": "5.1.0",
159
    "git-describe": "4.0.4",
160
    "gts": "1.1.2",
161
    "gulp": "4.0.2",
162
    "gulp-filter": "6.0.0",
163
    "husky": "4.2.3",
164
    "jasmine-core": "3.5.0",
165
    "jasmine-spec-reporter": "4.2.1",
166
    "js-beautify": "1.10.3",
167
    "karma": "5.0.2",
168
    "karma-chrome-launcher": "3.1.0",
169
    "karma-cli": "2.0.0",
170
    "karma-coverage-istanbul-reporter": "2.1.1",
171
    "karma-firefox-launcher": "1.3.0",
172
    "karma-jasmine": "3.1.1",
173
    "karma-jasmine-html-reporter": "1.5.2",
174
    "license-check-and-add": "3.0.4",
175
    "lint-staged": "10.0.8",
176
    "lite-server": "2.5.4",
177
    "lodash": "4.17.15",
178
    "minimatch": "3.0.4",
179
    "minimist": "1.2.5",
180
    "ngx-i18nsupport": "0.17.1",
181
    "node-gyp": "6.1.0",
182
    "node-sass": "4.13.1",
183
    "q": "1.5.1",
184
    "raw-loader": "4.0.0",
185
    "run-node": "2.0.0",
186
    "sass-lint": "1.13.1",
187
    "sass-loader": "7.3.0",
188
    "scssfmt": "1.0.7",
189
    "semver": "7.1.3",
190
    "source-map-explorer": "2.4.0",
191
    "tar": "6.0.1",
192
    "through2": "3.0.1",
S
Sebastian Florek 已提交
193
    "ts-loader": "6.2.1",
194
    "ts-node": "8.6.2",
195
    "tslint": "5.20.1",
S
Sebastian Florek 已提交
196
    "typescript": "3.7.5",
197
    "wait-on": "4.0.1",
198
    "webpack-dev-server": "3.10.3"
199 200
  },
  "engines": {
S
Sebastian Florek 已提交
201
    "node": ">=10.13.0",
202
    "npm": ">=6.0.0"
203 204
  }
}