Skip to content

Commit

Permalink
SVY-16029 [NG2] investigate how services can be there own project (and
Browse files Browse the repository at this point in the history
included in ng2)

big refactor to create a servoy-public lib that can be used by services
or component packages.

fix a lot of test to include now a more standard servoytesting.module
that has the basics overwritten and injected.
Fixed a lot of test to include the right modules so all directives are
found.
  • Loading branch information
jcompagner committed Apr 10, 2021
1 parent d7405d0 commit 5b9c3a6
Show file tree
Hide file tree
Showing 232 changed files with 1,723 additions and 713 deletions.
1 change: 0 additions & 1 deletion com.servoy.eclipse.ngclient.ui/node/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"root": true,
"ignorePatterns": [
"projects/**/*"
],
"plugins": [
"only-warn"
Expand Down
44 changes: 43 additions & 1 deletion com.servoy.eclipse.ngclient.ui/node/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"builder": "@angular-devkit/build-angular:browser",
"options": {
"aot": true,
"outputPath": "dist",
"outputPath": "dist/app",
"index": "src/index.html",
"main": "src/main.ts",
"tsConfig": "src/tsconfig.app.json",
Expand Down Expand Up @@ -78,6 +78,7 @@
"karmaConfig": "./karma.conf.js",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.spec.json",
"codeCoverage": true,
"styles": [
"src/styles.css"
],
Expand Down Expand Up @@ -121,6 +122,47 @@
}
}
}
},
"servoy-public": {
"projectType": "library",
"root": "projects/servoy-public",
"sourceRoot": "projects/servoy-public/src",
"prefix": "lib",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:ng-packagr",
"options": {
"tsConfig": "projects/servoy-public/tsconfig.lib.json",
"project": "projects/servoy-public/ng-package.json"
},
"configurations": {
"production": {
"tsConfig": "projects/servoy-public/tsconfig.lib.prod.json"
}
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "projects/servoy-public/src/test.ts",
"tsConfig": "projects/servoy-public/tsconfig.spec.json",
"karmaConfig": "projects/servoy-public/karma.conf.js",
"codeCoverage": true
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"projects/servoy-public/tsconfig.lib.json",
"projects/servoy-public/tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**"
]
}
}
}
}
},
"defaultProject": "ngclient2",
Expand Down
21 changes: 20 additions & 1 deletion com.servoy.eclipse.ngclient.ui/node/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,44 @@ module.exports = function (config) {
require('karma-chrome-launcher'),
require('@chiragrupani/karma-chromium-edge-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage'),
require('karma-junit-reporter'),
require('@angular-devkit/build-angular/plugins/karma')
],
client:{
jasmine: {
// you can add configuration options for Jasmine here
// the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
// for example, you can disable the random execution with `random: false`
// or set a specific seed with `seed: 4321`
},
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
jasmineHtmlReporter: {
suppressAll: true // removes the duplicated traces
},
coverageReporter: {
dir: require('path').join(__dirname, '../target/coverage/app'),
subdir: '.',
reporters: [
{ type: 'html' },
{ type: 'text-summary' }
]
},
angularCli: {
environment: 'dev'
},
reporters: ['progress', 'kjhtml','junit'],
junitReporter: {
outputFile: '../../target/TEST-browser-karma.xml'
},
},
port: 9876,
colors: true,
logLevel: config.LOG_DEBUG,
autoWatch: true,
browsers: ['ChromeHeadless','Chrome', 'Edge'],
singleRun: false,
restartOnFileChange: true,
customLaunchers: {
headlessChrome: {
base: "ChromeHeadless",
Expand Down
Loading

0 comments on commit 5b9c3a6

Please sign in to comment.