Skip to content

Commit

Permalink
refactor: Change hslayers root and move tests outside of the src folder
Browse files Browse the repository at this point in the history
  • Loading branch information
FilipLeitner authored and jmacura committed Apr 22, 2024
1 parent 9f38f37 commit 3893e90
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 17 deletions.
2 changes: 1 addition & 1 deletion angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -712,7 +712,7 @@
"hslayers": {
"projectType": "library",
"root": "projects/hslayers",
"sourceRoot": "projects/hslayers/src",
"sourceRoot": "projects/hslayers",
"prefix": "lib",
"architect": {
"build": {
Expand Down
2 changes: 1 addition & 1 deletion projects/hslayers/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module.exports = function (config) {
],
client: {
clearContext: false, // leave Jasmine Spec Runner output visible in browser
jasmine:{
jasmine: {
random: false
}
},
Expand Down
10 changes: 7 additions & 3 deletions projects/hslayers/ng-package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
{
"$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
"dest": "../../dist/hslayers",
"assets": ["src/assets", "src/css/hslayers-bootstrap.scss", "src/css/whhg-font/css/whhg.css"],
"assets": [
"assets",
"css/hslayers-bootstrap.scss",
"css/whhg-font/css/whhg.css"
],
"lib": {
"entryFile": "src/public-api.ts"
"entryFile": "public-api.ts"
}
}
}
2 changes: 2 additions & 0 deletions projects/hslayers/public-api.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
//Dummy variable export to 'fool' compiler
export const HSLAYERSNG = 'hslayers-ng';
1 change: 1 addition & 0 deletions projects/hslayers/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './public-api';
6 changes: 6 additions & 0 deletions projects/hslayers/src/ng-package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"$schema": "../../../node_modules/ng-packagr/ng-package.schema.json",
"lib": {
"entryFile": "public-api.ts"
}
}
5 changes: 4 additions & 1 deletion projects/hslayers/test/hslayers.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ import {CustomTranslationService} from 'hslayers-ng/services/language';
import {HsConfig} from 'hslayers-ng/config';
import {HsConfigMock} from './config.service.mock';
import {HsLayerUtilsService} from 'hslayers-ng/services/utils';
import {HsMapHostDirective, HslayersComponent} from 'hslayers-ng';
import {
HsMapHostDirective,
HslayersComponent,
} from 'hslayers-ng/src/public-api';
import {HsUtilsService} from 'hslayers-ng/services/utils';
import {HsUtilsServiceMock} from './utils.service.mock';
import {TranslateTestingModule} from 'hslayers-ng/components/language';
Expand Down
14 changes: 3 additions & 11 deletions projects/hslayers/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,10 @@
"extends": "../../tsconfig.json",
"compilerOptions": {
"outDir": "../../out-tsc/spec",
"types": [
"jasmine",
"node"
],
"types": ["jasmine", "node"],
"typeRoots": ["../../node_modules/@types"],
"resolveJsonModule": true
},
"files": [
"test/test.ts"
],
"include": [
"**/*.spec.ts",
"**/*.d.ts"
]
"files": ["test/test.ts"],
"include": ["test/**/*.spec.ts", "test/**/*.d.ts"]
}

0 comments on commit 3893e90

Please sign in to comment.