Skip to content
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

Add ng-packagr to packaging harbor-ui npm repo #4875

Merged
merged 1 commit into from
May 9, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ script:
- sudo mv ./VERSION /harbor/UIVERSION
- sudo service postgresql stop
- sudo make run_clarity_ut CLARITYIMAGE=vmware/harbor-clarity-ui-builder:1.4.0
- cat ./src/ui_ng/lib/npm-ut-test-results
- cat ./src/ui_ng/npm-ut-test-results
- sudo ./tests/testprepare.sh
- sudo make -f make/photon/Makefile _build_postgresql _build_db _build_registry -e VERSIONTAG=dev -e CLAIRDBVERSION=dev -e REGISTRYVERSION=v2.6.2
- sudo sed -i 's/__reg_version__/v2.6.2-dev/g' ./make/docker-compose.test.yml
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ refresh_clarity_builder:

run_clarity_ut:
@echo "run clarity ut ..."
@$(DOCKERCMD) run --rm -v $(UINGPATH)/lib:$(CLARITYSEEDPATH) -v $(BUILDPATH)/tests:$(CLARITYSEEDPATH)/tests $(CLARITYIMAGE) $(SHELL) $(CLARITYSEEDPATH)/tests/run-clarity-ut.sh
@$(DOCKERCMD) run --rm -v $(UINGPATH):$(CLARITYSEEDPATH) -v $(BUILDPATH)/tests:$(CLARITYSEEDPATH)/tests $(CLARITYIMAGE) $(SHELL) $(CLARITYSEEDPATH)/tests/run-clarity-ut.sh

pushimage:
@echo "pushing harbor images ..."
Expand Down
6 changes: 3 additions & 3 deletions src/ui_ng/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', 'angular-cli'],
frameworks: ['jasmine', '@angular/cli'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-mocha-reporter'),
require('karma-remap-istanbul'),
require('angular-cli/plugins/karma')
require('@angular/cli/plugins/karma')
],
files: [
{pattern: './src/test.ts', watched: false}
],
preprocessors: {
'./src/test.ts': ['angular-cli']
'./src/test.ts': ['@angular/cli']
},
mime: {
'text/x-typescript': ['ts', 'tsx']
Expand Down
60 changes: 0 additions & 60 deletions src/ui_ng/lib/angular-cli.json

This file was deleted.

50 changes: 0 additions & 50 deletions src/ui_ng/lib/karma.conf.js

This file was deleted.

44 changes: 0 additions & 44 deletions src/ui_ng/lib/karma.conf.win.js

This file was deleted.

10 changes: 10 additions & 0 deletions src/ui_ng/lib/ng-package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"$schema": "./node_modules/ng-packagr/ng-package.schema.json",
"lib": {
"entryFile": "index.ts",
"externals": {
"@ngx-translate/core": "ngx-translate-core",
"@ngx-translate/core/index": "ngx-translate-core"
}
}
}
69 changes: 21 additions & 48 deletions src/ui_ng/lib/package.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
{
"name": "harbor-ui",
"version": "0.7.13",
"version": "0.7.18-dev.1",
"description": "Harbor shared UI components based on Clarity and Angular4",
"scripts": {
"start": "ng serve --host 0.0.0.0 --port 4500 --proxy-config proxy.config.json",
"lint": "tslint \"src/**/*.ts\"",
"test": "ng test --single-run",
"test:win": "karma start karma.conf.win.js --single-run",
"pree2e": "webdriver-manager update",
"e2e": "protractor",
"cleanup": "rimraf dist",
"copy": "copyfiles -f README.md LICENSE AUTHORS pkg/package.json dist",
"transpile": "ngc -p tsconfig.json",
"package": "rollup -c",
"minify": "uglifyjs dist/bundles/harborui.umd.js --screw-ie8 --compress --mangle --comments --output dist/bundles/harborui.umd.min.js",
"build": "npm run cleanup && npm run transpile && npm run package && npm run minify && npm run copy"
"author": "VMware",
"module": "index.js",
"main": "bundles/harborui.umd.min.js",
"jsnext:main": "index.js",
"typings": "index.d.ts",
"keywords": [
"Harbor",
"Clarity",
"Angular4"
],
"license": "Apache 2.0",
"repository": {
"type": "git",
"url": "https://github.com/vmware/harbor.git"
},
"dependencies": {
"homepage": "https://github.com/vmware/harbor#readme",
"peerDependencies": {
"@angular/animations": "^4.3.0",
"@angular/common": "^4.3.0",
"@angular/compiler": "^4.3.0",
Expand All @@ -29,45 +31,16 @@
"@ngx-translate/core": "^6.0.0",
"@ngx-translate/http-loader": "0.0.3",
"@webcomponents/custom-elements": "^1.0.0",
"clarity-angular": "^0.10.27",
"clarity-icons": "^0.10.27",
"clarity-ui": "^0.10.27",
"clarity-angular": "^0.10.17",
"clarity-icons": "^0.10.17",
"clarity-ui": "^0.10.17",
"core-js": "^2.4.1",
"intl": "^1.2.5",
"mutationobserver-shim": "^0.3.2",
"ngx-cookie": "^1.0.0",
"rxjs": "^5.0.1",
"ts-helpers": "^1.1.1",
"web-animations-js": "^2.2.1",
"zone.js": "0.8.19"
},
"devDependencies": {
"@angular/cli": "1.4.0",
"@angular/compiler-cli": "^4.3.0",
"@types/core-js": "^0.9.41",
"@types/jasmine": "~2.5.53",
"@types/node": "~6.0.60",
"bootstrap": "4.0.0-alpha.5",
"codelyzer": "~3.1.1",
"copyfiles": "^1.2.0",
"enhanced-resolve": "^3.0.0",
"jasmine-core": "~2.6.2",
"jasmine-spec-reporter": "~4.1.0",
"karma": "~1.7.0",
"karma-chrome-launcher": "~2.1.1",
"karma-cli": "~1.0.1",
"karma-jasmine": "~1.1.0",
"karma-mocha-reporter": "^2.2.4",
"karma-remap-istanbul": "^0.2.1",
"protractor": "^4.0.9",
"rimraf": "^2.6.1",
"rollup": "^0.41.6",
"rollup-plugin-node-resolve": "^3.0.0",
"ts-node": "~3.2.0",
"tslint": "~5.7.0",
"typescript": "~2.3.3",
"typings": "^1.4.0",
"uglify-js": "^2.8.22",
"webdriver-manager": "10.2.5"
"zone.js": "^0.8.4"
}
}
46 changes: 0 additions & 46 deletions src/ui_ng/lib/pkg/package.json

This file was deleted.

Loading