diff --git a/angular.json b/angular.json index 62c257b..55d1dff 100644 --- a/angular.json +++ b/angular.json @@ -80,34 +80,20 @@ "test": { "builder": "@angular-devkit/build-angular:karma", "options": { - "main": "src/test.ts", "polyfills": [ "zone.js", "zone.js/testing" ], "tsConfig": "tsconfig.spec.json", - "karmaConfig": "karma.conf.js", + "inlineStyleLanguage": "scss", "assets": [ "src/favicon.ico", "src/assets" ], "styles": [ - "src/styles.css" ], "scripts": [] } - }, - "lint": { - "builder": "@angular-devkit/build-angular:tslint", - "options": { - "tsConfig": [ - "tsconfig.app.json", - "tsconfig.spec.json" - ], - "exclude": [ - "**/node_modules/**" - ] - } } } } diff --git a/browserslist b/browserslist deleted file mode 100644 index 8084853..0000000 --- a/browserslist +++ /dev/null @@ -1,12 +0,0 @@ -# This file is used by the build system to adjust CSS and JS output to support the specified browsers below. -# For additional information regarding the format and rule options, please see: -# https://github.com/browserslist/browserslist#queries - -# You can see what browsers were selected by your queries by running: -# npx browserslist - -> 0.5% -last 2 versions -Firefox ESR -not dead -not IE 9-11 # For IE 9-11 support, remove 'not'. \ No newline at end of file diff --git a/karma.conf.js b/karma.conf.js deleted file mode 100644 index f481244..0000000 --- a/karma.conf.js +++ /dev/null @@ -1,37 +0,0 @@ -// Karma configuration file, see link for more information -// https://karma-runner.github.io/1.0/config/configuration-file.html - -module.exports = function(config) { - config.set({ - basePath: '', - frameworks: ['jasmine', '@angular-devkit/build-angular'], - plugins: [ - require('karma-jasmine'), - require('karma-chrome-launcher'), - require('karma-jasmine-html-reporter'), - require('karma-coverage-istanbul-reporter'), - require('@angular-devkit/build-angular/plugins/karma'), - ], - client: { - clearContext: false, // leave Jasmine Spec Runner output visible in browser - }, - coverageIstanbulReporter: { - dir: require('path').join(__dirname, '../coverage'), - reports: ['html', 'lcovonly'], - fixWebpackSourcePaths: true, - }, - reporters: ['progress', 'kjhtml'], - port: 9876, - colors: true, - logLevel: config.LOG_INFO, - autoWatch: true, - browsers: ['Chrome', 'ChromeHeadless', 'ChromeHeadlessDebug'], - customLaunchers: { - ChromeHeadlessDebug: { - base: 'ChromeHeadless', - flags: ['--remote-debugging-port=9333', '--no-sandbox'], - }, - }, - singleRun: false, - }); -}; diff --git a/package.json b/package.json index 2bcf5ac..ed97359 100644 --- a/package.json +++ b/package.json @@ -4,11 +4,10 @@ "scripts": { "ng": "./node_modules/.bin/ng", "start": "node node_modules/@angular/cli/bin/ng serve", - "build": "node node_modules/@angular/cli/bin/ng build --aot --configuration production", + "build": "node node_modules/@angular/cli/bin/ng build --configuration production", "test": "node node_modules/@angular/cli/bin/ng test", - "test:headless": "node node_modules/@angular/cli/bin/ng test --browsers=ChromeHeadlessDebug", - "test:headless:singleRun": "node node_modules/@angular/cli/bin/ng test --browsers=ChromeHeadlessDebug --watch false", - "lint": "node node_modules/@angular/cli/bin/ng lint", + "test:headless": "node node_modules/@angular/cli/bin/ng test --browsers=ChromeHeadless", + "test:headless:singleRun": "node node_modules/@angular/cli/bin/ng test --no-watch --no-progress --browsers=ChromeHeadless", "release:minor": "cd ./src/lib/ && npm version minor", "release:major": "cd ./src/lib/ && npm version major", "release:patch": "cd ./src/lib/ && npm version patch", diff --git a/src/lib/directives/specs/ng2-fittext.directive.spec.ts b/src/lib/directives/specs/ng2-fittext.directive.spec.ts index f1f26ba..80f824b 100644 --- a/src/lib/directives/specs/ng2-fittext.directive.spec.ts +++ b/src/lib/directives/specs/ng2-fittext.directive.spec.ts @@ -297,7 +297,9 @@ describe('Class: Ng2FittextDirective', () => { }); it('Should calculate the overflow using the parent element if the container is not present', () => { - delete ng2FittextDirective.container; + if(ng2FittextDirective) { + delete (ng2FittextDirective as any).container; + } spyOn(ng2FittextDirective, 'checkOverflow').and.callFake( (parentElement: any, childrenElement: any) => { expect(parentElement).toEqual(parentElementMock); diff --git a/tslint.json b/tslint.json deleted file mode 100644 index afa75e6..0000000 --- a/tslint.json +++ /dev/null @@ -1,91 +0,0 @@ -{ - "extends": "tslint:recommended", - "rules": { - "array-type": false, - "arrow-parens": false, - "deprecation": { - "severity": "warning" - }, - "component-class-suffix": true, - "contextual-lifecycle": true, - "directive-class-suffix": true, - "directive-selector": [ - true, - "attribute", - "app", - "camelCase" - ], - "component-selector": [ - true, - "element", - "app", - "kebab-case" - ], - "import-blacklist": [ - true, - "rxjs/Rx" - ], - "interface-name": false, - "max-classes-per-file": false, - "max-line-length": [ - true, - 140 - ], - "member-access": false, - "member-ordering": [ - true, - { - "order": [ - "static-field", - "instance-field", - "static-method", - "instance-method" - ] - } - ], - "no-consecutive-blank-lines": false, - "no-console": [ - true, - "debug", - "info", - "time", - "timeEnd", - "trace" - ], - "no-empty": false, - "no-inferrable-types": [ - true, - "ignore-params" - ], - "no-non-null-assertion": true, - "no-redundant-jsdoc": true, - "no-switch-case-fall-through": true, - "no-var-requires": false, - "object-literal-key-quotes": [ - true, - "as-needed" - ], - "object-literal-sort-keys": false, - "ordered-imports": false, - "quotemark": [ - true, - "single" - ], - "trailing-comma": false, - "no-conflicting-lifecycle": true, - "no-host-metadata-property": true, - "no-input-rename": true, - "no-inputs-metadata-property": true, - "no-output-native": true, - "no-output-on-prefix": true, - "no-output-rename": true, - "no-outputs-metadata-property": true, - "template-banana-in-box": true, - "template-no-negated-async": true, - "use-lifecycle-interface": true, - "use-pipe-transform-interface": true - }, - "rulesDirectory": [ - "codelyzer" - ] -}