From 95f5a445398cc0337b7eb633ebca3297c3c6007a Mon Sep 17 00:00:00 2001 From: aboyko Date: Wed, 1 Mar 2023 11:37:40 -0500 Subject: [PATCH] Wrapping up flo changes --- angular.json | 141 ++---------------- package.json | 51 +++++-- .../demo/app/properties-editor.service.ts | 2 +- .../@types/codemirror-minified/index.d.ts | 0 .../code-editor/code-editor.component.html | 0 .../code-editor/code-editor.component.scss | 0 .../code-editor/code-editor.component.ts | 0 projects/{lib => flo}/directives/resizer.ts | 0 .../dsl-editor/dsl-editor.component.html | 0 .../dsl-editor/dsl-editor.component.scss | 0 .../dsl-editor/dsl-editor.component.ts | 0 projects/{lib => flo}/editor/editor-utils.ts | 0 .../{lib => flo}/editor/editor.component.html | 0 .../{lib => flo}/editor/editor.component.scss | 0 .../{lib => flo}/editor/editor.component.ts | 0 .../{lib => flo}/editor/paper.component.ts | 0 projects/{lib => flo}/index.ts | 0 projects/{lib => flo}/module.ts | 0 projects/{lib => flo}/ng-package.json | 2 +- projects/{lib => flo}/package.json | 0 .../palette/palette.component.html | 0 .../palette/palette.component.scss | 0 .../{lib => flo}/palette/palette.component.ts | 0 .../properties/df.property.component.html | 0 .../properties/df.property.component.ts | 0 .../properties.group.component.html | 0 .../properties/properties.group.component.ts | 0 projects/{lib => flo}/shared/flo-common.ts | 0 .../{lib => flo}/shared/flo-properties.ts | 0 projects/{lib => flo}/shared/logger.ts | 0 projects/{lib => flo}/shared/shapes.ts | 0 projects/{lib => flo}/styles.scss | 0 projects/flo/tsconfig.dev.json | 15 ++ projects/flo/tsconfig.prod.json | 13 ++ tsconfig.json | 5 +- 35 files changed, 78 insertions(+), 151 deletions(-) rename projects/{lib => flo}/@types/codemirror-minified/index.d.ts (100%) rename projects/{lib => flo}/code-editor/code-editor.component.html (100%) rename projects/{lib => flo}/code-editor/code-editor.component.scss (100%) rename projects/{lib => flo}/code-editor/code-editor.component.ts (100%) rename projects/{lib => flo}/directives/resizer.ts (100%) rename projects/{lib => flo}/dsl-editor/dsl-editor.component.html (100%) rename projects/{lib => flo}/dsl-editor/dsl-editor.component.scss (100%) rename projects/{lib => flo}/dsl-editor/dsl-editor.component.ts (100%) rename projects/{lib => flo}/editor/editor-utils.ts (100%) rename projects/{lib => flo}/editor/editor.component.html (100%) rename projects/{lib => flo}/editor/editor.component.scss (100%) rename projects/{lib => flo}/editor/editor.component.ts (100%) rename projects/{lib => flo}/editor/paper.component.ts (100%) rename projects/{lib => flo}/index.ts (100%) rename projects/{lib => flo}/module.ts (100%) rename projects/{lib => flo}/ng-package.json (87%) rename projects/{lib => flo}/package.json (100%) rename projects/{lib => flo}/palette/palette.component.html (100%) rename projects/{lib => flo}/palette/palette.component.scss (100%) rename projects/{lib => flo}/palette/palette.component.ts (100%) rename projects/{lib => flo}/properties/df.property.component.html (100%) rename projects/{lib => flo}/properties/df.property.component.ts (100%) rename projects/{lib => flo}/properties/properties.group.component.html (100%) rename projects/{lib => flo}/properties/properties.group.component.ts (100%) rename projects/{lib => flo}/shared/flo-common.ts (100%) rename projects/{lib => flo}/shared/flo-properties.ts (100%) rename projects/{lib => flo}/shared/logger.ts (100%) rename projects/{lib => flo}/shared/shapes.ts (100%) rename projects/{lib => flo}/styles.scss (100%) create mode 100644 projects/flo/tsconfig.dev.json create mode 100644 projects/flo/tsconfig.prod.json diff --git a/angular.json b/angular.json index 3e189c6..aeca199 100644 --- a/angular.json +++ b/angular.json @@ -5,20 +5,20 @@ "projects": { "spring-flo": { "projectType": "library", - "root": "projects/lib", - "sourceRoot": "projects/lib", + "root": "projects/flo", + "sourceRoot": "projects/flo", "architect": { "build": { "builder": "@angular-devkit/build-angular:ng-packagr", "options": { - "project": "projects/lib/ng-package.json" + "project": "projects/flo/ng-package.json" }, "configurations": { "production": { - "tsConfig": "tsconfig.json" + "tsConfig": "projects/flo/tsconfig.prod.json" }, "development": { - "tsConfig": "tsconfig.json" + "tsConfig": "projects/flo/tsconfig.dev.json" } }, "defaultConfiguration": "production" @@ -47,7 +47,9 @@ "projects/demo/favicon.ico", "projects/demo/icons" ], - "styles": ["projects/demo/styles.css"], + "styles": [ + "projects/demo/styles.css" + ], "scripts": [] }, "configurations": { @@ -112,132 +114,9 @@ "projects/demo/favicon.ico", "projects/demo/icons" ], - "styles": ["projects/demo/styles.css"], - "scripts": [] - } - } - } - }, - "@mycomp/ui-sdk": { - "projectType": "library", - "root": "projects/mycomp/ui-sdk", - "sourceRoot": "projects/mycomp/ui-sdk", - "prefix": "lib", - "architect": { - "build": { - "builder": "@angular-devkit/build-angular:ng-packagr", - "options": { - "project": "projects/mycomp/ui-sdk/ng-package.json", - }, - "configurations": { - "production": { - "tsConfig": "projects/mycomp/ui-sdk/tsconfig.lib.prod.json" - }, - "development": { - "tsConfig": "projects/mycomp/ui-sdk/tsconfig.lib.json" - } - }, - "defaultConfiguration": "production" - }, - "test": { - "builder": "@angular-devkit/build-angular:karma", - "options": { - "main": "projects/mycomp/ui-sdk/test.ts", - "tsConfig": "projects/mycomp/ui-sdk/tsconfig.spec.json", - "karmaConfig": "projects/mycomp/ui-sdk/karma.conf.js" - } - } - } - }, - "showcase": { - "projectType": "application", - "schematics": { - "@schematics/angular:application": { - "strict": true - } - }, - "root": "projects/showcase", - "sourceRoot": "projects/showcase/src", - "prefix": "app", - "architect": { - "build": { - "builder": "@angular-devkit/build-angular:browser", - "options": { - "outputPath": "dist/showcase", - "index": "projects/showcase/src/index.html", - "main": "projects/showcase/src/main.ts", - "polyfills": "projects/showcase/src/polyfills.ts", - "tsConfig": "projects/showcase/tsconfig.app.json", - "assets": [ - "projects/showcase/src/favicon.ico", - "projects/showcase/src/assets" + "styles": [ + "projects/demo/styles.css" ], - "styles": ["projects/showcase/src/styles.css"], - "scripts": [] - }, - "configurations": { - "production": { - "budgets": [ - { - "type": "initial", - "maximumWarning": "500kb", - "maximumError": "1mb" - }, - { - "type": "anyComponentStyle", - "maximumWarning": "2kb", - "maximumError": "4kb" - } - ], - "fileReplacements": [ - { - "replace": "projects/showcase/src/environments/environment.ts", - "with": "projects/showcase/src/environments/environment.prod.ts" - } - ], - "outputHashing": "all" - }, - "development": { - "buildOptimizer": false, - "optimization": false, - "vendorChunk": true, - "extractLicenses": false, - "sourceMap": true, - "namedChunks": true - } - }, - "defaultConfiguration": "production" - }, - "serve": { - "builder": "@angular-devkit/build-angular:dev-server", - "configurations": { - "production": { - "browserTarget": "showcase:build:production" - }, - "development": { - "browserTarget": "showcase:build:development" - } - }, - "defaultConfiguration": "development" - }, - "extract-i18n": { - "builder": "@angular-devkit/build-angular:extract-i18n", - "options": { - "browserTarget": "showcase:build" - } - }, - "test": { - "builder": "@angular-devkit/build-angular:karma", - "options": { - "main": "projects/showcase/src/test.ts", - "polyfills": "projects/showcase/src/polyfills.ts", - "tsConfig": "projects/showcase/tsconfig.spec.json", - "karmaConfig": "projects/showcase/karma.conf.js", - "assets": [ - "projects/showcase/src/favicon.ico", - "projects/showcase/src/assets" - ], - "styles": ["projects/showcase/src/styles.css"], "scripts": [] } } diff --git a/package.json b/package.json index ad2d304..71af3aa 100644 --- a/package.json +++ b/package.json @@ -5,16 +5,17 @@ "ng": "ng", "start": "npm-run-all clean --parallel flo:watch demo:start-waiton", "build": "run-s flo:build demo:build", + "prepare": "npm run build", "test": "run-p flo:test demo:test", "test-coverage": "run-p flo:test-coverage demo:test-coverage", "flo:build": "ng build spring-flo && npm run flo:styles", - "flo:styles": "scss-bundle --entryFile projects/lib/styles.scss --outFile dist/spring-flo/flo.css", + "flo:styles": "scss-bundle --entryFile projects/flo/styles.scss --outFile dist/flo/flo.css", "flo:watch": "ng build spring-flo --watch --configuration development", "flo:test": "ng test spring-flo", "flo:test-coverage": "ng test spring-flo --no-watch --code-coverage", - "demo:start-waiton": "wait-on dist/spring-flo/package.json && npm run demo:start", + "demo:start-waiton": "wait-on dist/flo/package.json && npm run demo:start", "demo:start": "ng serve demo", "demo:build": "ng build demo", "demo:watch": "ng build demo --watch --configuration development", @@ -31,20 +32,20 @@ }, "devDependencies": { - "@angular-devkit/build-angular": "^15.0.1", - "@angular/cli": "^15.0.1", - "@angular/compiler-cli": "^15.0.1", + "@angular-devkit/build-angular": "~15.1.5", + "@angular/cli": "~15.1.5", + "@angular/compiler-cli": "~15.1.5", - "@angular/animations": "^15.0.1", - "@angular/common": "^15.0.1", - "@angular/compiler": "^15.0.1", - "@angular/core": "^15.0.1", - "@angular/forms": "^15.0.1", - "@angular/platform-browser": "^15.0.1", - "@angular/platform-browser-dynamic": "^15.0.1", - "@angular/router": "^15.0.1", - "rxjs": "~7.5.0", - "tslib": "^2.3.0", + "@angular/animations": "~15.1.5", + "@angular/common": "~15.1.5", + "@angular/compiler": "~15.1.5", + "@angular/core": "~15.1.5", + "@angular/forms": "~15.1.5", + "@angular/platform-browser": "~15.1.5", + "@angular/platform-browser-dynamic": "~15.1.5", + "@angular/router": "~15.1.5", + "rxjs": "~7.8.0", + "tslib": "^2.5.0", "zone.js": "~0.11.4", "@types/resize-observer-browser": "^0.1.3", @@ -69,5 +70,25 @@ "scss-bundle": "^3.1.2", "typescript": "~4.8.0", "wait-on": "^6.0.1" + }, + + "module": "dist/flo/fesm2015/spring-flo.mjs", + "es2020": "dist/flo/fesm2020/spring-flo.mjs", + "esm2020": "dist/flo/esm2020/spring-flo.mjs", + "fesm2020": "dist/flo/fesm2020/spring-flo.mjs", + "fesm2015": "dist/flo/fesm2015/spring-flo.mjs", + "typings": "dist/flo/index.d.ts", + "exports": { + "./package.json": { + "default": "./dist/flo/package.json" + }, + ".": { + "types": "./dist/flo/index.d.ts", + "esm2020": "./dist/flo/esm2020/spring-flo.mjs", + "es2020": "./dist/flo/fesm2020/spring-flo.mjs", + "es2015": "./dist/flo/fesm2015/spring-flo.mjs", + "node": "./dist/flo/fesm2015/spring-flo.mjs", + "default": "./dist/flo/fesm2020/spring-flo.mjs" + } } } diff --git a/projects/demo/app/properties-editor.service.ts b/projects/demo/app/properties-editor.service.ts index 11277a1..44a26ec 100644 --- a/projects/demo/app/properties-editor.service.ts +++ b/projects/demo/app/properties-editor.service.ts @@ -2,7 +2,7 @@ import {Injectable} from '@angular/core'; import {dia} from 'jointjs'; import {PropertiesDialogComponent} from './properties.dialog.component'; import {BsModalService} from 'ngx-bootstrap/modal'; -import {Flo, Properties} from '../../lib'; +import {Flo, Properties} from '../../flo'; import {Validators} from '@angular/forms'; diff --git a/projects/lib/@types/codemirror-minified/index.d.ts b/projects/flo/@types/codemirror-minified/index.d.ts similarity index 100% rename from projects/lib/@types/codemirror-minified/index.d.ts rename to projects/flo/@types/codemirror-minified/index.d.ts diff --git a/projects/lib/code-editor/code-editor.component.html b/projects/flo/code-editor/code-editor.component.html similarity index 100% rename from projects/lib/code-editor/code-editor.component.html rename to projects/flo/code-editor/code-editor.component.html diff --git a/projects/lib/code-editor/code-editor.component.scss b/projects/flo/code-editor/code-editor.component.scss similarity index 100% rename from projects/lib/code-editor/code-editor.component.scss rename to projects/flo/code-editor/code-editor.component.scss diff --git a/projects/lib/code-editor/code-editor.component.ts b/projects/flo/code-editor/code-editor.component.ts similarity index 100% rename from projects/lib/code-editor/code-editor.component.ts rename to projects/flo/code-editor/code-editor.component.ts diff --git a/projects/lib/directives/resizer.ts b/projects/flo/directives/resizer.ts similarity index 100% rename from projects/lib/directives/resizer.ts rename to projects/flo/directives/resizer.ts diff --git a/projects/lib/dsl-editor/dsl-editor.component.html b/projects/flo/dsl-editor/dsl-editor.component.html similarity index 100% rename from projects/lib/dsl-editor/dsl-editor.component.html rename to projects/flo/dsl-editor/dsl-editor.component.html diff --git a/projects/lib/dsl-editor/dsl-editor.component.scss b/projects/flo/dsl-editor/dsl-editor.component.scss similarity index 100% rename from projects/lib/dsl-editor/dsl-editor.component.scss rename to projects/flo/dsl-editor/dsl-editor.component.scss diff --git a/projects/lib/dsl-editor/dsl-editor.component.ts b/projects/flo/dsl-editor/dsl-editor.component.ts similarity index 100% rename from projects/lib/dsl-editor/dsl-editor.component.ts rename to projects/flo/dsl-editor/dsl-editor.component.ts diff --git a/projects/lib/editor/editor-utils.ts b/projects/flo/editor/editor-utils.ts similarity index 100% rename from projects/lib/editor/editor-utils.ts rename to projects/flo/editor/editor-utils.ts diff --git a/projects/lib/editor/editor.component.html b/projects/flo/editor/editor.component.html similarity index 100% rename from projects/lib/editor/editor.component.html rename to projects/flo/editor/editor.component.html diff --git a/projects/lib/editor/editor.component.scss b/projects/flo/editor/editor.component.scss similarity index 100% rename from projects/lib/editor/editor.component.scss rename to projects/flo/editor/editor.component.scss diff --git a/projects/lib/editor/editor.component.ts b/projects/flo/editor/editor.component.ts similarity index 100% rename from projects/lib/editor/editor.component.ts rename to projects/flo/editor/editor.component.ts diff --git a/projects/lib/editor/paper.component.ts b/projects/flo/editor/paper.component.ts similarity index 100% rename from projects/lib/editor/paper.component.ts rename to projects/flo/editor/paper.component.ts diff --git a/projects/lib/index.ts b/projects/flo/index.ts similarity index 100% rename from projects/lib/index.ts rename to projects/flo/index.ts diff --git a/projects/lib/module.ts b/projects/flo/module.ts similarity index 100% rename from projects/lib/module.ts rename to projects/flo/module.ts diff --git a/projects/lib/ng-package.json b/projects/flo/ng-package.json similarity index 87% rename from projects/lib/ng-package.json rename to projects/flo/ng-package.json index f95ddbc..be6e9c3 100644 --- a/projects/lib/ng-package.json +++ b/projects/flo/ng-package.json @@ -1,6 +1,6 @@ { "$schema": "../../../../node_modules/ng-packagr/ng-package.schema.json", - "dest": "../../dist/spring-flo", + "dest": "../../dist/flo", "deleteDestPath": true, "lib": { "entryFile": "./index.ts" diff --git a/projects/lib/package.json b/projects/flo/package.json similarity index 100% rename from projects/lib/package.json rename to projects/flo/package.json diff --git a/projects/lib/palette/palette.component.html b/projects/flo/palette/palette.component.html similarity index 100% rename from projects/lib/palette/palette.component.html rename to projects/flo/palette/palette.component.html diff --git a/projects/lib/palette/palette.component.scss b/projects/flo/palette/palette.component.scss similarity index 100% rename from projects/lib/palette/palette.component.scss rename to projects/flo/palette/palette.component.scss diff --git a/projects/lib/palette/palette.component.ts b/projects/flo/palette/palette.component.ts similarity index 100% rename from projects/lib/palette/palette.component.ts rename to projects/flo/palette/palette.component.ts diff --git a/projects/lib/properties/df.property.component.html b/projects/flo/properties/df.property.component.html similarity index 100% rename from projects/lib/properties/df.property.component.html rename to projects/flo/properties/df.property.component.html diff --git a/projects/lib/properties/df.property.component.ts b/projects/flo/properties/df.property.component.ts similarity index 100% rename from projects/lib/properties/df.property.component.ts rename to projects/flo/properties/df.property.component.ts diff --git a/projects/lib/properties/properties.group.component.html b/projects/flo/properties/properties.group.component.html similarity index 100% rename from projects/lib/properties/properties.group.component.html rename to projects/flo/properties/properties.group.component.html diff --git a/projects/lib/properties/properties.group.component.ts b/projects/flo/properties/properties.group.component.ts similarity index 100% rename from projects/lib/properties/properties.group.component.ts rename to projects/flo/properties/properties.group.component.ts diff --git a/projects/lib/shared/flo-common.ts b/projects/flo/shared/flo-common.ts similarity index 100% rename from projects/lib/shared/flo-common.ts rename to projects/flo/shared/flo-common.ts diff --git a/projects/lib/shared/flo-properties.ts b/projects/flo/shared/flo-properties.ts similarity index 100% rename from projects/lib/shared/flo-properties.ts rename to projects/flo/shared/flo-properties.ts diff --git a/projects/lib/shared/logger.ts b/projects/flo/shared/logger.ts similarity index 100% rename from projects/lib/shared/logger.ts rename to projects/flo/shared/logger.ts diff --git a/projects/lib/shared/shapes.ts b/projects/flo/shared/shapes.ts similarity index 100% rename from projects/lib/shared/shapes.ts rename to projects/flo/shared/shapes.ts diff --git a/projects/lib/styles.scss b/projects/flo/styles.scss similarity index 100% rename from projects/lib/styles.scss rename to projects/flo/styles.scss diff --git a/projects/flo/tsconfig.dev.json b/projects/flo/tsconfig.dev.json new file mode 100644 index 0000000..7a32fe6 --- /dev/null +++ b/projects/flo/tsconfig.dev.json @@ -0,0 +1,15 @@ +/* To learn more about this file see: https://angular.io/config/tsconfig. */ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "outDir": "../../out-tsc/flo", + "declaration": true, + "declarationMap": true, + "inlineSources": true, + "types": [] + }, + "exclude": [ + "test.ts", + "**/*.spec.ts" + ] +} diff --git a/projects/flo/tsconfig.prod.json b/projects/flo/tsconfig.prod.json new file mode 100644 index 0000000..6c9020d --- /dev/null +++ b/projects/flo/tsconfig.prod.json @@ -0,0 +1,13 @@ +/* To learn more about this file see: https://angular.io/config/tsconfig. */ +{ + "extends": "./tsconfig.dev.json", + "compilerOptions": { + "declarationMap": false, + "sourceMap": false, + "inlineSourceMap": false, + "inlineSources": false + }, + "angularCompilerOptions": { + "compilationMode": "partial" + } +} diff --git a/tsconfig.json b/tsconfig.json index cce90ae..0ee2ca1 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -3,9 +3,8 @@ "compileOnSave": false, "compilerOptions": { "paths": { - "spring-flo": ["projects/lib"], - "spring-flo/*": ["projects/lib/*"] - + "spring-flo": ["projects/flo"], + "spring-flo/*": ["projects/flo/*"] }, "baseUrl": "./", "outDir": "./dist/out-tsc",