Skip to content

Commit 40966da

Browse files
committed
chore(ci): setup for ng6
1 parent b5f57b3 commit 40966da

File tree

74 files changed

+861
-9722
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+861
-9722
lines changed

.travis.yml

Lines changed: 55 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,72 @@
11
language: node_js
22
sudo: false
33
node_js:
4-
- '6'
5-
6-
env:
7-
- NPM_CONFIG_LOGLEVEL='warn'
4+
- 'lts/*'
5+
install:
6+
- yarn
7+
cache:
8+
yarn: true
9+
directories:
10+
- node_modules
11+
- projects/ngx-openlayers/node_modules
12+
- dist
813

914
jobs:
1015
include:
1116
- stage: check
17+
name: next lib linting
1218
script:
13-
- npm run lint
14-
- stage: build library
15-
before_script:
16-
- rm -rf lib
19+
- yarn lint
20+
21+
- stage: build
22+
name: next lib and demo
1723
script:
24+
- yarn build --prod --base-href "/ngx-openlayers/" --progress false
25+
26+
- stage: release
27+
name: next lib version on github releases
28+
if: tag =~ /^\d+.\d+.\d+-next.\d+$/
29+
script: 'true' # skips tests
30+
before_deploy:
31+
- cd dist/ngx-openlayers
32+
- cp ../../projects/ngx-openlayers/CHANGELOG.md CHANGELOG.md
1833
- npm pack
19-
- mkdir -p lib
20-
- cp *.tgz lib/
21-
cache:
22-
directories:
23-
- lib
24-
- stage: build demo
25-
before_install:
26-
- cd example
27-
install:
28-
- npm i
29-
script:
30-
- npm un -S ngx-openlayers
31-
- cp -r ../lib .
32-
- npm i -S lib/*.tgz
33-
- npm run build
34-
cache:
35-
directories:
36-
- lib
37-
- stage: deploy library release
38-
script: ignore
3934
deploy:
40-
- provider: releases
41-
api_key: $GITHUB_OAUTH_TOKEN
42-
file_glob: true
43-
file: lib/*
44-
skip_cleanup: true
45-
on:
46-
tags: true
47-
- stage: deploy demo pages
48-
script: ignore
35+
- provider: releases
36+
prerelease: true
37+
api_key: $GITHUB_OAUTH_TOKEN
38+
file_glob: true
39+
file: '*.tgz'
40+
skip_cleanup: true
41+
on:
42+
tags: true
43+
44+
- stage: release
45+
name: next demo on github pages
46+
if: tag =~ /^\d+.\d+.\d+-next.\d+$/
47+
script: 'true' # skips tests
48+
before_deploy:
49+
- cd dist/demo-ngx-openlayers
4950
deploy:
50-
- provider: pages
51-
local_dir: dist
52-
skip_cleanup: true
53-
github_token: $GITHUB_OAUTH_TOKEN
54-
on:
55-
tags: true
56-
- stage: publish library release
51+
- provider: pages
52+
local_dir: dist/demo-ngx-openlayers
53+
skip_cleanup: true
54+
github_token: $GITHUB_OAUTH_TOKEN
55+
on:
56+
tags: true
57+
58+
- stage: deploy
59+
name: next lib version on npm
60+
if: tag =~ /^\d+.\d+.\d+-next.\d+$/
61+
script: 'true' # skips tests
62+
before_deploy:
63+
- cp projects/ngx-openlayers/CHANGELOG.md dist/ngx-openlayers/CHANGELOG.md
64+
- cd dist/ngx-openlayers
5765
deploy:
58-
provider: npm
66+
- provider: npm
5967
email: $NPM_EMAIL
6068
api_key: $NPM_TOKEN
69+
tag: next
70+
skip_cleanup: true
6171
on:
6272
tags: true
63-
skip_cleanup: true
64-

angular.json

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
],
4949
"styles": [
5050
"src/styles.css",
51-
"node_modules/openlayers/dist/ol.css"
51+
"projects/ngx-openlayers/node_modules/openlayers/dist/ol.css"
5252
],
5353
"scripts": []
5454
},
@@ -115,7 +115,9 @@
115115
],
116116
"exclude": [
117117
"**/node_modules/**"
118-
]
118+
],
119+
"tslintConfig": "tslint-prettier.json",
120+
"typeCheck": true
119121
}
120122
}
121123
}
@@ -177,7 +179,9 @@
177179
],
178180
"exclude": [
179181
"**/node_modules/**"
180-
]
182+
],
183+
"tslintConfig": "tslint-prettier.json",
184+
"typeCheck": true
181185
}
182186
}
183187
}

package.json

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
{
22
"name": "demo-ngx-openlayers",
3-
"version": "0.8.20",
3+
"version": "1.0.0-next.0",
44
"scripts": {
55
"ng": "ng",
6-
"start": "ng serve",
7-
"build": "ng build",
8-
"test": "ng test",
9-
"lint": "ng lint ngx-openlayers --type-check && ng lint demo-ngx-openlayers --type-check",
10-
"e2e": "ng e2e",
11-
"format": "prettier --write \"**/@(src|e2e)/**/*.ts\""
6+
"start": "yarn build:lib && ng serve",
7+
"build:lib": "yarn --cwd projects/ngx-openlayers && ng build ngx-openlayers --prod",
8+
"build": "yarn build:lib && ng build demo-ngx-openlayers",
9+
"test": "yarn build:lib && ng test",
10+
"lint": "ng lint",
11+
"e2e": "yarn build:lib && ng e2e",
12+
"format": "prettier --write \"**/@(src|e2e)/**/*.ts\"",
13+
"release": "yarn --cwd projects/ngx-openlayers release"
1214
},
1315
"private": true,
1416
"dependencies": {
@@ -25,7 +27,6 @@
2527
"geojson": "^0.5.0",
2628
"hammer-timejs": "^1.1.0",
2729
"hammerjs": "^2.0.8",
28-
"ngx-openlayers": "file:dist/ngx-openlayers",
2930
"rxjs": "^6.0.0",
3031
"zone.js": "^0.8.26"
3132
},
@@ -49,6 +50,7 @@
4950
"ng-packagr": "^3.0.0-rc.2",
5051
"prettier": "^1.13.4",
5152
"protractor": "~5.3.0",
53+
"standard-version": "^4.4.0",
5254
"ts-node": "~5.0.1",
5355
"tsickle": ">=0.25.5",
5456
"tslib": "^1.7.1",
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
{
22
"$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
33
"dest": "../../dist/ngx-openlayers",
4+
"whitelistedNonPeerDependencies": [
5+
"openlayers", "@types/openlayers"
6+
],
47
"lib": {
58
"entryFile": "src/public_api.ts"
69
}
7-
}
10+
}
Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
11
{
22
"name": "ngx-openlayers",
3-
"version": "0.0.1",
4-
"dependencies": {
5-
"@types/openlayers": "4.3.x || 4.4.x",
6-
"openlayers": "4.3.x || 4.4.x"
3+
"version": "1.0.0-next.0",
4+
"scripts": {
5+
"release": "standard-version -m \"chore(release): version %s\" -t \"\" --prerelease next"
6+
},
7+
"standard-version": {
8+
"postchangelog": "cp projects/ngx-openlayers/CHANGELOG.md dist/ngx-openlayers/CHANGELOG.md"
79
},
810
"peerDependencies": {
911
"@angular/common": "^6.0.0-rc.0 || ^6.0.0",
1012
"@angular/core": "^6.0.0-rc.0 || ^6.0.0"
13+
},
14+
"dependencies": {
15+
"@types/openlayers": "4.3.x || 4.4.x",
16+
"openlayers": "4.3.x || 4.4.x"
1117
}
1218
}

projects/ngx-openlayers/src/lib/attributions.component.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ import { AttributionComponent } from './attribution.component';
1010
export class AttributionsComponent implements AfterViewInit {
1111
instance: Array<Attribution>;
1212

13-
@ContentChildren(AttributionComponent) attributions: QueryList<AttributionComponent>;
13+
@ContentChildren(AttributionComponent)
14+
attributions: QueryList<AttributionComponent>;
1415

1516
constructor(@Host() private source: SourceComponent) {}
1617

projects/ngx-openlayers/src/lib/controls/attribution.component.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ export class ControlAttributionComponent implements OnInit, OnDestroy {
1010
public componentType = 'control';
1111
instance: control.Attribution;
1212
target: Element;
13-
@Input() collapsible: boolean;
13+
@Input()
14+
collapsible: boolean;
1415

1516
constructor(private map: MapComponent, private element: ElementRef) {}
1617

projects/ngx-openlayers/src/lib/controls/control.component.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ export class ControlComponent implements OnInit, OnDestroy {
1111
public componentType = 'control';
1212
instance: control.Control;
1313
element: Element;
14-
@ContentChild(ContentComponent) content: ContentComponent;
14+
@ContentChild(ContentComponent)
15+
content: ContentComponent;
1516

1617
constructor(private map: MapComponent) {}
1718

projects/ngx-openlayers/src/lib/controls/default.component.ts

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,18 @@ import { MapComponent } from '../map.component';
88
})
99
export class DefaultControlComponent implements OnInit, OnDestroy {
1010
instance: Collection<control.Control>;
11-
@Input() attribution: boolean;
12-
@Input() attributionOptions: olx.control.AttributionOptions;
13-
@Input() rotate: boolean;
14-
@Input() rotateOptions: olx.control.RotateOptions;
15-
@Input() zoom: boolean;
16-
@Input() zoomOptions: olx.control.ZoomOptions;
11+
@Input()
12+
attribution: boolean;
13+
@Input()
14+
attributionOptions: olx.control.AttributionOptions;
15+
@Input()
16+
rotate: boolean;
17+
@Input()
18+
rotateOptions: olx.control.RotateOptions;
19+
@Input()
20+
zoom: boolean;
21+
@Input()
22+
zoomOptions: olx.control.ZoomOptions;
1723

1824
constructor(private map: MapComponent) {}
1925

projects/ngx-openlayers/src/lib/controls/fullscreen.component.ts

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,16 @@ import { MapComponent } from '../map.component';
99
export class ControlFullScreenComponent implements OnInit, OnDestroy {
1010
instance: control.FullScreen;
1111

12-
@Input() className: string;
13-
@Input() label: string;
14-
@Input() labelActive: string;
15-
@Input() tipLabel: string;
16-
@Input() keys: boolean;
12+
@Input()
13+
className: string;
14+
@Input()
15+
label: string;
16+
@Input()
17+
labelActive: string;
18+
@Input()
19+
tipLabel: string;
20+
@Input()
21+
keys: boolean;
1722

1823
constructor(private map: MapComponent) {
1924
// console.log('instancing aol-control-fullscreen');

0 commit comments

Comments
 (0)