Upgrade all dependencies- Angular 6.1- TypeScript 2.9.2- office-ui-fabric-react 6.43.0
# Conflicts: # apps/demo/src/app/app.component.ts # libs/core/package-lock.json # libs/core/package.json # libs/fabric/package.json # libs/fabric/public-api.ts # libs/fabric/src/lib/components/command-bar/command-bar.component.ts # package-lock.json # package.json
This commit is contained in:
Родитель
bdd741179c
Коммит
3fde3c11c1
|
@ -1,186 +0,0 @@
|
||||||
{
|
|
||||||
"$schema": "./node_modules/@nrwl/schematics/src/schema.json",
|
|
||||||
"project": {
|
|
||||||
"name": "angular-react",
|
|
||||||
"latestMigration": "20180328-add-nx-lint"
|
|
||||||
},
|
|
||||||
"apps": [
|
|
||||||
{
|
|
||||||
"name": "docs",
|
|
||||||
"root": "apps/docs/src",
|
|
||||||
"outDir": "dist/apps/docs",
|
|
||||||
"assets": [
|
|
||||||
"assets",
|
|
||||||
"favicon.ico",
|
|
||||||
"404.html"
|
|
||||||
],
|
|
||||||
"index": "index.html",
|
|
||||||
"main": "main.ts",
|
|
||||||
"polyfills": "polyfills.ts",
|
|
||||||
"test": "../../../test.js",
|
|
||||||
"tsconfig": "tsconfig.app.json",
|
|
||||||
"testTsconfig": "../../../tsconfig.spec.json",
|
|
||||||
"prefix": "app",
|
|
||||||
"styles": [
|
|
||||||
"styles.scss"
|
|
||||||
],
|
|
||||||
"scripts": [],
|
|
||||||
"environmentSource": "environments/environment.ts",
|
|
||||||
"environments": {
|
|
||||||
"dev": "environments/environment.ts",
|
|
||||||
"prod": "environments/environment.prod.ts"
|
|
||||||
},
|
|
||||||
"tags": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "docs-from-packages",
|
|
||||||
"root": "apps/docs/src",
|
|
||||||
"outDir": "dist/apps/docs",
|
|
||||||
"assets": [
|
|
||||||
"assets",
|
|
||||||
"favicon.ico",
|
|
||||||
"404.html"
|
|
||||||
],
|
|
||||||
"index": "index.html",
|
|
||||||
"main": "main.ts",
|
|
||||||
"polyfills": "polyfills.ts",
|
|
||||||
"test": "../../../test.js",
|
|
||||||
"tsconfig": "tsconfig.packages.json",
|
|
||||||
"testTsconfig": "../../../tsconfig.spec.json",
|
|
||||||
"prefix": "app",
|
|
||||||
"styles": [
|
|
||||||
"styles.scss"
|
|
||||||
],
|
|
||||||
"scripts": [],
|
|
||||||
"environmentSource": "environments/environment.ts",
|
|
||||||
"environments": {
|
|
||||||
"dev": "environments/environment.ts",
|
|
||||||
"prod": "environments/environment.prod.ts"
|
|
||||||
},
|
|
||||||
"tags": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "demo",
|
|
||||||
"root": "apps/demo/src",
|
|
||||||
"outDir": "dist/apps/demo",
|
|
||||||
"assets": [
|
|
||||||
"assets",
|
|
||||||
"favicon.ico",
|
|
||||||
"404.html"
|
|
||||||
],
|
|
||||||
"index": "index.html",
|
|
||||||
"main": "main.ts",
|
|
||||||
"polyfills": "polyfills.ts",
|
|
||||||
"test": "../../../test.js",
|
|
||||||
"tsconfig": "tsconfig.app.json",
|
|
||||||
"testTsconfig": "../../../tsconfig.spec.json",
|
|
||||||
"prefix": "app",
|
|
||||||
"styles": [
|
|
||||||
"styles.css"
|
|
||||||
],
|
|
||||||
"scripts": [],
|
|
||||||
"environmentSource": "environments/environment.ts",
|
|
||||||
"environments": {
|
|
||||||
"dev": "environments/environment.ts",
|
|
||||||
"prod": "environments/environment.prod.ts"
|
|
||||||
},
|
|
||||||
"tags": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "demo-from-packages",
|
|
||||||
"root": "apps/demo/src",
|
|
||||||
"outDir": "dist/apps/demo",
|
|
||||||
"assets": [
|
|
||||||
"assets",
|
|
||||||
"favicon.ico",
|
|
||||||
"404.html"
|
|
||||||
],
|
|
||||||
"index": "index.html",
|
|
||||||
"main": "main.ts",
|
|
||||||
"polyfills": "polyfills.ts",
|
|
||||||
"test": "../../../test.js",
|
|
||||||
"tsconfig": "tsconfig.packages.json",
|
|
||||||
"testTsconfig": "../../../tsconfig.spec.json",
|
|
||||||
"prefix": "app",
|
|
||||||
"styles": [
|
|
||||||
"styles.css"
|
|
||||||
],
|
|
||||||
"scripts": [],
|
|
||||||
"environmentSource": "environments/environment.ts",
|
|
||||||
"environments": {
|
|
||||||
"dev": "environments/environment.ts",
|
|
||||||
"prod": "environments/environment.prod.ts"
|
|
||||||
},
|
|
||||||
"tags": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "core",
|
|
||||||
"appRoot": "",
|
|
||||||
"root": "libs/core/src",
|
|
||||||
"test": "../../../test.js",
|
|
||||||
"tags": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "fabric",
|
|
||||||
"appRoot": "",
|
|
||||||
"root": "libs/fabric/src",
|
|
||||||
"test": "../../../test.js",
|
|
||||||
"tags": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "semantic-ui",
|
|
||||||
"appRoot": "",
|
|
||||||
"root": "libs/semantic-ui/src",
|
|
||||||
"test": "../../../test.js",
|
|
||||||
"tags": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "$workspaceRoot",
|
|
||||||
"appRoot": "",
|
|
||||||
"root": ".",
|
|
||||||
"tags": []
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"e2e": {
|
|
||||||
"protractor": {
|
|
||||||
"config": "./protractor.conf.js"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"lint": [
|
|
||||||
{
|
|
||||||
"project": "./tsconfig.spec.json",
|
|
||||||
"exclude": "**/node_modules/**"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"project": "apps/docs/src/tsconfig.app.json",
|
|
||||||
"exclude": "**/node_modules/**"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"project": "apps/docs/e2e/tsconfig.e2e.json",
|
|
||||||
"exclude": "**/node_modules/**"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"project": "apps/demo/src/tsconfig.app.json",
|
|
||||||
"exclude": "**/node_modules/**"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"project": "apps/demo/e2e/tsconfig.e2e.json",
|
|
||||||
"exclude": "**/node_modules/**"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"test": {
|
|
||||||
"karma": {
|
|
||||||
"config": "./karma.conf.js"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"defaults": {
|
|
||||||
"styleExt": "scss",
|
|
||||||
"component": {},
|
|
||||||
"schematics": {
|
|
||||||
"collection": "@nrwl/schematics"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"warnings": {
|
|
||||||
"typescriptMismatch": false
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -0,0 +1,583 @@
|
||||||
|
{
|
||||||
|
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
|
||||||
|
"version": 1,
|
||||||
|
"newProjectRoot": "",
|
||||||
|
"projects": {
|
||||||
|
"docs": {
|
||||||
|
"root": "apps/docs",
|
||||||
|
"sourceRoot": "apps/docs/src",
|
||||||
|
"projectType": "application",
|
||||||
|
"architect": {
|
||||||
|
"build": {
|
||||||
|
"builder": "@angular-devkit/build-angular:browser",
|
||||||
|
"options": {
|
||||||
|
"outputPath": "dist/apps/docs",
|
||||||
|
"index": "apps/docs/src/index.html",
|
||||||
|
"main": "apps/docs/src/main.ts",
|
||||||
|
"tsConfig": "apps/docs/tsconfig.app.json",
|
||||||
|
"polyfills": "apps/docs/src/polyfills.ts",
|
||||||
|
"assets": [
|
||||||
|
"apps/docs/src/assets",
|
||||||
|
"apps/docs/src/favicon.ico",
|
||||||
|
"apps/docs/src/404.html"
|
||||||
|
],
|
||||||
|
"styles": [
|
||||||
|
"apps/docs/src/styles.scss"
|
||||||
|
],
|
||||||
|
"scripts": []
|
||||||
|
},
|
||||||
|
"configurations": {
|
||||||
|
"production": {
|
||||||
|
"optimization": true,
|
||||||
|
"outputHashing": "all",
|
||||||
|
"sourceMap": false,
|
||||||
|
"extractCss": true,
|
||||||
|
"namedChunks": false,
|
||||||
|
"aot": true,
|
||||||
|
"extractLicenses": true,
|
||||||
|
"vendorChunk": false,
|
||||||
|
"buildOptimizer": true,
|
||||||
|
"fileReplacements": [
|
||||||
|
{
|
||||||
|
"replace": "apps/docs/src/environments/environment.ts",
|
||||||
|
"with": "apps/docs/src/environments/environment.prod.ts"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"serve": {
|
||||||
|
"builder": "@angular-devkit/build-angular:dev-server",
|
||||||
|
"options": {
|
||||||
|
"browserTarget": "docs:build"
|
||||||
|
},
|
||||||
|
"configurations": {
|
||||||
|
"production": {
|
||||||
|
"browserTarget": "docs:build:production"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"extract-i18n": {
|
||||||
|
"builder": "@angular-devkit/build-angular:extract-i18n",
|
||||||
|
"options": {
|
||||||
|
"browserTarget": "docs:build"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"test": {
|
||||||
|
"builder": "@angular-devkit/build-angular:karma",
|
||||||
|
"options": {
|
||||||
|
"main": "apps/docs/src/test.ts",
|
||||||
|
"karmaConfig": "apps/docs/karma.conf.js",
|
||||||
|
"polyfills": "apps/docs/src/polyfills.ts",
|
||||||
|
"tsConfig": "apps/docs/tsconfig.spec.json",
|
||||||
|
"scripts": [],
|
||||||
|
"styles": [
|
||||||
|
"apps/docs/src/styles.scss"
|
||||||
|
],
|
||||||
|
"assets": [
|
||||||
|
"apps/docs/src/assets",
|
||||||
|
"apps/docs/src/favicon.ico",
|
||||||
|
"apps/docs/src/404.html"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"lint": {
|
||||||
|
"builder": "@angular-devkit/build-angular:tslint",
|
||||||
|
"options": {
|
||||||
|
"tsConfig": [
|
||||||
|
"apps/docs/tsconfig.app.json",
|
||||||
|
"apps/docs/tsconfig.spec.json"
|
||||||
|
],
|
||||||
|
"exclude": [
|
||||||
|
"**/node_modules/**"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"prefix": "app"
|
||||||
|
},
|
||||||
|
"docs-e2e": {
|
||||||
|
"root": "apps/docs-e2e",
|
||||||
|
"sourceRoot": "apps/docs-e2e/src",
|
||||||
|
"projectType": "application",
|
||||||
|
"architect": {
|
||||||
|
"e2e": {
|
||||||
|
"builder": "@angular-devkit/build-angular:protractor",
|
||||||
|
"options": {
|
||||||
|
"protractorConfig": "apps/docs-e2e/protractor.conf.js",
|
||||||
|
"devServerTarget": "docs:serve"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"lint": {
|
||||||
|
"builder": "@angular-devkit/build-angular:tslint",
|
||||||
|
"options": {
|
||||||
|
"tsConfig": [
|
||||||
|
"apps/docs-e2e/tsconfig.e2e.json"
|
||||||
|
],
|
||||||
|
"exclude": [
|
||||||
|
"**/node_modules/**"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"prefix": "app"
|
||||||
|
},
|
||||||
|
"docs-from-packages": {
|
||||||
|
"root": "apps/docs-from-packages",
|
||||||
|
"sourceRoot": "apps/docs-from-packages/src",
|
||||||
|
"projectType": "application",
|
||||||
|
"architect": {
|
||||||
|
"build": {
|
||||||
|
"builder": "@angular-devkit/build-angular:browser",
|
||||||
|
"options": {
|
||||||
|
"outputPath": "dist/apps/docs",
|
||||||
|
"index": "apps/docs/src/index.html",
|
||||||
|
"main": "apps/docs/src/main.ts",
|
||||||
|
"tsConfig": "apps/docs-from-packages/tsconfig.app.json",
|
||||||
|
"polyfills": "apps/docs/src/polyfills.ts",
|
||||||
|
"assets": [
|
||||||
|
"apps/docs/src/assets",
|
||||||
|
"apps/docs/src/favicon.ico",
|
||||||
|
"apps/docs/src/404.html"
|
||||||
|
],
|
||||||
|
"styles": [
|
||||||
|
"apps/docs/src/styles.scss"
|
||||||
|
],
|
||||||
|
"scripts": []
|
||||||
|
},
|
||||||
|
"configurations": {
|
||||||
|
"production": {
|
||||||
|
"optimization": true,
|
||||||
|
"outputHashing": "all",
|
||||||
|
"sourceMap": false,
|
||||||
|
"extractCss": true,
|
||||||
|
"namedChunks": false,
|
||||||
|
"aot": true,
|
||||||
|
"extractLicenses": true,
|
||||||
|
"vendorChunk": false,
|
||||||
|
"buildOptimizer": true,
|
||||||
|
"fileReplacements": [
|
||||||
|
{
|
||||||
|
"replace": "apps/docs/src/environments/environment.ts",
|
||||||
|
"with": "apps/docs/src/environments/environment.prod.ts"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"serve": {
|
||||||
|
"builder": "@angular-devkit/build-angular:dev-server",
|
||||||
|
"options": {
|
||||||
|
"browserTarget": "docs-from-packages:build"
|
||||||
|
},
|
||||||
|
"configurations": {
|
||||||
|
"production": {
|
||||||
|
"browserTarget": "docs-from-packages:build:production"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"extract-i18n": {
|
||||||
|
"builder": "@angular-devkit/build-angular:extract-i18n",
|
||||||
|
"options": {
|
||||||
|
"browserTarget": "docs-from-packages:build"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"test": {
|
||||||
|
"builder": "@angular-devkit/build-angular:karma",
|
||||||
|
"options": {
|
||||||
|
"main": "apps/docs-from-packages/src/test.ts",
|
||||||
|
"karmaConfig": "apps/docs-from-packages/karma.conf.js",
|
||||||
|
"polyfills": "apps/docs/src/polyfills.ts",
|
||||||
|
"tsConfig": "apps/docs-from-packages/tsconfig.spec.json",
|
||||||
|
"scripts": [],
|
||||||
|
"styles": [
|
||||||
|
"apps/docs/src/styles.scss"
|
||||||
|
],
|
||||||
|
"assets": [
|
||||||
|
"apps/docs/src/assets",
|
||||||
|
"apps/docs/src/favicon.ico",
|
||||||
|
"apps/docs/src/404.html"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"lint": {
|
||||||
|
"builder": "@angular-devkit/build-angular:tslint",
|
||||||
|
"options": {
|
||||||
|
"tsConfig": [
|
||||||
|
"apps/docs-from-packages/tsconfig.app.json",
|
||||||
|
"apps/docs-from-packages/tsconfig.spec.json"
|
||||||
|
],
|
||||||
|
"exclude": [
|
||||||
|
"**/node_modules/**"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"prefix": "app"
|
||||||
|
},
|
||||||
|
"docs-from-packages-e2e": {
|
||||||
|
"root": "apps/docs-from-packages-e2e",
|
||||||
|
"sourceRoot": "apps/docs-from-packages-e2e/src",
|
||||||
|
"projectType": "application",
|
||||||
|
"architect": {
|
||||||
|
"e2e": {
|
||||||
|
"builder": "@angular-devkit/build-angular:protractor",
|
||||||
|
"options": {
|
||||||
|
"protractorConfig": "apps/docs-from-packages-e2e/protractor.conf.js",
|
||||||
|
"devServerTarget": "docs-from-packages:serve"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"lint": {
|
||||||
|
"builder": "@angular-devkit/build-angular:tslint",
|
||||||
|
"options": {
|
||||||
|
"tsConfig": [
|
||||||
|
"apps/docs-from-packages-e2e/tsconfig.e2e.json"
|
||||||
|
],
|
||||||
|
"exclude": [
|
||||||
|
"**/node_modules/**"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"prefix": "app"
|
||||||
|
},
|
||||||
|
"demo": {
|
||||||
|
"root": "apps/demo",
|
||||||
|
"sourceRoot": "apps/demo/src",
|
||||||
|
"projectType": "application",
|
||||||
|
"architect": {
|
||||||
|
"build": {
|
||||||
|
"builder": "@angular-devkit/build-angular:browser",
|
||||||
|
"options": {
|
||||||
|
"outputPath": "dist/apps/demo",
|
||||||
|
"index": "apps/demo/src/index.html",
|
||||||
|
"main": "apps/demo/src/main.ts",
|
||||||
|
"tsConfig": "apps/demo/tsconfig.app.json",
|
||||||
|
"polyfills": "apps/demo/src/polyfills.ts",
|
||||||
|
"assets": [
|
||||||
|
"apps/demo/src/assets",
|
||||||
|
"apps/demo/src/favicon.ico",
|
||||||
|
"apps/demo/src/404.html"
|
||||||
|
],
|
||||||
|
"styles": [
|
||||||
|
"apps/demo/src/styles.css"
|
||||||
|
],
|
||||||
|
"scripts": []
|
||||||
|
},
|
||||||
|
"configurations": {
|
||||||
|
"production": {
|
||||||
|
"optimization": true,
|
||||||
|
"outputHashing": "all",
|
||||||
|
"sourceMap": false,
|
||||||
|
"extractCss": true,
|
||||||
|
"namedChunks": false,
|
||||||
|
"aot": true,
|
||||||
|
"extractLicenses": true,
|
||||||
|
"vendorChunk": false,
|
||||||
|
"buildOptimizer": true,
|
||||||
|
"fileReplacements": [
|
||||||
|
{
|
||||||
|
"replace": "apps/demo/src/environments/environment.ts",
|
||||||
|
"with": "apps/demo/src/environments/environment.prod.ts"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"serve": {
|
||||||
|
"builder": "@angular-devkit/build-angular:dev-server",
|
||||||
|
"options": {
|
||||||
|
"browserTarget": "demo:build"
|
||||||
|
},
|
||||||
|
"configurations": {
|
||||||
|
"production": {
|
||||||
|
"browserTarget": "demo:build:production"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"extract-i18n": {
|
||||||
|
"builder": "@angular-devkit/build-angular:extract-i18n",
|
||||||
|
"options": {
|
||||||
|
"browserTarget": "demo:build"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"test": {
|
||||||
|
"builder": "@angular-devkit/build-angular:karma",
|
||||||
|
"options": {
|
||||||
|
"main": "apps/demo/src/test.ts",
|
||||||
|
"karmaConfig": "apps/demo/karma.conf.js",
|
||||||
|
"polyfills": "apps/demo/src/polyfills.ts",
|
||||||
|
"tsConfig": "apps/demo/tsconfig.spec.json",
|
||||||
|
"scripts": [],
|
||||||
|
"styles": [
|
||||||
|
"apps/demo/src/styles.css"
|
||||||
|
],
|
||||||
|
"assets": [
|
||||||
|
"apps/demo/src/assets",
|
||||||
|
"apps/demo/src/favicon.ico",
|
||||||
|
"apps/demo/src/404.html"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"lint": {
|
||||||
|
"builder": "@angular-devkit/build-angular:tslint",
|
||||||
|
"options": {
|
||||||
|
"tsConfig": [
|
||||||
|
"apps/demo/tsconfig.app.json",
|
||||||
|
"apps/demo/tsconfig.spec.json"
|
||||||
|
],
|
||||||
|
"exclude": [
|
||||||
|
"**/node_modules/**"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"prefix": "app"
|
||||||
|
},
|
||||||
|
"demo-e2e": {
|
||||||
|
"root": "apps/demo-e2e",
|
||||||
|
"sourceRoot": "apps/demo-e2e/src",
|
||||||
|
"projectType": "application",
|
||||||
|
"architect": {
|
||||||
|
"e2e": {
|
||||||
|
"builder": "@angular-devkit/build-angular:protractor",
|
||||||
|
"options": {
|
||||||
|
"protractorConfig": "apps/demo-e2e/protractor.conf.js",
|
||||||
|
"devServerTarget": "demo:serve"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"lint": {
|
||||||
|
"builder": "@angular-devkit/build-angular:tslint",
|
||||||
|
"options": {
|
||||||
|
"tsConfig": [
|
||||||
|
"apps/demo-e2e/tsconfig.e2e.json"
|
||||||
|
],
|
||||||
|
"exclude": [
|
||||||
|
"**/node_modules/**"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"prefix": "app"
|
||||||
|
},
|
||||||
|
"demo-from-packages": {
|
||||||
|
"root": "apps/demo-from-packages",
|
||||||
|
"sourceRoot": "apps/demo-from-packages/src",
|
||||||
|
"projectType": "application",
|
||||||
|
"architect": {
|
||||||
|
"build": {
|
||||||
|
"builder": "@angular-devkit/build-angular:browser",
|
||||||
|
"options": {
|
||||||
|
"outputPath": "dist/apps/demo",
|
||||||
|
"index": "apps/demo/src/index.html",
|
||||||
|
"main": "apps/demo/src/main.ts",
|
||||||
|
"tsConfig": "apps/demo-from-packages/tsconfig.app.json",
|
||||||
|
"polyfills": "apps/demo/src/polyfills.ts",
|
||||||
|
"assets": [
|
||||||
|
"apps/demo/src/assets",
|
||||||
|
"apps/demo/src/favicon.ico",
|
||||||
|
"apps/demo/src/404.html"
|
||||||
|
],
|
||||||
|
"styles": [
|
||||||
|
"apps/demo/src/styles.css"
|
||||||
|
],
|
||||||
|
"scripts": []
|
||||||
|
},
|
||||||
|
"configurations": {
|
||||||
|
"production": {
|
||||||
|
"optimization": true,
|
||||||
|
"outputHashing": "all",
|
||||||
|
"sourceMap": false,
|
||||||
|
"extractCss": true,
|
||||||
|
"namedChunks": false,
|
||||||
|
"aot": true,
|
||||||
|
"extractLicenses": true,
|
||||||
|
"vendorChunk": false,
|
||||||
|
"buildOptimizer": true,
|
||||||
|
"fileReplacements": [
|
||||||
|
{
|
||||||
|
"replace": "apps/demo/src/environments/environment.ts",
|
||||||
|
"with": "apps/demo/src/environments/environment.prod.ts"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"serve": {
|
||||||
|
"builder": "@angular-devkit/build-angular:dev-server",
|
||||||
|
"options": {
|
||||||
|
"browserTarget": "demo-from-packages:build"
|
||||||
|
},
|
||||||
|
"configurations": {
|
||||||
|
"production": {
|
||||||
|
"browserTarget": "demo-from-packages:build:production"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"extract-i18n": {
|
||||||
|
"builder": "@angular-devkit/build-angular:extract-i18n",
|
||||||
|
"options": {
|
||||||
|
"browserTarget": "demo-from-packages:build"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"test": {
|
||||||
|
"builder": "@angular-devkit/build-angular:karma",
|
||||||
|
"options": {
|
||||||
|
"main": "apps/demo-from-packages/src/test.ts",
|
||||||
|
"karmaConfig": "apps/demo-from-packages/karma.conf.js",
|
||||||
|
"polyfills": "apps/demo/src/polyfills.ts",
|
||||||
|
"tsConfig": "apps/demo-from-packages/tsconfig.spec.json",
|
||||||
|
"scripts": [],
|
||||||
|
"styles": [
|
||||||
|
"apps/demo/src/styles.css"
|
||||||
|
],
|
||||||
|
"assets": [
|
||||||
|
"apps/demo/src/assets",
|
||||||
|
"apps/demo/src/favicon.ico",
|
||||||
|
"apps/demo/src/404.html"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"lint": {
|
||||||
|
"builder": "@angular-devkit/build-angular:tslint",
|
||||||
|
"options": {
|
||||||
|
"tsConfig": [
|
||||||
|
"apps/demo-from-packages/tsconfig.app.json",
|
||||||
|
"apps/demo-from-packages/tsconfig.spec.json"
|
||||||
|
],
|
||||||
|
"exclude": [
|
||||||
|
"**/node_modules/**"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"prefix": "app"
|
||||||
|
},
|
||||||
|
"demo-from-packages-e2e": {
|
||||||
|
"root": "apps/demo-from-packages-e2e",
|
||||||
|
"sourceRoot": "apps/demo-from-packages-e2e/src",
|
||||||
|
"projectType": "application",
|
||||||
|
"architect": {
|
||||||
|
"e2e": {
|
||||||
|
"builder": "@angular-devkit/build-angular:protractor",
|
||||||
|
"options": {
|
||||||
|
"protractorConfig": "apps/demo-from-packages-e2e/protractor.conf.js",
|
||||||
|
"devServerTarget": "demo-from-packages:serve"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"lint": {
|
||||||
|
"builder": "@angular-devkit/build-angular:tslint",
|
||||||
|
"options": {
|
||||||
|
"tsConfig": [
|
||||||
|
"apps/demo-from-packages-e2e/tsconfig.e2e.json"
|
||||||
|
],
|
||||||
|
"exclude": [
|
||||||
|
"**/node_modules/**"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"prefix": "app"
|
||||||
|
},
|
||||||
|
"core": {
|
||||||
|
"root": "libs/core",
|
||||||
|
"sourceRoot": "libs/core/src",
|
||||||
|
"projectType": "library",
|
||||||
|
"architect": {
|
||||||
|
"test": {
|
||||||
|
"builder": "@angular-devkit/build-angular:karma",
|
||||||
|
"options": {
|
||||||
|
"main": "libs/core/src/test.ts",
|
||||||
|
"karmaConfig": "libs/core/karma.conf.js",
|
||||||
|
"scripts": [],
|
||||||
|
"styles": [],
|
||||||
|
"assets": [],
|
||||||
|
"tsConfig": "libs/core/tsconfig.spec.json"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"lint": {
|
||||||
|
"builder": "@angular-devkit/build-angular:tslint",
|
||||||
|
"options": {
|
||||||
|
"tsConfig": [
|
||||||
|
"libs/core/tsconfig.lib.json",
|
||||||
|
"libs/core/tsconfig.spec.json"
|
||||||
|
],
|
||||||
|
"exclude": [
|
||||||
|
"**/node_modules/**"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"prefix": "app"
|
||||||
|
},
|
||||||
|
"fabric": {
|
||||||
|
"root": "libs/fabric",
|
||||||
|
"sourceRoot": "libs/fabric/src",
|
||||||
|
"projectType": "library",
|
||||||
|
"architect": {
|
||||||
|
"test": {
|
||||||
|
"builder": "@angular-devkit/build-angular:karma",
|
||||||
|
"options": {
|
||||||
|
"main": "libs/fabric/src/test.ts",
|
||||||
|
"karmaConfig": "libs/fabric/karma.conf.js",
|
||||||
|
"scripts": [],
|
||||||
|
"styles": [],
|
||||||
|
"assets": [],
|
||||||
|
"tsConfig": "libs/fabric/tsconfig.spec.json"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"lint": {
|
||||||
|
"builder": "@angular-devkit/build-angular:tslint",
|
||||||
|
"options": {
|
||||||
|
"tsConfig": [
|
||||||
|
"libs/fabric/tsconfig.lib.json",
|
||||||
|
"libs/fabric/tsconfig.spec.json"
|
||||||
|
],
|
||||||
|
"exclude": [
|
||||||
|
"**/node_modules/**"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"prefix": "app"
|
||||||
|
},
|
||||||
|
"semantic-ui": {
|
||||||
|
"root": "libs/semantic-ui",
|
||||||
|
"sourceRoot": "libs/semantic-ui/src",
|
||||||
|
"projectType": "library",
|
||||||
|
"architect": {
|
||||||
|
"test": {
|
||||||
|
"builder": "@angular-devkit/build-angular:karma",
|
||||||
|
"options": {
|
||||||
|
"main": "libs/semantic-ui/src/test.ts",
|
||||||
|
"karmaConfig": "libs/semantic-ui/karma.conf.js",
|
||||||
|
"scripts": [],
|
||||||
|
"styles": [],
|
||||||
|
"assets": [],
|
||||||
|
"tsConfig": "libs/semantic-ui/tsconfig.spec.json"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"lint": {
|
||||||
|
"builder": "@angular-devkit/build-angular:tslint",
|
||||||
|
"options": {
|
||||||
|
"tsConfig": [
|
||||||
|
"libs/semantic-ui/tsconfig.lib.json",
|
||||||
|
"libs/semantic-ui/tsconfig.spec.json"
|
||||||
|
],
|
||||||
|
"exclude": [
|
||||||
|
"**/node_modules/**"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"prefix": "app"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"defaultProject": "docs",
|
||||||
|
"cli": {
|
||||||
|
"warnings": {
|
||||||
|
"typescriptMismatch": false
|
||||||
|
},
|
||||||
|
"defaultCollection": "@nrwl/schematics"
|
||||||
|
}
|
||||||
|
}
|
|
@ -3,13 +3,11 @@
|
||||||
// https://github.com/angular/protractor/blob/master/lib/config.ts
|
// https://github.com/angular/protractor/blob/master/lib/config.ts
|
||||||
|
|
||||||
const { SpecReporter } = require('jasmine-spec-reporter');
|
const { SpecReporter } = require('jasmine-spec-reporter');
|
||||||
const { getAppDirectoryUsingCliConfig } = require('@nrwl/schematics/src/utils/cli-config-utils');
|
|
||||||
const appDir = getAppDirectoryUsingCliConfig();
|
|
||||||
|
|
||||||
exports.config = {
|
exports.config = {
|
||||||
allScriptsTimeout: 11000,
|
allScriptsTimeout: 11000,
|
||||||
specs: [
|
specs: [
|
||||||
appDir + '/e2e/**/*.e2e-spec.ts'
|
'./src/**/*.e2e-spec.ts'
|
||||||
],
|
],
|
||||||
capabilities: {
|
capabilities: {
|
||||||
'browserName': 'chrome'
|
'browserName': 'chrome'
|
||||||
|
@ -24,8 +22,9 @@ exports.config = {
|
||||||
},
|
},
|
||||||
onPrepare() {
|
onPrepare() {
|
||||||
require('ts-node').register({
|
require('ts-node').register({
|
||||||
project: appDir + '/e2e/tsconfig.e2e.json'
|
project: require('path').join(__dirname, './tsconfig.e2e.json')
|
||||||
});
|
});
|
||||||
jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
|
jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
{
|
||||||
|
"extends": "../../tsconfig.json",
|
||||||
|
"compilerOptions": {
|
||||||
|
"outDir": "../../dist/out-tsc/apps/demo-e2e",
|
||||||
|
"module": "commonjs",
|
||||||
|
"target": "es5",
|
||||||
|
"types": [
|
||||||
|
"jasmine",
|
||||||
|
"jasminewd2",
|
||||||
|
"node"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,30 @@
|
||||||
|
|
||||||
|
// Protractor configuration file, see link for more information
|
||||||
|
// https://github.com/angular/protractor/blob/master/lib/config.ts
|
||||||
|
|
||||||
|
const { SpecReporter } = require('jasmine-spec-reporter');
|
||||||
|
|
||||||
|
exports.config = {
|
||||||
|
allScriptsTimeout: 11000,
|
||||||
|
specs: [
|
||||||
|
'./src/**/*.e2e-spec.ts'
|
||||||
|
],
|
||||||
|
capabilities: {
|
||||||
|
'browserName': 'chrome'
|
||||||
|
},
|
||||||
|
directConnect: true,
|
||||||
|
baseUrl: 'http://localhost:4200/',
|
||||||
|
framework: 'jasmine',
|
||||||
|
jasmineNodeOpts: {
|
||||||
|
showColors: true,
|
||||||
|
defaultTimeoutInterval: 30000,
|
||||||
|
print: function() {}
|
||||||
|
},
|
||||||
|
onPrepare() {
|
||||||
|
require('ts-node').register({
|
||||||
|
project: require('path').join(__dirname, './tsconfig.e2e.json')
|
||||||
|
});
|
||||||
|
jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
{
|
||||||
|
"extends": "../../tsconfig.json",
|
||||||
|
"compilerOptions": {
|
||||||
|
"outDir": "../../dist/out-tsc/apps/demo-from-packages-e2e",
|
||||||
|
"module": "commonjs",
|
||||||
|
"target": "es5",
|
||||||
|
"types": [
|
||||||
|
"jasmine",
|
||||||
|
"jasminewd2",
|
||||||
|
"node"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,9 @@
|
||||||
|
# This file is currently used by autoprefixer to adjust CSS to support the below specified browsers
|
||||||
|
# For additional information regarding the format and rule options, please see:
|
||||||
|
# https://github.com/browserslist/browserslist#queries
|
||||||
|
# For IE 9-11 support, please uncomment the last line of the file and adjust as needed
|
||||||
|
> 0.5%
|
||||||
|
last 2 versions
|
||||||
|
Firefox ESR
|
||||||
|
not dead
|
||||||
|
# IE 9-11
|
|
@ -1,31 +1,26 @@
|
||||||
|
|
||||||
// Karma configuration file, see link for more information
|
// Karma configuration file, see link for more information
|
||||||
// https://karma-runner.github.io/1.0/config/configuration-file.html
|
// https://karma-runner.github.io/1.0/config/configuration-file.html
|
||||||
|
|
||||||
const { makeSureNoAppIsSelected } = require('@nrwl/schematics/src/utils/cli-config-utils');
|
|
||||||
// Nx only supports running unit tests for all apps and libs.
|
|
||||||
makeSureNoAppIsSelected();
|
|
||||||
|
|
||||||
module.exports = function (config) {
|
module.exports = function (config) {
|
||||||
config.set({
|
config.set({
|
||||||
basePath: '',
|
basePath: '',
|
||||||
frameworks: ['jasmine', '@angular/cli'],
|
frameworks: ['jasmine', '@angular-devkit/build-angular'],
|
||||||
plugins: [
|
plugins: [
|
||||||
require('karma-jasmine'),
|
require('karma-jasmine'),
|
||||||
require('karma-chrome-launcher'),
|
require('karma-chrome-launcher'),
|
||||||
require('karma-jasmine-html-reporter'),
|
require('karma-jasmine-html-reporter'),
|
||||||
require('karma-coverage-istanbul-reporter'),
|
require('karma-coverage-istanbul-reporter'),
|
||||||
require('@angular/cli/plugins/karma')
|
require('@angular-devkit/build-angular/plugins/karma')
|
||||||
],
|
],
|
||||||
client:{
|
client: {
|
||||||
clearContext: false // leave Jasmine Spec Runner output visible in browser
|
clearContext: false // leave Jasmine Spec Runner output visible in browser
|
||||||
},
|
},
|
||||||
coverageIstanbulReporter: {
|
coverageIstanbulReporter: {
|
||||||
reports: [ 'html', 'lcovonly' ],
|
dir: require('path').join(__dirname, '../../coverage'),
|
||||||
|
reports: ['html', 'lcovonly'],
|
||||||
fixWebpackSourcePaths: true
|
fixWebpackSourcePaths: true
|
||||||
},
|
},
|
||||||
angularCli: {
|
|
||||||
environment: 'dev'
|
|
||||||
},
|
|
||||||
reporters: ['progress', 'kjhtml'],
|
reporters: ['progress', 'kjhtml'],
|
||||||
port: 9876,
|
port: 9876,
|
||||||
colors: true,
|
colors: true,
|
||||||
|
@ -35,3 +30,4 @@ module.exports = function (config) {
|
||||||
singleRun: false
|
singleRun: false
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
// 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: any;
|
||||||
|
|
||||||
|
// 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);
|
|
@ -0,0 +1,14 @@
|
||||||
|
{
|
||||||
|
"extends": "../../tsconfig.json",
|
||||||
|
"compilerOptions": {
|
||||||
|
"outDir": "../../dist/out-tsc/apps/demo-from-packages",
|
||||||
|
"module": "es2015"
|
||||||
|
},
|
||||||
|
"include": [
|
||||||
|
"**/*.ts"
|
||||||
|
],
|
||||||
|
"exclude": [
|
||||||
|
"src/test.ts",
|
||||||
|
"**/*.spec.ts"
|
||||||
|
]
|
||||||
|
}
|
|
@ -0,0 +1,19 @@
|
||||||
|
{
|
||||||
|
"extends": "../../tsconfig.json",
|
||||||
|
"compilerOptions": {
|
||||||
|
"outDir": "../../dist/out-tsc/apps/demo-from-packages",
|
||||||
|
"types": [
|
||||||
|
"jasmine",
|
||||||
|
"node"
|
||||||
|
],
|
||||||
|
"module": "commonjs"
|
||||||
|
},
|
||||||
|
"files": [
|
||||||
|
"src/test.ts",
|
||||||
|
"src/polyfills.ts"
|
||||||
|
],
|
||||||
|
"include": [
|
||||||
|
"**/*.spec.ts",
|
||||||
|
"**/*.d.ts"
|
||||||
|
]
|
||||||
|
}
|
|
@ -0,0 +1,17 @@
|
||||||
|
{
|
||||||
|
"extends": "../../tslint.json",
|
||||||
|
"rules": {
|
||||||
|
"directive-selector": [
|
||||||
|
true,
|
||||||
|
"attribute",
|
||||||
|
"app",
|
||||||
|
"camelCase"
|
||||||
|
],
|
||||||
|
"component-selector": [
|
||||||
|
true,
|
||||||
|
"element",
|
||||||
|
"app",
|
||||||
|
"kebab-case"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,9 @@
|
||||||
|
# This file is currently used by autoprefixer to adjust CSS to support the below specified browsers
|
||||||
|
# For additional information regarding the format and rule options, please see:
|
||||||
|
# https://github.com/browserslist/browserslist#queries
|
||||||
|
# For IE 9-11 support, please uncomment the last line of the file and adjust as needed
|
||||||
|
> 0.5%
|
||||||
|
last 2 versions
|
||||||
|
Firefox ESR
|
||||||
|
not dead
|
||||||
|
# IE 9-11
|
|
@ -1,20 +0,0 @@
|
||||||
{
|
|
||||||
"extends": "../../../tsconfig.json",
|
|
||||||
"compilerOptions": {
|
|
||||||
"outDir": "../../../dist/out-tsc/e2e/demo",
|
|
||||||
"module": "commonjs",
|
|
||||||
"target": "es5",
|
|
||||||
"types": [
|
|
||||||
"jasmine",
|
|
||||||
"jasminewd2",
|
|
||||||
"node"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"include": [
|
|
||||||
"../**/*.ts"
|
|
||||||
/* add all lazy-loaded libraries here: "../../../libs/my-lib/index.ts" */
|
|
||||||
],
|
|
||||||
"exclude": [
|
|
||||||
"**/*.spec.ts"
|
|
||||||
]
|
|
||||||
}
|
|
|
@ -0,0 +1,33 @@
|
||||||
|
|
||||||
|
// 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'],
|
||||||
|
singleRun: false
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
// 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: any;
|
||||||
|
|
||||||
|
// 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);
|
|
@ -1,14 +0,0 @@
|
||||||
{
|
|
||||||
"extends": "../../../tsconfig.json",
|
|
||||||
"compilerOptions": {
|
|
||||||
"outDir": "../../../dist/out-tsc/apps/demo",
|
|
||||||
"module": "es2015"
|
|
||||||
},
|
|
||||||
"include": [
|
|
||||||
"**/*.ts"
|
|
||||||
/* add all lazy-loaded libraries here: "../../../libs/my-lib/index.ts" */
|
|
||||||
],
|
|
||||||
"exclude": [
|
|
||||||
"**/*.spec.ts"
|
|
||||||
]
|
|
||||||
}
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
{
|
||||||
|
"extends": "../../tsconfig.json",
|
||||||
|
"compilerOptions": {
|
||||||
|
"outDir": "../../dist/out-tsc/apps/demo",
|
||||||
|
"module": "es2015"
|
||||||
|
},
|
||||||
|
"include": [
|
||||||
|
"**/*.ts"
|
||||||
|
],
|
||||||
|
"exclude": [
|
||||||
|
"**/*.spec.ts",
|
||||||
|
"src/test.ts"
|
||||||
|
]
|
||||||
|
}
|
|
@ -0,0 +1,19 @@
|
||||||
|
{
|
||||||
|
"extends": "../../tsconfig.json",
|
||||||
|
"compilerOptions": {
|
||||||
|
"outDir": "../../dist/out-tsc/apps/demo",
|
||||||
|
"types": [
|
||||||
|
"jasmine",
|
||||||
|
"node"
|
||||||
|
],
|
||||||
|
"module": "commonjs"
|
||||||
|
},
|
||||||
|
"files": [
|
||||||
|
"src/test.ts",
|
||||||
|
"src/polyfills.ts"
|
||||||
|
],
|
||||||
|
"include": [
|
||||||
|
"**/*.spec.ts",
|
||||||
|
"**/*.d.ts"
|
||||||
|
]
|
||||||
|
}
|
|
@ -0,0 +1,17 @@
|
||||||
|
{
|
||||||
|
"extends": "../../tslint.json",
|
||||||
|
"rules": {
|
||||||
|
"directive-selector": [
|
||||||
|
true,
|
||||||
|
"attribute",
|
||||||
|
"app",
|
||||||
|
"camelCase"
|
||||||
|
],
|
||||||
|
"component-selector": [
|
||||||
|
true,
|
||||||
|
"element",
|
||||||
|
"app",
|
||||||
|
"kebab-case"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,30 @@
|
||||||
|
|
||||||
|
// Protractor configuration file, see link for more information
|
||||||
|
// https://github.com/angular/protractor/blob/master/lib/config.ts
|
||||||
|
|
||||||
|
const { SpecReporter } = require('jasmine-spec-reporter');
|
||||||
|
|
||||||
|
exports.config = {
|
||||||
|
allScriptsTimeout: 11000,
|
||||||
|
specs: [
|
||||||
|
'./src/**/*.e2e-spec.ts'
|
||||||
|
],
|
||||||
|
capabilities: {
|
||||||
|
'browserName': 'chrome'
|
||||||
|
},
|
||||||
|
directConnect: true,
|
||||||
|
baseUrl: 'http://localhost:4200/',
|
||||||
|
framework: 'jasmine',
|
||||||
|
jasmineNodeOpts: {
|
||||||
|
showColors: true,
|
||||||
|
defaultTimeoutInterval: 30000,
|
||||||
|
print: function() {}
|
||||||
|
},
|
||||||
|
onPrepare() {
|
||||||
|
require('ts-node').register({
|
||||||
|
project: require('path').join(__dirname, './tsconfig.e2e.json')
|
||||||
|
});
|
||||||
|
jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
{
|
||||||
|
"extends": "../../tsconfig.json",
|
||||||
|
"compilerOptions": {
|
||||||
|
"outDir": "../../dist/out-tsc/apps/docs-e2e",
|
||||||
|
"module": "commonjs",
|
||||||
|
"target": "es5",
|
||||||
|
"types": [
|
||||||
|
"jasmine",
|
||||||
|
"jasminewd2",
|
||||||
|
"node"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,30 @@
|
||||||
|
|
||||||
|
// Protractor configuration file, see link for more information
|
||||||
|
// https://github.com/angular/protractor/blob/master/lib/config.ts
|
||||||
|
|
||||||
|
const { SpecReporter } = require('jasmine-spec-reporter');
|
||||||
|
|
||||||
|
exports.config = {
|
||||||
|
allScriptsTimeout: 11000,
|
||||||
|
specs: [
|
||||||
|
'./src/**/*.e2e-spec.ts'
|
||||||
|
],
|
||||||
|
capabilities: {
|
||||||
|
'browserName': 'chrome'
|
||||||
|
},
|
||||||
|
directConnect: true,
|
||||||
|
baseUrl: 'http://localhost:4200/',
|
||||||
|
framework: 'jasmine',
|
||||||
|
jasmineNodeOpts: {
|
||||||
|
showColors: true,
|
||||||
|
defaultTimeoutInterval: 30000,
|
||||||
|
print: function() {}
|
||||||
|
},
|
||||||
|
onPrepare() {
|
||||||
|
require('ts-node').register({
|
||||||
|
project: require('path').join(__dirname, './tsconfig.e2e.json')
|
||||||
|
});
|
||||||
|
jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
{
|
||||||
|
"extends": "../../tsconfig.json",
|
||||||
|
"compilerOptions": {
|
||||||
|
"outDir": "../../dist/out-tsc/apps/docs-from-packages-e2e",
|
||||||
|
"module": "commonjs",
|
||||||
|
"target": "es5",
|
||||||
|
"types": [
|
||||||
|
"jasmine",
|
||||||
|
"jasminewd2",
|
||||||
|
"node"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,9 @@
|
||||||
|
# This file is currently used by autoprefixer to adjust CSS to support the below specified browsers
|
||||||
|
# For additional information regarding the format and rule options, please see:
|
||||||
|
# https://github.com/browserslist/browserslist#queries
|
||||||
|
# For IE 9-11 support, please uncomment the last line of the file and adjust as needed
|
||||||
|
> 0.5%
|
||||||
|
last 2 versions
|
||||||
|
Firefox ESR
|
||||||
|
not dead
|
||||||
|
# IE 9-11
|
|
@ -0,0 +1,33 @@
|
||||||
|
|
||||||
|
// 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'],
|
||||||
|
singleRun: false
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
// 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: any;
|
||||||
|
|
||||||
|
// 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);
|
|
@ -0,0 +1,14 @@
|
||||||
|
{
|
||||||
|
"extends": "../../tsconfig.json",
|
||||||
|
"compilerOptions": {
|
||||||
|
"outDir": "../../dist/out-tsc/apps/docs-from-packages",
|
||||||
|
"module": "es2015"
|
||||||
|
},
|
||||||
|
"include": [
|
||||||
|
"**/*.ts"
|
||||||
|
],
|
||||||
|
"exclude": [
|
||||||
|
"src/test.ts",
|
||||||
|
"**/*.spec.ts"
|
||||||
|
]
|
||||||
|
}
|
|
@ -0,0 +1,19 @@
|
||||||
|
{
|
||||||
|
"extends": "../../tsconfig.json",
|
||||||
|
"compilerOptions": {
|
||||||
|
"outDir": "../../dist/out-tsc/apps/docs-from-packages",
|
||||||
|
"types": [
|
||||||
|
"jasmine",
|
||||||
|
"node"
|
||||||
|
],
|
||||||
|
"module": "commonjs"
|
||||||
|
},
|
||||||
|
"files": [
|
||||||
|
"src/test.ts",
|
||||||
|
"src/polyfills.ts"
|
||||||
|
],
|
||||||
|
"include": [
|
||||||
|
"**/*.spec.ts",
|
||||||
|
"**/*.d.ts"
|
||||||
|
]
|
||||||
|
}
|
|
@ -0,0 +1,17 @@
|
||||||
|
{
|
||||||
|
"extends": "../../tslint.json",
|
||||||
|
"rules": {
|
||||||
|
"directive-selector": [
|
||||||
|
true,
|
||||||
|
"attribute",
|
||||||
|
"app",
|
||||||
|
"camelCase"
|
||||||
|
],
|
||||||
|
"component-selector": [
|
||||||
|
true,
|
||||||
|
"element",
|
||||||
|
"app",
|
||||||
|
"kebab-case"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,9 @@
|
||||||
|
# This file is currently used by autoprefixer to adjust CSS to support the below specified browsers
|
||||||
|
# For additional information regarding the format and rule options, please see:
|
||||||
|
# https://github.com/browserslist/browserslist#queries
|
||||||
|
# For IE 9-11 support, please uncomment the last line of the file and adjust as needed
|
||||||
|
> 0.5%
|
||||||
|
last 2 versions
|
||||||
|
Firefox ESR
|
||||||
|
not dead
|
||||||
|
# IE 9-11
|
|
@ -1,20 +0,0 @@
|
||||||
{
|
|
||||||
"extends": "../../../tsconfig.json",
|
|
||||||
"compilerOptions": {
|
|
||||||
"outDir": "../../../dist/out-tsc/e2e/docs-from-packages",
|
|
||||||
"module": "commonjs",
|
|
||||||
"target": "es5",
|
|
||||||
"types": [
|
|
||||||
"jasmine",
|
|
||||||
"jasminewd2",
|
|
||||||
"node"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"include": [
|
|
||||||
"../**/*.ts"
|
|
||||||
/* add all lazy-loaded libraries here: "../../../libs/my-lib/index.ts" */
|
|
||||||
],
|
|
||||||
"exclude": [
|
|
||||||
"**/*.spec.ts"
|
|
||||||
]
|
|
||||||
}
|
|
|
@ -0,0 +1,33 @@
|
||||||
|
|
||||||
|
// 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'],
|
||||||
|
singleRun: false
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
<h1>Microsoft Fabric [React] Components</h1>
|
<h1>Microsoft Fabric [React] Components</h1>
|
||||||
|
|
||||||
<h2>Button</h2>
|
<h2>Button</h2>
|
||||||
<fab-button label="Toggle Disabled" (onClick)="toggle()"></fab-button>
|
<fab-default-button text="Toggle Disabled" (onClick)="toggle()"></fab-default-button>
|
||||||
<fab-button [disabled]="disabled" (onClick)="click()" label="Primary Button{{ disabled ? ' (0)' : ' (2)' }}"></fab-button>
|
<fab-default-button [disabled]="disabled" (onClick)="click()" text="Primary Button{{ disabled ? ' (0)' : ' (2)' }}"></fab-default-button>
|
||||||
<fab-button [primary]="false" (onClick)="click()" label="Secondary Button"></fab-button>
|
<fab-default-button [primary]="false" (onClick)="click()" text="Secondary Button"></fab-default-button>
|
||||||
<h3 class="button-height">{{ sampleContent }}</h3>
|
<h3 class="button-height">{{ sampleContent }}</h3>
|
||||||
|
|
||||||
<hr />
|
<hr />
|
||||||
|
|
||||||
<h2>Dialog</h2>
|
<h2>Dialog</h2>
|
||||||
<fab-button label="Toggle Dialog" (onClick)="toggleDialog()"></fab-button>
|
<fab-default-button text="Toggle Dialog" (onClick)="toggleDialog()"></fab-default-button>
|
||||||
<fab-dialog [hidden]="dialogHidden" (onDismiss)="toggleDialog()" key="d2" title="Fabric [React] Dialog" subText="Use Fabric React components inside your Angular app!" [type]="DialogType.largeHeader">
|
<fab-dialog [hidden]="dialogHidden" (onDismiss)="toggleDialog()" title="Fabric [React] Dialog" subText="Use Fabric React components inside your Angular app!">
|
||||||
{{ sampleContent2 }} {{ sampleContent3 }}
|
{{ sampleContent2 }} {{ sampleContent3 }}
|
||||||
<fab-dialog-footer key="d3">
|
<fab-dialog-footer>
|
||||||
<fab-button (onClick)="clickSave()" label='Save' style="margin-right:10px;"></fab-button>
|
<fab-default-button (onClick)="clickSave()" text='Save' style="margin-right:10px;"></fab-default-button>
|
||||||
<fab-button (onClick)="toggleDialog()" label='Cancel'></fab-button>
|
<fab-default-button (onClick)="toggleDialog()" text='Cancel'></fab-default-button>
|
||||||
</fab-dialog-footer>
|
</fab-dialog-footer>
|
||||||
</fab-dialog>
|
</fab-dialog>
|
||||||
|
|
|
@ -1,14 +1,11 @@
|
||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import { DialogType } from 'office-ui-fabric-react/lib/Dialog';
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-fabric',
|
selector: 'app-fabric',
|
||||||
templateUrl: './fabric.component.html',
|
templateUrl: './fabric.component.html',
|
||||||
styleUrls: ['./fabric.component.scss']
|
styleUrls: ['./fabric.component.scss'],
|
||||||
})
|
})
|
||||||
export class FabricComponent {
|
export class FabricComponent {
|
||||||
DialogType = DialogType;
|
|
||||||
|
|
||||||
disabled = true;
|
disabled = true;
|
||||||
dialogHidden = true;
|
dialogHidden = true;
|
||||||
sampleContentCounter = 0;
|
sampleContentCounter = 0;
|
||||||
|
@ -23,7 +20,7 @@ export class FabricComponent {
|
||||||
constructor() {
|
constructor() {
|
||||||
const i = setInterval(() => {
|
const i = setInterval(() => {
|
||||||
this.secondsCounter += 1;
|
this.secondsCounter += 1;
|
||||||
this.sampleContent2 = `${this.secondsCounter} Seconds Passed`
|
this.sampleContent2 = `${this.secondsCounter} Seconds Passed`;
|
||||||
}, 1000);
|
}, 1000);
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
@ -47,5 +44,4 @@ export class FabricComponent {
|
||||||
clickSave() {
|
clickSave() {
|
||||||
this.sampleContent3 = 'Saved...';
|
this.sampleContent3 = 'Saved...';
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
// 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: any;
|
||||||
|
|
||||||
|
// 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);
|
|
@ -1,14 +0,0 @@
|
||||||
{
|
|
||||||
"extends": "../../../tsconfig.json",
|
|
||||||
"compilerOptions": {
|
|
||||||
"outDir": "../../../dist/out-tsc/apps/docs",
|
|
||||||
"module": "es2015"
|
|
||||||
},
|
|
||||||
"include": [
|
|
||||||
"**/*.ts"
|
|
||||||
/* add all lazy-loaded libraries here: "../../../libs/my-lib/index.ts" */
|
|
||||||
],
|
|
||||||
"exclude": [
|
|
||||||
"**/*.spec.ts"
|
|
||||||
]
|
|
||||||
}
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
{
|
||||||
|
"extends": "../../tsconfig.json",
|
||||||
|
"compilerOptions": {
|
||||||
|
"outDir": "../../dist/out-tsc/apps/docs",
|
||||||
|
"module": "es2015"
|
||||||
|
},
|
||||||
|
"include": [
|
||||||
|
"**/*.ts"
|
||||||
|
],
|
||||||
|
"exclude": [
|
||||||
|
"**/*.spec.ts",
|
||||||
|
"src/test.ts"
|
||||||
|
]
|
||||||
|
}
|
|
@ -0,0 +1,19 @@
|
||||||
|
{
|
||||||
|
"extends": "../../tsconfig.json",
|
||||||
|
"compilerOptions": {
|
||||||
|
"outDir": "../../dist/out-tsc/apps/docs",
|
||||||
|
"types": [
|
||||||
|
"jasmine",
|
||||||
|
"node"
|
||||||
|
],
|
||||||
|
"module": "commonjs"
|
||||||
|
},
|
||||||
|
"files": [
|
||||||
|
"src/test.ts",
|
||||||
|
"src/polyfills.ts"
|
||||||
|
],
|
||||||
|
"include": [
|
||||||
|
"**/*.spec.ts",
|
||||||
|
"**/*.d.ts"
|
||||||
|
]
|
||||||
|
}
|
|
@ -0,0 +1,17 @@
|
||||||
|
{
|
||||||
|
"extends": "../../tslint.json",
|
||||||
|
"rules": {
|
||||||
|
"directive-selector": [
|
||||||
|
true,
|
||||||
|
"attribute",
|
||||||
|
"app",
|
||||||
|
"camelCase"
|
||||||
|
],
|
||||||
|
"component-selector": [
|
||||||
|
true,
|
||||||
|
"element",
|
||||||
|
"app",
|
||||||
|
"kebab-case"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,33 @@
|
||||||
|
|
||||||
|
// 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'],
|
||||||
|
singleRun: false
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"$schema": "../../node_modules/ng-packagr/package.schema.json",
|
"$schema": "../../node_modules/ng-packagr/package.schema.json",
|
||||||
"name": "@angular-react/core",
|
"name": "@angular-react/core",
|
||||||
"version": "0.2.4",
|
"version": "0.3.0",
|
||||||
"ngPackage": {
|
"ngPackage": {
|
||||||
"lib": {
|
"lib": {
|
||||||
"languageLevel": [
|
"languageLevel": [
|
||||||
|
@ -21,7 +21,15 @@
|
||||||
"dest": "../../@angular-react/core"
|
"dest": "../../@angular-react/core"
|
||||||
},
|
},
|
||||||
"description": "Use React components inside Angular",
|
"description": "Use React components inside Angular",
|
||||||
"author": "Ben Feely <http://benfeely.com>",
|
"author": {
|
||||||
|
"name": "Ben Feely",
|
||||||
|
"url": "http://benfeely.com"
|
||||||
|
},
|
||||||
|
"contributors": [
|
||||||
|
{
|
||||||
|
"name": "Ben Grynhaus"
|
||||||
|
}
|
||||||
|
],
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://github.com/benfeely/angular-react/issues"
|
"url": "https://github.com/benfeely/angular-react/issues"
|
||||||
|
@ -38,15 +46,11 @@
|
||||||
],
|
],
|
||||||
"private": false,
|
"private": false,
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@angular/compiler": "^5.2.7",
|
"@angular/compiler": "^6.1.0",
|
||||||
"@angular/core": "^5.2.7",
|
"@angular/core": "^6.1.0",
|
||||||
"@angular/platform-browser-dynamic": "^5.2.7",
|
"@angular/platform-browser-dynamic": "^6.1.0",
|
||||||
"@angular/platform-browser": "^5.2.7",
|
"@angular/platform-browser": "^6.1.0",
|
||||||
"react-dom": "^16.3.1",
|
"react-dom": "^16.4.1",
|
||||||
"react": "^16.3.1"
|
"react": "^16.4.1"
|
||||||
},
|
|
||||||
"devDependencies": {
|
|
||||||
"@types/react-dom": "^16.0.4",
|
|
||||||
"@types/react": "^16.3.4"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1 @@
|
||||||
export { AngularReactBrowserModule } from './src/angular-react-browser.module';
|
export * from './src/public-api';
|
||||||
export * from './src/components/wrapper-component';
|
|
||||||
export { ReactContent } from './src/renderer/react-content';
|
|
||||||
export { registerElement } from './src/renderer/registry';
|
|
||||||
export { passProp, getPassProps, PassProp } from './src/renderer/pass-prop-decorator';
|
|
||||||
export * from './src/renderer/components/Disguise';
|
|
||||||
|
|
|
@ -6,8 +6,6 @@ import { AngularReactRendererFactory } from './renderer/renderer';
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [BrowserModule],
|
imports: [BrowserModule],
|
||||||
exports: [BrowserModule],
|
exports: [BrowserModule],
|
||||||
providers: [
|
providers: [{ provide: ɵDomRendererFactory2, useClass: AngularReactRendererFactory }],
|
||||||
{ provide: ɵDomRendererFactory2, useClass: AngularReactRendererFactory }
|
|
||||||
]
|
|
||||||
})
|
})
|
||||||
export class AngularReactBrowserModule { }
|
export class AngularReactBrowserModule {}
|
|
@ -63,7 +63,10 @@ export class Disguise extends React.PureComponent<DisguiseProps> {
|
||||||
|
|
||||||
const renderedChildren = ngChildComponents.map((child, index) => {
|
const renderedChildren = ngChildComponents.map((child, index) => {
|
||||||
const propsToPass = removeUndefinedProperties(
|
const propsToPass = removeUndefinedProperties(
|
||||||
getPassProps(child).reduce((acc, passProp) => Object.assign(acc, { [passProp.targetKey]: child[passProp.sourceKey] }), {})
|
getPassProps(child).reduce(
|
||||||
|
(acc, passProp) => Object.assign(acc, { [passProp.targetKey]: child[passProp.sourceKey] }),
|
||||||
|
{}
|
||||||
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
return React.createElement(disguiseChildrenAs, {
|
return React.createElement(disguiseChildrenAs, {
|
||||||
|
@ -75,8 +78,8 @@ export class Disguise extends React.PureComponent<DisguiseProps> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReactDOM.findDOMNode(childReactElement).appendChild(child.elementRef.nativeElement)
|
ReactDOM.findDOMNode(childReactElement).appendChild(child.elementRef.nativeElement);
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -92,8 +95,7 @@ export class Disguise extends React.PureComponent<DisguiseProps> {
|
||||||
}
|
}
|
||||||
|
|
||||||
const ChildRoot = child.type || disguiseChildrenAs;
|
const ChildRoot = child.type || disguiseChildrenAs;
|
||||||
return React.createElement(
|
return React.createElement(ChildRoot, { ...child.props, key: child.key }, child);
|
||||||
ChildRoot, { ...child.props, key: child.key }, child);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
return renderedChildren;
|
return renderedChildren;
|
|
@ -16,11 +16,10 @@ function passPropImpl(target: Object, propertyKey: PropertyKey, targetKey: Prope
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const passPropRename: (propName: string) => PropertyDecorator =
|
const passPropRename: (propName: string) => PropertyDecorator = propName => (target, propertyKey) =>
|
||||||
propName => (target, propertyKey) => passPropImpl(target, propertyKey, propName);
|
passPropImpl(target, propertyKey, propName);
|
||||||
|
|
||||||
const passPropDirect: PropertyDecorator =
|
const passPropDirect: PropertyDecorator = (target, propertyKey) => passPropImpl(target, propertyKey, propertyKey);
|
||||||
(target, propertyKey) => passPropImpl(target, propertyKey, propertyKey);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Decorator to specify a property that should be passed as a prop to the underlying React component implicitly.
|
* Decorator to specify a property that should be passed as a prop to the underlying React component implicitly.
|
||||||
|
@ -37,7 +36,7 @@ export function passProp(...args: any[]) {
|
||||||
return passPropRename(args[0]);
|
return passPropRename(args[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
throw new Error('[passProp] Only 0 or 1 arguments accepted.')
|
throw new Error('[passProp] Only 0 or 1 arguments accepted.');
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getPassProps<T extends object>(obj: T): PassProp[] {
|
export function getPassProps<T extends object>(obj: T): PassProp[] {
|
|
@ -1,7 +1,7 @@
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
|
|
||||||
import { Disguise } from "./components/Disguise";
|
import { Disguise } from './components/Disguise';
|
||||||
import { ReactContent } from "./react-content";
|
import { ReactContent } from './react-content';
|
||||||
|
|
||||||
export type ComponentResolver = () => React.ReactType;
|
export type ComponentResolver = () => React.ReactType;
|
||||||
|
|
||||||
|
@ -13,10 +13,7 @@ const camelCaseSplit = /([a-z0-9])([A-Z])/g;
|
||||||
* @param elementName the tag
|
* @param elementName the tag
|
||||||
* @param resolver A resolver to the React component
|
* @param resolver A resolver to the React component
|
||||||
*/
|
*/
|
||||||
export function registerElement(
|
export function registerElement(elementName: string, resolver: ComponentResolver): void {
|
||||||
elementName: string,
|
|
||||||
resolver: ComponentResolver
|
|
||||||
): void {
|
|
||||||
if (elementMap.has(elementName)) {
|
if (elementMap.has(elementName)) {
|
||||||
// Ignore multiple register attempts for the same component.
|
// Ignore multiple register attempts for the same component.
|
||||||
// Angular doesn't allow sharing whole NgModule instances (in this case, an @NgModule for React-wrapped components) with lazy-loaded @NgModules (in the app),
|
// Angular doesn't allow sharing whole NgModule instances (in this case, an @NgModule for React-wrapped components) with lazy-loaded @NgModules (in the app),
|
||||||
|
@ -28,24 +25,16 @@ export function registerElement(
|
||||||
const entry = { resolver: resolver };
|
const entry = { resolver: resolver };
|
||||||
elementMap.set(elementName, entry);
|
elementMap.set(elementName, entry);
|
||||||
elementMap.set(elementName.toLowerCase(), entry);
|
elementMap.set(elementName.toLowerCase(), entry);
|
||||||
elementMap.set(
|
elementMap.set(elementName.replace(camelCaseSplit, '$1-$2').toLowerCase(), entry);
|
||||||
elementName.replace(camelCaseSplit, '$1-$2').toLowerCase(),
|
|
||||||
entry
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export function isKnownComponent(elementName: string): boolean {
|
export function isKnownComponent(elementName: string): boolean {
|
||||||
return (
|
return elementMap.has(elementName) || elementMap.has(elementName.toLowerCase());
|
||||||
elementMap.has(elementName) || elementMap.has(elementName.toLowerCase())
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getComponentClass(
|
export function getComponentClass(elementName: string): React.ReactType {
|
||||||
elementName: string
|
const entry = elementMap.get(elementName) || elementMap.get(elementName.toLowerCase());
|
||||||
): React.ReactType {
|
|
||||||
const entry =
|
|
||||||
elementMap.get(elementName) || elementMap.get(elementName.toLowerCase());
|
|
||||||
if (!entry) {
|
if (!entry) {
|
||||||
// throw new TypeError(`No known component for element ${elementName}.`);
|
// throw new TypeError(`No known component for element ${elementName}.`);
|
||||||
return elementName;
|
return elementName;
|
|
@ -1,7 +1,6 @@
|
||||||
import removeUndefinedProperties from './remove-undefined-properties';
|
import removeUndefinedProperties from './remove-undefined-properties';
|
||||||
|
|
||||||
describe('object utils', () => {
|
describe('object utils', () => {
|
||||||
|
|
||||||
describe('remove undefined', () => {
|
describe('remove undefined', () => {
|
||||||
it('should remove only undefined properties', () => {
|
it('should remove only undefined properties', () => {
|
||||||
const obj = {
|
const obj = {
|
||||||
|
@ -19,5 +18,5 @@ describe('object utils', () => {
|
||||||
keep4: false,
|
keep4: false,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
})
|
});
|
||||||
});
|
});
|
|
@ -0,0 +1,6 @@
|
||||||
|
export { AngularReactBrowserModule } from './lib/angular-react-browser.module';
|
||||||
|
export * from './lib/components/wrapper-component';
|
||||||
|
export * from './lib/renderer/components/Disguise';
|
||||||
|
export { getPassProps, passProp, PassProp } from './lib/renderer/pass-prop-decorator';
|
||||||
|
export { ReactContent } from './lib/renderer/react-content';
|
||||||
|
export { registerElement } from './lib/renderer/registry';
|
|
@ -0,0 +1,16 @@
|
||||||
|
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
|
||||||
|
|
||||||
|
import 'core-js/es7/reflect';
|
||||||
|
import 'zone.js/dist/zone';
|
||||||
|
import 'zone.js/dist/zone-testing';
|
||||||
|
import { getTestBed } from '@angular/core/testing';
|
||||||
|
import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing';
|
||||||
|
|
||||||
|
declare const require: any;
|
||||||
|
|
||||||
|
// 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);
|
|
@ -0,0 +1,33 @@
|
||||||
|
{
|
||||||
|
"extends": "../../tsconfig.json",
|
||||||
|
"compilerOptions": {
|
||||||
|
"outDir": "../../out-tsc/libs/core",
|
||||||
|
"target": "es2015",
|
||||||
|
"module": "es2015",
|
||||||
|
"moduleResolution": "node",
|
||||||
|
"declaration": true,
|
||||||
|
"sourceMap": true,
|
||||||
|
"inlineSources": true,
|
||||||
|
"emitDecoratorMetadata": true,
|
||||||
|
"experimentalDecorators": true,
|
||||||
|
"importHelpers": true,
|
||||||
|
"types": [],
|
||||||
|
"lib": [
|
||||||
|
"dom",
|
||||||
|
"es2015"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"angularCompilerOptions": {
|
||||||
|
"annotateForClosureCompiler": true,
|
||||||
|
"skipTemplateCodegen": true,
|
||||||
|
"strictMetadataEmit": true,
|
||||||
|
"fullTemplateTypeCheck": true,
|
||||||
|
"strictInjectionParameters": true,
|
||||||
|
"flatModuleId": "AUTOGENERATED",
|
||||||
|
"flatModuleOutFile": "AUTOGENERATED"
|
||||||
|
},
|
||||||
|
"exclude": [
|
||||||
|
"src/test.ts",
|
||||||
|
"**/*.spec.ts"
|
||||||
|
]
|
||||||
|
}
|
|
@ -0,0 +1,17 @@
|
||||||
|
{
|
||||||
|
"extends": "../../tsconfig.json",
|
||||||
|
"compilerOptions": {
|
||||||
|
"outDir": "../../dist/out-tsc/libs/core",
|
||||||
|
"types": [
|
||||||
|
"jasmine",
|
||||||
|
"node"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"files": [
|
||||||
|
"src/test.ts"
|
||||||
|
],
|
||||||
|
"include": [
|
||||||
|
"**/*.spec.ts",
|
||||||
|
"**/*.d.ts"
|
||||||
|
]
|
||||||
|
}
|
|
@ -0,0 +1,17 @@
|
||||||
|
{
|
||||||
|
"extends": "../../tslint.json",
|
||||||
|
"rules": {
|
||||||
|
"directive-selector": [
|
||||||
|
true,
|
||||||
|
"attribute",
|
||||||
|
"app",
|
||||||
|
"camelCase"
|
||||||
|
],
|
||||||
|
"component-selector": [
|
||||||
|
true,
|
||||||
|
"element",
|
||||||
|
"app",
|
||||||
|
"kebab-case"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,33 @@
|
||||||
|
|
||||||
|
// 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'],
|
||||||
|
singleRun: false
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"$schema": "../../node_modules/ng-packagr/package.schema.json",
|
"$schema": "../../node_modules/ng-packagr/package.schema.json",
|
||||||
"name": "@angular-react/fabric",
|
"name": "@angular-react/fabric",
|
||||||
"version": "0.2.4",
|
"version": "0.3.0",
|
||||||
"ngPackage": {
|
"ngPackage": {
|
||||||
"lib": {
|
"lib": {
|
||||||
"entryFile": "public-api.ts",
|
"entryFile": "public-api.ts",
|
||||||
|
@ -42,7 +42,15 @@
|
||||||
"dest": "../../@angular-react/fabric"
|
"dest": "../../@angular-react/fabric"
|
||||||
},
|
},
|
||||||
"description": "Use Fabric React components inside Angular",
|
"description": "Use Fabric React components inside Angular",
|
||||||
"author": "Ben Feely <http://benfeely.com>",
|
"author": {
|
||||||
|
"name": "Ben Feely",
|
||||||
|
"url": "http://benfeely.com"
|
||||||
|
},
|
||||||
|
"contributors": [
|
||||||
|
{
|
||||||
|
"name": "Ben Grynhaus"
|
||||||
|
}
|
||||||
|
],
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://github.com/benfeely/angular-react/issues"
|
"url": "https://github.com/benfeely/angular-react/issues"
|
||||||
|
@ -62,17 +70,13 @@
|
||||||
],
|
],
|
||||||
"private": false,
|
"private": false,
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@angular-react/core": "^0.2.4",
|
"@angular-react/core": "^0.3.0",
|
||||||
"@angular/common": "^5.2.7",
|
"@angular/common": "^6.1.0",
|
||||||
"@angular/core": "^5.2.7",
|
"@angular/core": "^6.1.0",
|
||||||
"@angular/platform-browser-dynamic": "^5.2.7",
|
"@angular/platform-browser-dynamic": "^6.1.0",
|
||||||
"@angular/platform-browser": "^5.2.7",
|
"@angular/platform-browser": "^6.1.0",
|
||||||
"office-ui-fabric-react": "6.22.0",
|
"office-ui-fabric-react": "6.43.0",
|
||||||
"react-dom": "^16.3.1",
|
"react-dom": "^16.4.1",
|
||||||
"react": "^16.3.1"
|
"react": "^16.4.1"
|
||||||
},
|
|
||||||
"devDependencies": {
|
|
||||||
"@types/react-dom": "^16.0.4",
|
|
||||||
"@types/react": "^16.3.4"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,31 +1,2 @@
|
||||||
export * from './src/components/breadcrumb/public-api';
|
export * from './src/public-api';
|
||||||
export * from './src/components/button/public-api';
|
|
||||||
export * from './src/components/callout/public-api';
|
|
||||||
export * from './src/components/checkbox/public-api';
|
|
||||||
export * from './src/components/contextual-menu/public-api';
|
export * from './src/components/contextual-menu/public-api';
|
||||||
export * from './src/components/choice-group/public-api';
|
|
||||||
export * from './src/components/combo-box/public-api';
|
|
||||||
export * from './src/components/command-bar/public-api';
|
|
||||||
export * from './src/components/date-picker/public-api';
|
|
||||||
export * from './src/components/dialog/public-api';
|
|
||||||
export * from './src/components/divider/public-api';
|
|
||||||
export * from './src/components/fabric/public-api';
|
|
||||||
export * from './src/components/grouped-list/public-api';
|
|
||||||
export * from './src/components/icon/public-api';
|
|
||||||
export * from './src/components/image/public-api';
|
|
||||||
export * from './src/components/panel/public-api';
|
|
||||||
export * from './src/components/persona/public-api';
|
|
||||||
export * from './src/components/spinner/public-api';
|
|
||||||
export * from './src/components/message-bar/public-api';
|
|
||||||
export * from './src/components/link/public-api';
|
|
||||||
export * from './src/components/pivot/public-api';
|
|
||||||
export * from './src/components/toggle/public-api';
|
|
||||||
export * from './src/components/hover-card/public-api';
|
|
||||||
export * from './src/components/tooltip/public-api';
|
|
||||||
export * from './src/components/modal/public-api';
|
|
||||||
export * from './src/components/shimmer/public-api';
|
|
||||||
export * from './src/components/slider/public-api';
|
|
||||||
export * from './src/components/search-box/public-api';
|
|
||||||
|
|
||||||
// Pickers had some warnings at runtime. Leaving out of public API for now
|
|
||||||
// export * from './src/components/pickers/public-api';
|
|
||||||
|
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче