Skip to content

Commit

Permalink
fix: resolve ivy compatibility issues
Browse files Browse the repository at this point in the history
  • Loading branch information
sibiraj-s committed Apr 23, 2020
1 parent cbadf8a commit 30b513c
Show file tree
Hide file tree
Showing 103 changed files with 356 additions and 420 deletions.
7 changes: 4 additions & 3 deletions .compodocrc.json
Expand Up @@ -3,13 +3,14 @@
"name": "NgxEditor",
"output": "./docs/",
"tsconfig": "./tsconfig.docs.json",
"customFavicon": "./src/favicon.ico",
"includes": "./extras",
"customFavicon": "./demo/src/favicon.ico",
"includes": "./wiki",
"includesName": "Wiki",
"disableLifeCycleHooks": true,
"disablePrivate": true,
"disableProtected": true,
"disableInternal": true,
"disableCoverage": true,
"hideGenerator": true
"hideGenerator": true,
"assetsFolder": "sketch"
}
3 changes: 1 addition & 2 deletions .gitignore
Expand Up @@ -46,5 +46,4 @@ testem.log
Thumbs.db

# Output directories
build/
docs/
/docs
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -2,7 +2,7 @@

<p align="center">
<a href="https://github.com/sibiraj-s/ngx-editor">
<img src="https://raw.githubusercontent.com/sibiraj-s/ngx-editor/master/src/assets/icons/ngx-editor.png" alt="ngxEditor">
<img src="./sketch/ngx-editor.png" alt="ngxEditor">
</a>
</p>
<p align="center">A Simple WYSIWYG Editor for Angular 6 Applications.</p>
Expand Down
103 changes: 72 additions & 31 deletions angular.json
Expand Up @@ -4,40 +4,80 @@
"newProjectRoot": "projects",
"projects": {
"ngx-editor": {
"projectType": "library",
"root": "",
"sourceRoot": "src",
"prefix": "lib",
"architect": {
"build": {
"builder": "@angular-devkit/build-ng-packagr:build",
"options": {
"tsConfig": "src/tsconfig.lib.json",
"project": "src/ng-package.json"
},
"configurations": {
"production": {
"tsConfig": "src/tsconfig.lib.prod.json"
}
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"tsConfig": "src/tsconfig.spec.json",
"karmaConfig": "src/karma.conf.js"
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"src/tsconfig.lib.json",
"src/tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**"
]
}
}
}
},
"demo": {
"projectType": "application",
"schematics": {
"@schematics/angular:component": {
"style": "scss"
}
},
"root": "",
"sourceRoot": "src",
"prefix": "",
"root": "demo",
"sourceRoot": "demo/src",
"prefix": "app",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist/ngx-editor",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.app.json",
"outputPath": "dist/demo",
"index": "demo/src/index.html",
"main": "demo/src/main.ts",
"polyfills": "demo/src/polyfills.ts",
"tsConfig": "demo/tsconfig.app.json",
"aot": true,
"assets": [
"src/favicon.ico",
"src/assets"
"demo/src/favicon.ico",
"demo/src/assets"
],
"styles": [
"src/styles.scss"
"demo/src/styles.scss"
],
"scripts": []
},
"configurations": {
"production": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
"replace": "demo/src/environments/environment.ts",
"with": "demo/src/environments/environment.prod.ts"
}
],
"optimization": true,
Expand Down Expand Up @@ -66,33 +106,33 @@
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "ngx-editor:build"
"browserTarget": "demo:build"
},
"configurations": {
"production": {
"browserTarget": "ngx-editor:build:production"
"browserTarget": "demo:build:production"
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "ngx-editor:build"
"browserTarget": "demo:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.spec.json",
"karmaConfig": "karma.conf.js",
"main": "demo/src/test.ts",
"polyfills": "demo/src/polyfills.ts",
"tsConfig": "demo/tsconfig.spec.json",
"karmaConfig": "demo/karma.conf.js",
"assets": [
"src/favicon.ico",
"src/assets"
"demo/src/favicon.ico",
"demo/src/assets"
],
"styles": [
"src/styles.scss"
"demo/src/styles.scss"
],
"scripts": []
}
Expand All @@ -101,9 +141,9 @@
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"tsconfig.app.json",
"tsconfig.spec.json",
"e2e/tsconfig.json"
"demo/tsconfig.app.json",
"demo/tsconfig.spec.json",
"demo/e2e/tsconfig.json"
],
"exclude": [
"**/node_modules/**"
Expand All @@ -113,16 +153,17 @@
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "e2e/protractor.conf.js",
"devServerTarget": "ngx-editor:serve"
"protractorConfig": "demo/e2e/protractor.conf.js",
"devServerTarget": "demo:serve"
},
"configurations": {
"production": {
"devServerTarget": "ngx-editor:serve:production"
"devServerTarget": "demo:serve:production"
}
}
}
}
}},
"defaultProject": "ngx-editor"
}
},
"defaultProject": "demo"
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion e2e/tsconfig.json → demo/e2e/tsconfig.json
@@ -1,5 +1,5 @@
{
"extends": "../tsconfig.json",
"extends": "../../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/e2e",
"module": "commonjs",
Expand Down
2 changes: 1 addition & 1 deletion karma.conf.js → demo/karma.conf.js
Expand Up @@ -16,7 +16,7 @@ module.exports = function (config) {
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
coverageIstanbulReporter: {
dir: require('path').join(__dirname, './coverage/ngx-editor'),
dir: require('path').join(__dirname, '../coverage/demo'),
reports: ['html', 'lcovonly', 'text-summary'],
fixWebpackSourcePaths: true
},
Expand Down
Expand Up @@ -2,7 +2,7 @@
<div class="content">
<div class="display">
<div class="logo">
<img src="../assets/icons/ngx-editor.svg" />
<img src="../assets/ngx-editor.svg" />
<div class="subtitle">A Simple WYSIWYG Editor for Angular Applications.</div>
</div>
<div class="badges" *ngIf="isProdMode">
Expand Down
File renamed without changes.
@@ -1,9 +1,9 @@
import { TestBed, async, ComponentFixture } from '@angular/core/testing';
import { FormsModule } from '@angular/forms';
import { By } from '@angular/platform-browser';
import { NgxEditorModule } from 'ngx-editor';

import { AppComponent } from './app.component';
import { NgxEditorModule } from './ngx-editor/ngx-editor.module';
import { DebugElement } from '@angular/core';

describe('AppComponent', () => {
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/app/app.module.ts → demo/src/app/app.module.ts
Expand Up @@ -3,7 +3,7 @@ import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';

import { AppComponent } from './app.component';
import { NgxEditorModule } from './ngx-editor/ngx-editor.module';
import { NgxEditorModule } from '../../../src/lib/ngx-editor.module';

@NgModule({
declarations: [
Expand Down
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
25 changes: 25 additions & 0 deletions demo/src/test.ts
@@ -0,0 +1,25 @@
// This file is required by karma.conf.js and loads recursively all the .spec and framework files

import 'zone.js/dist/zone-testing';
import { getTestBed } from '@angular/core/testing';
import {
BrowserDynamicTestingModule,
platformBrowserDynamicTesting
} from '@angular/platform-browser-dynamic/testing';

declare const require: {
context(path: string, deep?: boolean, filter?: RegExp): {
keys(): string[];
<T>(id: string): T;
};
};

// First, initialize the Angular testing environment.
getTestBed().initTestEnvironment(
BrowserDynamicTestingModule,
platformBrowserDynamicTesting()
);
// Then we find all the tests.
const context = require.context('./', true, /\.spec\.ts$/);
// And load the modules.
context.keys().map(context);
4 changes: 2 additions & 2 deletions tsconfig.app.json → demo/tsconfig.app.json
@@ -1,7 +1,7 @@
{
"extends": "./tsconfig.json",
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "./out-tsc/app",
"outDir": "../out-tsc/app",
"types": []
},
"files": [
Expand Down
4 changes: 2 additions & 2 deletions tsconfig.spec.json → demo/tsconfig.spec.json
@@ -1,7 +1,7 @@
{
"extends": "./tsconfig.json",
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "./out-tsc/spec",
"outDir": "../out-tsc/spec",
"types": [
"jasmine",
"node"
Expand Down
17 changes: 17 additions & 0 deletions demo/tslint.json
@@ -0,0 +1,17 @@
{
"extends": "../tslint.json",
"rules": {
"directive-selector": [
true,
"attribute",
"app",
"camelCase"
],
"component-selector": [
true,
"element",
"app",
"kebab-case"
]
}
}
47 changes: 45 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 30b513c

Please sign in to comment.