Initial work on Build upgrade and Angular 15 upgrade
@@ -1,4 +1,4 @@
|
||||
# https://editorconfig.org
|
||||
# Editor configuration, see https://editorconfig.org
|
||||
root = true
|
||||
|
||||
[*]
|
||||
@@ -8,7 +8,9 @@ indent_size = 2
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[*.ts]
|
||||
quote_type = single
|
||||
|
||||
[*.md]
|
||||
max_line_length = 0
|
||||
max_line_length = off
|
||||
trim_trailing_whitespace = false
|
||||
|
||||
58
.gitignore
vendored
@@ -1,20 +1,42 @@
|
||||
dist/
|
||||
node_modules/
|
||||
out-tsc/
|
||||
debug.log
|
||||
# See http://help.github.com/ignore-files/ for more about ignoring files.
|
||||
|
||||
# Compiled output
|
||||
/dist
|
||||
/tmp
|
||||
/out-tsc
|
||||
/bazel-out
|
||||
|
||||
# Node
|
||||
/node_modules
|
||||
npm-debug.log
|
||||
src/**/*.js
|
||||
src/**/*.d.ts
|
||||
!src/lib/typings.d.ts
|
||||
!src/demo/typings.d.ts
|
||||
!src/demo/systemjs.config.js
|
||||
!src/demo/systemjs.config.lib.js
|
||||
!**/*systemjs-angular-loader.js
|
||||
*.js.map
|
||||
e2e/**/*.js
|
||||
e2e/**/*.js.map
|
||||
.DS_Store
|
||||
**/.DS_Store
|
||||
*.iml
|
||||
yarn-error.log
|
||||
|
||||
# IDEs and editors
|
||||
.idea/
|
||||
!/src/lib/@types/codemirror-minified/index.d.ts
|
||||
.project
|
||||
.classpath
|
||||
.c9/
|
||||
*.launch
|
||||
.settings/
|
||||
*.sublime-workspace
|
||||
|
||||
# Visual Studio Code
|
||||
.vscode/*
|
||||
!.vscode/settings.json
|
||||
!.vscode/tasks.json
|
||||
!.vscode/launch.json
|
||||
!.vscode/extensions.json
|
||||
.history/*
|
||||
|
||||
# Miscellaneous
|
||||
/.angular/cache
|
||||
.sass-cache/
|
||||
/connect.lock
|
||||
/coverage
|
||||
/libpeerconnection.log
|
||||
testem.log
|
||||
/typings
|
||||
|
||||
# System files
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
|
||||
263
angular.json
@@ -1,48 +1,76 @@
|
||||
{
|
||||
"$schema": "./node_modules/@angular-devkit/core/src/workspace/workspace-schema.json",
|
||||
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
|
||||
"version": 1,
|
||||
"newProjectRoot": "projects",
|
||||
"projects": {
|
||||
"dev": {
|
||||
"root": "",
|
||||
"spring-flo": {
|
||||
"projectType": "library",
|
||||
"root": "projects/lib",
|
||||
"sourceRoot": "projects/lib",
|
||||
"architect": {
|
||||
"build": {
|
||||
"builder": "@angular-devkit/build-angular:ng-packagr",
|
||||
"options": {
|
||||
"project": "projects/lib/ng-package.json"
|
||||
},
|
||||
"configurations": {
|
||||
"production": {
|
||||
"tsConfig": "tsconfig.json"
|
||||
},
|
||||
"development": {
|
||||
"tsConfig": "tsconfig.json"
|
||||
}
|
||||
},
|
||||
"defaultConfiguration": "production"
|
||||
}
|
||||
}
|
||||
},
|
||||
"demo": {
|
||||
"projectType": "application",
|
||||
"schematics": {
|
||||
"@schematics/angular:application": {
|
||||
"strict": true
|
||||
}
|
||||
},
|
||||
"root": "projects/demo",
|
||||
"sourceRoot": "projects/demo",
|
||||
"architect": {
|
||||
"build": {
|
||||
"builder": "@angular-devkit/build-angular:browser",
|
||||
"options": {
|
||||
"outputPath": "dist-demo",
|
||||
"index": "src/demo/index.html",
|
||||
"main": "src/demo/main.ts",
|
||||
"tsConfig": "src/demo/tsconfig.dev.json",
|
||||
"polyfills": "src/demo/polyfills.ts",
|
||||
"outputPath": "dist/demo",
|
||||
"index": "projects/demo/index.html",
|
||||
"main": "projects/demo/main.ts",
|
||||
"polyfills": "projects/demo/polyfills.ts",
|
||||
"tsConfig": "tsconfig.json",
|
||||
"assets": [
|
||||
{
|
||||
"glob": "**/*",
|
||||
"input": "src/demo/icons",
|
||||
"output": "/icons"
|
||||
},
|
||||
{
|
||||
"glob": "favicon.ico",
|
||||
"input": "src/demo",
|
||||
"output": "/"
|
||||
}
|
||||
],
|
||||
"styles": [
|
||||
"src/demo/styles.css"
|
||||
"projects/demo/favicon.ico",
|
||||
"projects/demo/icons"
|
||||
],
|
||||
"styles": ["projects/demo/styles.css"],
|
||||
"scripts": []
|
||||
},
|
||||
"configurations": {
|
||||
"production": {
|
||||
"optimization": true,
|
||||
"outputHashing": "all",
|
||||
"sourceMap": false,
|
||||
"extractCss": true,
|
||||
"namedChunks": false,
|
||||
"aot": true,
|
||||
"extractLicenses": true,
|
||||
"vendorChunk": false,
|
||||
"buildOptimizer": true,
|
||||
"budgets": [
|
||||
{
|
||||
"type": "initial",
|
||||
"maximumWarning": "1500kb",
|
||||
"maximumError": "2500kb"
|
||||
},
|
||||
{
|
||||
"type": "anyComponentStyle",
|
||||
"maximumWarning": "2kb",
|
||||
"maximumError": "4kb"
|
||||
}
|
||||
],
|
||||
"fileReplacements": [
|
||||
{
|
||||
"replace": "projects/demo/environments/environment.ts",
|
||||
"with": "projects/demo/environments/environment.prod.ts"
|
||||
}
|
||||
],
|
||||
"outputHashing": "all"
|
||||
},
|
||||
"development": {
|
||||
"buildOptimizer": false,
|
||||
@@ -52,19 +80,17 @@
|
||||
"sourceMap": true,
|
||||
"namedChunks": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"defaultConfiguration": "production"
|
||||
},
|
||||
"serve": {
|
||||
"builder": "@angular-devkit/build-angular:dev-server",
|
||||
"options": {
|
||||
"browserTarget": "dev:build"
|
||||
},
|
||||
"configurations": {
|
||||
"production": {
|
||||
"browserTarget": "dev:build:production"
|
||||
"browserTarget": "demo:build:production"
|
||||
},
|
||||
"development": {
|
||||
"browserTarget": "dev:build:development"
|
||||
"browserTarget": "demo:build:development"
|
||||
}
|
||||
},
|
||||
"defaultConfiguration": "development"
|
||||
@@ -72,102 +98,153 @@
|
||||
"extract-i18n": {
|
||||
"builder": "@angular-devkit/build-angular:extract-i18n",
|
||||
"options": {
|
||||
"browserTarget": "dev:build"
|
||||
"browserTarget": "demo:build"
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
"builder": "@angular-devkit/build-angular:tslint",
|
||||
"test": {
|
||||
"builder": "@angular-devkit/build-angular:karma",
|
||||
"options": {
|
||||
"tsConfig": [
|
||||
"tsconfig.json"
|
||||
"main": "projects/demo/test.ts",
|
||||
"polyfills": "projects/demo/polyfills.ts",
|
||||
"tsConfig": "projects/demo/tsconfig.spec.json",
|
||||
"karmaConfig": "projects/demo/karma.conf.js",
|
||||
"assets": [
|
||||
"projects/demo/favicon.ico",
|
||||
"projects/demo/icons"
|
||||
],
|
||||
"exclude": []
|
||||
"styles": ["projects/demo/styles.css"],
|
||||
"scripts": []
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"packaged": {
|
||||
"root": "",
|
||||
"@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-demo",
|
||||
"index": "src/demo/index.html",
|
||||
"main": "src/demo/main.ts",
|
||||
"tsConfig": "src/demo/tsconfig.packaged.json",
|
||||
"polyfills": "src/demo/polyfills.ts",
|
||||
"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": [
|
||||
{
|
||||
"glob": "**/*",
|
||||
"input": "src/demo/icons",
|
||||
"output": "/icons"
|
||||
},
|
||||
{
|
||||
"glob": "favicon.ico",
|
||||
"input": "src/demo",
|
||||
"output": "/"
|
||||
}
|
||||
],
|
||||
"styles": [
|
||||
"src/demo/styles.css"
|
||||
"projects/showcase/src/favicon.ico",
|
||||
"projects/showcase/src/assets"
|
||||
],
|
||||
"styles": ["projects/showcase/src/styles.css"],
|
||||
"scripts": []
|
||||
},
|
||||
"configurations": {
|
||||
"production": {
|
||||
"optimization": true,
|
||||
"outputHashing": "all",
|
||||
"sourceMap": false,
|
||||
"extractCss": true,
|
||||
"namedChunks": false,
|
||||
"aot": true,
|
||||
"extractLicenses": true,
|
||||
"vendorChunk": false,
|
||||
"buildOptimizer": true
|
||||
"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",
|
||||
"options": {
|
||||
"browserTarget": "packaged:build"
|
||||
},
|
||||
"configurations": {
|
||||
"production": {
|
||||
"browserTarget": "packaged:build:production"
|
||||
"browserTarget": "showcase:build:production"
|
||||
},
|
||||
"development": {
|
||||
"browserTarget": "showcase:build:development"
|
||||
}
|
||||
}
|
||||
},
|
||||
"defaultConfiguration": "development"
|
||||
},
|
||||
"extract-i18n": {
|
||||
"builder": "@angular-devkit/build-angular:extract-i18n",
|
||||
"options": {
|
||||
"browserTarget": "packaged:build"
|
||||
"browserTarget": "showcase:build"
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
"builder": "@angular-devkit/build-angular:tslint",
|
||||
"test": {
|
||||
"builder": "@angular-devkit/build-angular:karma",
|
||||
"options": {
|
||||
"tsConfig": [
|
||||
"tsconfig.json"
|
||||
"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"
|
||||
],
|
||||
"exclude": []
|
||||
"styles": ["projects/showcase/src/styles.css"],
|
||||
"scripts": []
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"schematics": {
|
||||
"@schematics/angular:component": {
|
||||
"prefix": "app",
|
||||
"styleext": "css"
|
||||
},
|
||||
"@schematics/angular:directive": {
|
||||
"prefix": "app"
|
||||
}
|
||||
},
|
||||
"cli": {
|
||||
"analytics": false
|
||||
"analytics": "bd528680-ddc0-4237-939c-9732e1a89a68"
|
||||
}
|
||||
}
|
||||
|
||||
10
integration/.gitignore
vendored
@@ -1,10 +0,0 @@
|
||||
node_modules
|
||||
npm-debug.log
|
||||
src/**/*.js
|
||||
!src/systemjs.config.js
|
||||
!src/systemjs-angular-loader.js
|
||||
*.js.map
|
||||
e2e/**/*.js
|
||||
e2e/**/*.js.map
|
||||
out-tsc/*
|
||||
dist/*
|
||||
@@ -1,26 +0,0 @@
|
||||
# Integration App
|
||||
|
||||
This is a simplified version of https://github.com/angular/quickstart used to test the built lib.
|
||||
|
||||
## npm scripts
|
||||
|
||||
We've captured many of the most useful commands in npm scripts defined in the `package.json`:
|
||||
|
||||
* `npm start` - runs the compiler and a server at the same time, both in "watch mode".
|
||||
* `npm run e2e` - compiles the app and run e2e tests.
|
||||
* `npm run e2e:aot` - compiles and the app with AOT and run e2e tests.
|
||||
|
||||
|
||||
If you need to manually test a library build, follow these steps:
|
||||
```
|
||||
# starting at the project root, build the library
|
||||
npm run build
|
||||
# clean the integration app
|
||||
npm run preintegration
|
||||
cd integration
|
||||
npm install
|
||||
```
|
||||
|
||||
Now the library is installed in your integration app.
|
||||
|
||||
You can use `npm start` to start a live reload server running the app in JIT mode, or `npm run build && npm run serve:aot` to run a static server in AOT mode.
|
||||
@@ -1,5 +0,0 @@
|
||||
{
|
||||
"server": {
|
||||
"baseDir": "dist"
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
{
|
||||
"open": false,
|
||||
"logLevel": "silent",
|
||||
"port": 8080,
|
||||
"server": {
|
||||
"baseDir": "dist",
|
||||
"middleware": {
|
||||
"0": null
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
{
|
||||
"open": false,
|
||||
"logLevel": "silent",
|
||||
"port": 8080,
|
||||
"server": {
|
||||
"baseDir": "src",
|
||||
"routes": {
|
||||
"/node_modules": "node_modules"
|
||||
},
|
||||
"middleware": {
|
||||
"0": null
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
{
|
||||
"server": {
|
||||
"baseDir": "src",
|
||||
"routes": {
|
||||
"/node_modules": "node_modules"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,93 +0,0 @@
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const glob = require('glob');
|
||||
const rollup = require('rollup');
|
||||
const uglify = require('rollup-plugin-uglify');
|
||||
const commonjs = require('rollup-plugin-commonjs');
|
||||
const nodeResolve = require('rollup-plugin-node-resolve');
|
||||
const ngc = require('@angular/compiler-cli/src/main').main;
|
||||
|
||||
|
||||
const srcDir = path.join(__dirname, 'src/');
|
||||
const distDir = path.join(__dirname, 'dist/');
|
||||
const aotDir = path.join(__dirname, 'aot/');
|
||||
const rollupConfig = {
|
||||
entry: `${srcDir}/main-aot.js`,
|
||||
sourceMap: false,
|
||||
format: 'iife',
|
||||
onwarn: function (warning) {
|
||||
// Skip certain warnings
|
||||
if (warning.code === 'THIS_IS_UNDEFINED') { return; }
|
||||
// console.warn everything else
|
||||
console.warn(warning.message);
|
||||
},
|
||||
plugins: [
|
||||
nodeResolve({ jsnext: true, module: true }),
|
||||
commonjs({
|
||||
include: ['node_modules/rxjs/**']
|
||||
}),
|
||||
uglify()
|
||||
]
|
||||
};
|
||||
|
||||
return Promise.resolve()
|
||||
// Compile using ngc.
|
||||
.then(() => ngc({ project: `./tsconfig.aot.json` }))
|
||||
// Create dist dir.
|
||||
.then(() => _recursiveMkDir(distDir))
|
||||
// Copy files.
|
||||
.then(() => {
|
||||
// Copy and rename index-aot.html.
|
||||
fs.createReadStream(path.join(srcDir, 'index-aot.html'))
|
||||
.pipe(fs.createWriteStream(path.join(distDir, 'index.html')));
|
||||
|
||||
// Copy global stylesheets, images, etc.
|
||||
const assets = [
|
||||
'favicon.ico',
|
||||
'styles.css'
|
||||
];
|
||||
|
||||
return Promise.all(assets.map(asset => _relativeCopy(asset, srcDir, distDir)));
|
||||
})
|
||||
// Bundle app.
|
||||
.then(() => rollup.rollup(rollupConfig))
|
||||
// Concatenate app and scripts.
|
||||
.then(bundle => {
|
||||
const appBundle = bundle.generate(rollupConfig);
|
||||
|
||||
const scripts = [
|
||||
'node_modules/core-js/client/shim.min.js',
|
||||
'node_modules/zone.js/dist/zone.min.js'
|
||||
];
|
||||
|
||||
let concatenatedScripts = scripts.map((script) => {
|
||||
return fs.readFileSync(path.join(__dirname, script)).toString();
|
||||
}).join('\n;');
|
||||
|
||||
concatenatedScripts = concatenatedScripts.concat('\n;', appBundle.code);
|
||||
|
||||
fs.writeFileSync(path.join(distDir, 'bundle.js'), concatenatedScripts);
|
||||
});
|
||||
|
||||
|
||||
|
||||
// Copy files maintaining relative paths.
|
||||
function _relativeCopy(fileGlob, from, to) {
|
||||
return glob(fileGlob, { cwd: from, nodir: true }, (err, files) => {
|
||||
if (err) throw err;
|
||||
files.forEach(file => {
|
||||
const origin = path.join(from, file);
|
||||
const dest = path.join(to, file);
|
||||
_recursiveMkDir(path.dirname(dest));
|
||||
fs.createReadStream(origin).pipe(fs.createWriteStream(dest));
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
// Recursively create a dir.
|
||||
function _recursiveMkDir(dir) {
|
||||
if (!fs.existsSync(dir)) {
|
||||
_recursiveMkDir(path.dirname(dir));
|
||||
fs.mkdirSync(dir);
|
||||
}
|
||||
}
|
||||
0
integration/e2e/app.e2e-spec.d.ts
vendored
@@ -1,21 +0,0 @@
|
||||
import { browser, element, by } from 'protractor';
|
||||
|
||||
describe('QuickStart Lib E2E Tests', function () {
|
||||
|
||||
beforeEach(() => browser.get(''));
|
||||
|
||||
afterEach(() => {
|
||||
browser.manage().logs().get('browser').then((browserLog: any[]) => {
|
||||
expect(browserLog).toEqual([]);
|
||||
});
|
||||
});
|
||||
|
||||
it('should display lib', () => {
|
||||
expect(element(by.css('h2')).getText()).toEqual('Hello Angular Library');
|
||||
});
|
||||
|
||||
it('should display meaning', () => {
|
||||
expect(element(by.css('h3')).getText()).toEqual('Meaning is: 42');
|
||||
});
|
||||
|
||||
});
|
||||
@@ -1,13 +0,0 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "es5",
|
||||
"module": "commonjs",
|
||||
"moduleResolution": "node",
|
||||
"sourceMap": true,
|
||||
"emitDecoratorMetadata": true,
|
||||
"experimentalDecorators": true,
|
||||
"lib": [ "es2015", "dom" ],
|
||||
"noImplicitAny": true,
|
||||
"suppressImplicitAnyIndexErrors": true
|
||||
}
|
||||
}
|
||||
@@ -1,55 +0,0 @@
|
||||
{
|
||||
"name": "integration-test",
|
||||
"version": "1.0.0",
|
||||
"description": "App for integration tests",
|
||||
"scripts": {
|
||||
"clean": "rimraf aot/ dist/ node_modules/spring-flo/",
|
||||
"build": "tsc -p src/",
|
||||
"build:watch": "tsc -p src/ -w",
|
||||
"build:e2e": "tsc -p e2e/",
|
||||
"build:aot": "node build.js",
|
||||
"serve": "lite-server -c=bs-config.json",
|
||||
"serve:aot": "lite-server -c bs-config.aot.json",
|
||||
"serve:e2e": "lite-server -c=bs-config.e2e.json",
|
||||
"serve:e2e-aot": "lite-server -c bs-config.e2e-aot.json",
|
||||
"prestart": "npm run build",
|
||||
"start": "concurrently \"npm run build:watch\" \"npm run serve\"",
|
||||
"pree2e": "npm run build:e2e && npm run build",
|
||||
"e2e": "concurrently \"npm run serve:e2e\" \"npm run protractor\" --kill-others --success first",
|
||||
"pree2e:aot": "npm run build:e2e && npm run build:aot",
|
||||
"e2e:aot": "concurrently \"npm run serve:e2e-aot\" \"npm run protractor\" --kill-others --success first",
|
||||
"preprotractor": "webdriver-manager update",
|
||||
"protractor": "protractor protractor.config.js"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@angular/common": "^4.1.3",
|
||||
"@angular/compiler": "^4.1.3",
|
||||
"@angular/compiler-cli": "^4.1.3",
|
||||
"@angular/core": "^4.1.3",
|
||||
"@angular/platform-browser": "^4.1.3",
|
||||
"@angular/platform-browser-dynamic": "^4.1.3",
|
||||
"spring-flo": "../",
|
||||
"core-js": "^2.4.1",
|
||||
"rxjs": "5.0.1",
|
||||
"systemjs": "0.19.40",
|
||||
"zone.js": "^0.8.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/jasmine": "2.5.36",
|
||||
"concurrently": "^3.4.0",
|
||||
"jasmine-core": "~2.4.1",
|
||||
"glob": "^7.1.1",
|
||||
"lite-server": "^2.2.2",
|
||||
"protractor": "~5.1.0",
|
||||
"rimraf": "^2.5.4",
|
||||
"rollup": "^0.42.0",
|
||||
"rollup-plugin-commonjs": "^8.0.2",
|
||||
"rollup-plugin-node-resolve": "3.0.0",
|
||||
"rollup-plugin-uglify": "^2.0.1",
|
||||
"typescript": "~2.3.0"
|
||||
},
|
||||
"repository": {}
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
exports.config = {
|
||||
allScriptsTimeout: 11000,
|
||||
specs: [
|
||||
'./e2e/**/*.e2e-spec.js'
|
||||
],
|
||||
capabilities: {
|
||||
'browserName': 'chrome'
|
||||
},
|
||||
directConnect: true,
|
||||
baseUrl: 'http://localhost:8080/',
|
||||
framework: 'jasmine'
|
||||
};
|
||||
5
integration/src/app/app.component.d.ts
vendored
@@ -1,5 +0,0 @@
|
||||
import { LibService } from 'spring-flo';
|
||||
export declare class AppComponent {
|
||||
meaning: number;
|
||||
constructor(libService: LibService);
|
||||
}
|
||||
@@ -1,2 +0,0 @@
|
||||
<my-lib></my-lib>
|
||||
<h3>Meaning is: {{meaning}}</h3>
|
||||
@@ -1,13 +0,0 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { } from 'spring-flo';
|
||||
|
||||
@Component({
|
||||
selector: 'integration-app',
|
||||
templateUrl: './app.component.html',
|
||||
})
|
||||
export class AppComponent {
|
||||
meaning: number;
|
||||
constructor(libService: LibService) {
|
||||
this.meaning = libService.getMeaning();
|
||||
}
|
||||
}
|
||||
2
integration/src/app/app.module.d.ts
vendored
@@ -1,2 +0,0 @@
|
||||
export declare class AppModule {
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { BrowserModule } from '@angular/platform-browser';
|
||||
import { FloModule } from 'spring-flo';
|
||||
|
||||
import { AppComponent } from './app.component';
|
||||
|
||||
@NgModule({
|
||||
imports: [ BrowserModule, FloModule],
|
||||
declarations: [ AppComponent ],
|
||||
bootstrap: [ AppComponent ]
|
||||
})
|
||||
export class AppModule { }
|
||||
@@ -1,18 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Angular QuickStart</title>
|
||||
<base href="/">
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" href="styles.css">
|
||||
|
||||
<!-- Workaround for module.id -->
|
||||
<script>window.module = 'aot';</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<integration-app>Loading...</integration-app>
|
||||
</body>
|
||||
<script src="bundle.js"></script>
|
||||
</html>
|
||||
@@ -1,25 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Angular QuickStart</title>
|
||||
<base href="/">
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" href="styles.css">
|
||||
|
||||
<!-- Polyfill(s) for older browsers -->
|
||||
<script src="node_modules/core-js/client/shim.min.js"></script>
|
||||
|
||||
<script src="node_modules/zone.js/dist/zone.js"></script>
|
||||
<script src="node_modules/systemjs/dist/system.src.js"></script>
|
||||
|
||||
<script src="systemjs.config.js"></script>
|
||||
<script>
|
||||
System.import('main.js').catch(function(err){ console.error(err); });
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<integration-app>Loading AppComponent content here ...</integration-app>
|
||||
</body>
|
||||
</html>
|
||||
0
integration/src/main-aot.d.ts
vendored
@@ -1,5 +0,0 @@
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
|
||||
import { AppModuleNgFactory } from '../out-tsc/src/app/app.module.ngfactory';
|
||||
|
||||
platformBrowserDynamic().bootstrapModuleFactory(AppModuleNgFactory);
|
||||
0
integration/src/main.d.ts
vendored
@@ -1,5 +0,0 @@
|
||||
h1 {
|
||||
color: #369;
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
font-size: 250%;
|
||||
}
|
||||
@@ -1,49 +0,0 @@
|
||||
var templateUrlRegex = /templateUrl\s*:(\s*['"`](.*?)['"`]\s*)/gm;
|
||||
var stylesRegex = /styleUrls *:(\s*\[[^\]]*?\])/g;
|
||||
var stringRegex = /(['`"])((?:[^\\]\\\1|.)*?)\1/g;
|
||||
|
||||
module.exports.translate = function (load) {
|
||||
if (load.source.indexOf('moduleId') != -1) return load;
|
||||
|
||||
var url = document.createElement('a');
|
||||
url.href = load.address;
|
||||
|
||||
var basePathParts = url.pathname.split('/');
|
||||
|
||||
basePathParts.pop();
|
||||
var basePath = basePathParts.join('/');
|
||||
|
||||
var baseHref = document.createElement('a');
|
||||
baseHref.href = this.baseURL;
|
||||
baseHref = baseHref.pathname;
|
||||
|
||||
if (!baseHref.startsWith('/base/')) { // it is not karma
|
||||
basePath = basePath.replace(baseHref, '');
|
||||
}
|
||||
|
||||
load.source = load.source
|
||||
.replace(templateUrlRegex, function (match, quote, url) {
|
||||
let resolvedUrl = url;
|
||||
|
||||
if (url.startsWith('.')) {
|
||||
resolvedUrl = basePath + url.substr(1);
|
||||
}
|
||||
|
||||
return 'templateUrl: "' + resolvedUrl + '"';
|
||||
})
|
||||
.replace(stylesRegex, function (match, relativeUrls) {
|
||||
var urls = [];
|
||||
|
||||
while ((match = stringRegex.exec(relativeUrls)) !== null) {
|
||||
if (match[2].startsWith('.')) {
|
||||
urls.push('"' + basePath + match[2].substr(1) + '"');
|
||||
} else {
|
||||
urls.push('"' + match[2] + '"');
|
||||
}
|
||||
}
|
||||
|
||||
return "styleUrls: [" + urls.join(', ') + "]";
|
||||
});
|
||||
|
||||
return load;
|
||||
};
|
||||
@@ -1,46 +0,0 @@
|
||||
/**
|
||||
* System configuration for Angular samples
|
||||
* Adjust as necessary for your application needs.
|
||||
*/
|
||||
(function (global) {
|
||||
System.config({
|
||||
paths: {
|
||||
// paths serve as alias
|
||||
'npm:': 'node_modules/'
|
||||
},
|
||||
// map tells the System loader where to look for things
|
||||
map: {
|
||||
// our app is within the app folder
|
||||
app: 'app',
|
||||
|
||||
// angular bundles
|
||||
'@angular/core': 'npm:@angular/core/bundles/core.umd.js',
|
||||
'@angular/common': 'npm:@angular/common/bundles/common.umd.js',
|
||||
'@angular/compiler': 'npm:@angular/compiler/bundles/compiler.umd.js',
|
||||
'@angular/platform-browser': 'npm:@angular/platform-browser/bundles/platform-browser.umd.js',
|
||||
'@angular/platform-browser-dynamic': 'npm:@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js',
|
||||
'@angular/http': 'npm:@angular/http/bundles/http.umd.js',
|
||||
'@angular/router': 'npm:@angular/router/bundles/router.umd.js',
|
||||
'@angular/forms': 'npm:@angular/forms/bundles/forms.umd.js',
|
||||
|
||||
// other libraries
|
||||
'rxjs': 'npm:rxjs',
|
||||
'angular-in-memory-web-api': 'npm:angular-in-memory-web-api/bundles/in-memory-web-api.umd.js',
|
||||
'spring-flo': 'npm:spring-flo/bundles/spring-flo.umd.js'
|
||||
},
|
||||
// packages tells the System loader how to load when no filename and/or no extension
|
||||
packages: {
|
||||
app: {
|
||||
defaultExtension: 'js',
|
||||
meta: {
|
||||
'./*.js': {
|
||||
loader: 'systemjs-angular-loader.js'
|
||||
}
|
||||
}
|
||||
},
|
||||
rxjs: {
|
||||
defaultExtension: 'js'
|
||||
}
|
||||
}
|
||||
});
|
||||
})(this);
|
||||
@@ -1,16 +0,0 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "es5",
|
||||
"module": "commonjs",
|
||||
"moduleResolution": "node",
|
||||
"sourceMap": true,
|
||||
"emitDecoratorMetadata": true,
|
||||
"experimentalDecorators": true,
|
||||
"lib": [ "es2015", "dom" ],
|
||||
"noImplicitAny": true,
|
||||
"suppressImplicitAnyIndexErrors": true
|
||||
},
|
||||
"exclude": [
|
||||
"main-aot.ts"
|
||||
]
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "es5",
|
||||
"module": "es2015",
|
||||
"moduleResolution": "node",
|
||||
"sourceMap": true,
|
||||
"emitDecoratorMetadata": true,
|
||||
"experimentalDecorators": true,
|
||||
"lib": [
|
||||
"es2015",
|
||||
"dom"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"suppressImplicitAnyIndexErrors": true
|
||||
},
|
||||
"files": [
|
||||
"src/app/app.module.ts",
|
||||
"src/main-aot.ts"
|
||||
],
|
||||
"angularCompilerOptions": {
|
||||
"genDir": "out-tsc",
|
||||
"skipMetadataEmit": true
|
||||
}
|
||||
}
|
||||
117
package.json
@@ -1,76 +1,73 @@
|
||||
{
|
||||
"name": "spring-flo",
|
||||
"version": "0.10.1",
|
||||
"description": "Library for quickly building text DSL visualization diagram editor",
|
||||
"main": "dist/bundles/spring-flo.umd.js",
|
||||
"module": "dist/fesm5/spring-flo.js",
|
||||
"es2015": "dist/fesm2015/spring-flo.js",
|
||||
"esm5": "dist/esm5/spring-flo.js",
|
||||
"esm2015": "dist/esm2015/spring-flo.js",
|
||||
"fesm5": "dist/fesm5/spring-flo.js",
|
||||
"fesm2015": "dist/fesm2015/spring-flo.js",
|
||||
"typings": "dist/spring-flo.d.ts",
|
||||
"metadata": "dist/spring-flo.metadata.json",
|
||||
"sideEffects": false,
|
||||
"author": "",
|
||||
"license": "Apache-2.0",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/spring-projects/spring-flo.git"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 6.9.0",
|
||||
"npm": ">= 3.0.0"
|
||||
},
|
||||
"version": "0.0.0",
|
||||
"scripts": {
|
||||
"serve": "ng serve dev",
|
||||
"build:lib": "rimraf dist && ng-packagr -p src/lib/package.json && npm run styles:lib",
|
||||
"build:app": "cpr dist/lib src/demo/spring-flo -d && ng build packaged && rimraf src/demo/spring-flo",
|
||||
"styles:lib": "scss-bundle --entryFile src/lib/styles.scss --outFile dist/flo.css",
|
||||
"build": "npm run build:lib",
|
||||
"prestart": "npm run build:lib",
|
||||
"start": "npm run serve",
|
||||
"release": "standard-version",
|
||||
"prepare": "npm run build",
|
||||
"lint": "tslint ./src/**/*.ts -t verbose"
|
||||
"ng": "ng",
|
||||
"start": "npm-run-all clean --parallel flo:watch demo:start-waiton",
|
||||
"build": "run-s flo:build demo: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: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": "ng serve demo",
|
||||
"demo:build": "ng build demo",
|
||||
"demo:watch": "ng build demo --watch --configuration development",
|
||||
"demo:test": "ng test demo",
|
||||
"demo:test-coverage": "ng test demo --no-watch --code-coverage",
|
||||
|
||||
"clean": "rimraf dist"
|
||||
},
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@types/resize-observer-browser": "^0.1.3",
|
||||
"codemirror-minified": "5.54.0",
|
||||
"codemirror": "5.54.0",
|
||||
"jointjs": "3.4.1",
|
||||
"ts-disposables": "2.2.3"
|
||||
},
|
||||
|
||||
"devDependencies": {
|
||||
"@angular-devkit/build-angular": "~12.0.0",
|
||||
"@angular-devkit/schematics": "~12.0.0",
|
||||
"@angular/animations": "~12.0.0",
|
||||
"@angular/cli": "~12.0.0",
|
||||
"@angular/common": "~12.0.0",
|
||||
"@angular/compiler": "~12.0.0",
|
||||
"@angular/compiler-cli": "~12.0.0",
|
||||
"@angular/core": "~12.0.0",
|
||||
"@angular/forms": "~12.0.0",
|
||||
"@angular/platform-browser": "~12.0.0",
|
||||
"@angular/platform-browser-dynamic": "~12.0.0",
|
||||
"@angular/platform-server": "~12.0.0",
|
||||
"@angular-devkit/build-angular": "^15.0.1",
|
||||
"@angular/cli": "^15.0.1",
|
||||
"@angular/compiler-cli": "^15.0.1",
|
||||
|
||||
"@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",
|
||||
"zone.js": "~0.11.4",
|
||||
|
||||
"@types/resize-observer-browser": "^0.1.3",
|
||||
"@types/jasmine": "~3.10.0",
|
||||
"@types/node": "^12.11.1",
|
||||
|
||||
"@types/backbone": "1.3.42",
|
||||
"@types/codemirror": "0.0.64",
|
||||
"@types/jasmine": "2.5.36",
|
||||
"@types/jquery": "3.5.4",
|
||||
"@types/lodash": "4.14.165",
|
||||
"@types/node": "12.11.1",
|
||||
"cpr": "^3.0.1",
|
||||
"fibers": "^5.0.0",
|
||||
"html-webpack-plugin": "^3.2.0",
|
||||
"ng-packagr": "^12.0.0",
|
||||
|
||||
"jasmine-core": "~4.0.0",
|
||||
"karma": "~6.3.0",
|
||||
"karma-chrome-launcher": "~3.1.0",
|
||||
"karma-coverage": "~2.1.0",
|
||||
"karma-jasmine": "~4.0.0",
|
||||
"karma-jasmine-html-reporter": "~1.7.0",
|
||||
"ng-packagr": "^15.0.1",
|
||||
"ngx-bootstrap": "^6.2.0",
|
||||
"rimraf": "2.6.1",
|
||||
"rxjs": "~6.5.3",
|
||||
"scss-bundle": "^3.0.2",
|
||||
"standard-version": "^9.0.0",
|
||||
"tslib": "^2.0.3",
|
||||
"tslint": "^6.1.3",
|
||||
"typescript": "~4.2.4",
|
||||
"zone.js": "~0.11.4"
|
||||
"npm-run-all": "^4.1.5",
|
||||
"rimraf": "^3.0.2",
|
||||
"scss-bundle": "^3.1.2",
|
||||
"typescript": "~4.8.0",
|
||||
"wait-on": "^6.0.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,12 +47,12 @@
|
||||
</span>
|
||||
</div>
|
||||
<div class="flow-definition-container">
|
||||
<dsl-editor *ngIf="dslEditor" [(dsl)]="dsl" line-numbers="true" line-wrapping="true"
|
||||
<dsl-editor *ngIf="dslEditor" [(dsl)]="dsl" [line-numbers]="true" [line-wrapping]="true"
|
||||
(blur)="editorContext.graphToTextSync=true" (focus)="editorContext.graphToTextSync=false"
|
||||
placeholder="Enter stream definition..."></dsl-editor>
|
||||
<textarea *ngIf="!dslEditor" id="flow-definition" class="flow-definition"
|
||||
placeholder="Enter stream definition..."
|
||||
[value]="dsl" (keyup)="dsl=$event.target.value" (blur)="editorContext.graphToTextSync=true"
|
||||
[value]="dsl" (keyup)="processKeyUp($event)" (blur)="editorContext.graphToTextSync=true"
|
||||
(focus)="editorContext.graphToTextSync=false"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
@@ -6,10 +6,10 @@ const { Renderer } = require('./renderer');
|
||||
const { Editor } = require('./editor');
|
||||
|
||||
// Code editor used from Flo requires the follwoing CM extensions
|
||||
import 'codemirror-minified/mode/javascript/javascript';
|
||||
import 'codemirror-minified/mode/ruby/ruby';
|
||||
import 'codemirror-minified/mode/clike/clike';
|
||||
import 'codemirror-minified/addon/lint/javascript-lint';
|
||||
import 'codemirror/mode/javascript/javascript';
|
||||
import 'codemirror/mode/ruby/ruby';
|
||||
import 'codemirror/mode/clike/clike';
|
||||
import 'codemirror/addon/lint/javascript-lint';
|
||||
import {PropertiesEditorService} from './properties-editor.service';
|
||||
import {dia} from 'jointjs';
|
||||
|
||||
@@ -42,11 +42,16 @@ export class AppComponent {
|
||||
this.editorContext.performLayout().then(() => this.editorContext.fitToPage());
|
||||
}
|
||||
|
||||
markersChanged(markers: Map<string, Array<Flo.Marker>>) {
|
||||
markersChanged(markers: Map<string | number, Array<Flo.Marker>>) {
|
||||
console.log('MARKERS: ' + JSON.stringify(markers));
|
||||
}
|
||||
|
||||
openPropertiesDialog(cell: dia.Cell) {
|
||||
this.propertiesEditor.openPropertiesDialog(cell)
|
||||
}
|
||||
|
||||
processKeyUp(evt: KeyboardEvent): void {
|
||||
this.dsl = (evt.target as HTMLTextAreaElement).value;
|
||||
}
|
||||
|
||||
}
|
||||
3
projects/demo/environments/environment.prod.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
export const environment = {
|
||||
production: true
|
||||
};
|
||||
16
projects/demo/environments/environment.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
// This file can be replaced during build by using the `fileReplacements` array.
|
||||
// `ng build` replaces `environment.ts` with `environment.prod.ts`.
|
||||
// The list of file replacements can be found in `angular.json`.
|
||||
|
||||
export const environment = {
|
||||
production: false
|
||||
};
|
||||
|
||||
/*
|
||||
* For easier debugging in development mode, you can import the following file
|
||||
* to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`.
|
||||
*
|
||||
* This import should be commented out in production mode because it will have a negative impact
|
||||
* on performance if an error is thrown.
|
||||
*/
|
||||
// import 'zone.js/plugins/zone-error'; // Included with Angular CLI.
|
||||
|
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 5.3 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 296 B After Width: | Height: | Size: 296 B |
|
Before Width: | Height: | Size: 792 B After Width: | Height: | Size: 792 B |
44
projects/demo/karma.conf.js
Normal file
@@ -0,0 +1,44 @@
|
||||
// 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'),
|
||||
require('@angular-devkit/build-angular/plugins/karma')
|
||||
],
|
||||
client: {
|
||||
jasmine: {
|
||||
// you can add configuration options for Jasmine here
|
||||
// the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
|
||||
// for example, you can disable the random execution with `random: false`
|
||||
// or set a specific seed with `seed: 4321`
|
||||
},
|
||||
clearContext: false // leave Jasmine Spec Runner output visible in browser
|
||||
},
|
||||
jasmineHtmlReporter: {
|
||||
suppressAll: true // removes the duplicated traces
|
||||
},
|
||||
coverageReporter: {
|
||||
dir: require('path').join(__dirname, '../../coverage/showcase'),
|
||||
subdir: '.',
|
||||
reporters: [
|
||||
{ type: 'html' },
|
||||
{ type: 'text-summary' }
|
||||
]
|
||||
},
|
||||
reporters: ['progress', 'kjhtml'],
|
||||
port: 9876,
|
||||
colors: true,
|
||||
logLevel: config.LOG_INFO,
|
||||
autoWatch: true,
|
||||
browsers: ['Chrome'],
|
||||
singleRun: false,
|
||||
restartOnFileChange: true
|
||||
});
|
||||
};
|
||||
@@ -1,8 +1,8 @@
|
||||
@import "./../../node_modules/jointjs/dist/joint.core.css";
|
||||
@import "./../../node_modules/codemirror-minified/lib/codemirror.css";
|
||||
@import "./../../node_modules/codemirror-minified/addon/hint/show-hint.css";
|
||||
@import "./../../node_modules/codemirror-minified/addon/lint/lint.css";
|
||||
@import "./../../node_modules/codemirror-minified/addon/scroll/simplescrollbars.css";
|
||||
@import "./../../node_modules/codemirror/lib/codemirror.css";
|
||||
@import "./../../node_modules/codemirror/addon/hint/show-hint.css";
|
||||
@import "./../../node_modules/codemirror/addon/lint/lint.css";
|
||||
@import "./../../node_modules/codemirror/addon/scroll/simplescrollbars.css";
|
||||
|
||||
h1 {
|
||||
color: #369;
|
||||
14
projects/demo/test.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
|
||||
|
||||
import 'zone.js/testing';
|
||||
import { getTestBed } from '@angular/core/testing';
|
||||
import {
|
||||
BrowserDynamicTestingModule,
|
||||
platformBrowserDynamicTesting
|
||||
} from '@angular/platform-browser-dynamic/testing';
|
||||
|
||||
// First, initialize the Angular testing environment.
|
||||
getTestBed().initTestEnvironment(
|
||||
BrowserDynamicTestingModule,
|
||||
platformBrowserDynamicTesting(),
|
||||
);
|
||||
@@ -2,21 +2,24 @@
|
||||
"extends": "../../tsconfig.json",
|
||||
"angularCompilerOptions": {
|
||||
"paths": {
|
||||
"spring-flo": [ "../lib/index.ts" ]
|
||||
"spring-flo": [ "../spring-flo/index.ts" ]
|
||||
}
|
||||
},
|
||||
"compilerOptions": {
|
||||
"baseUrl": "",
|
||||
"module": "commonjs",
|
||||
"outDir": "../../out-tsc/app",
|
||||
"declaration": false,
|
||||
"emitDecoratorMetadata": true,
|
||||
"paths": {
|
||||
"spring-flo": [
|
||||
"../lib/index.ts"
|
||||
"../spring-flo/index.ts"
|
||||
]
|
||||
}
|
||||
},
|
||||
"exclude": [
|
||||
"main-aot.ts"
|
||||
"files": [
|
||||
"main.ts",
|
||||
"polyfills.ts"
|
||||
],
|
||||
"include": [
|
||||
"**/*.d.ts"
|
||||
]
|
||||
}
|
||||
24
projects/demo/tsconfig.json
Normal file
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "../../out-tsc/app",
|
||||
"declaration": false,
|
||||
"emitDecoratorMetadata": true,
|
||||
"paths": {
|
||||
"spring-flo/*": [
|
||||
"../../dist/spring-flo/*"
|
||||
],
|
||||
"spring-flo": [
|
||||
"../../dist/spring-flo"
|
||||
]
|
||||
}
|
||||
},
|
||||
"files": [
|
||||
"main.ts",
|
||||
"polyfills.ts"
|
||||
],
|
||||
"include": [
|
||||
"**/*.d.ts"
|
||||
]
|
||||
}
|
||||
|
||||
28
projects/demo/tsconfig.prod.json
Normal file
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"angularCompilerOptions": {
|
||||
"paths": {
|
||||
"spring-flo": [ "../../dist/spring-flo" ]
|
||||
}
|
||||
},
|
||||
"compilerOptions": {
|
||||
"outDir": "../../out-tsc/app",
|
||||
"declaration": false,
|
||||
"emitDecoratorMetadata": true,
|
||||
"paths": {
|
||||
"spring-flo/*": [
|
||||
"../../dist/spring-flo/*"
|
||||
],
|
||||
"spring-flo": [
|
||||
"../../dist/spring-flo"
|
||||
]
|
||||
}
|
||||
},
|
||||
"files": [
|
||||
"main.ts",
|
||||
"polyfills.ts"
|
||||
],
|
||||
"include": [
|
||||
"**/*.d.ts"
|
||||
]
|
||||
}
|
||||
@@ -1,35 +1,35 @@
|
||||
import { Component, Input, Output, ElementRef, EventEmitter, OnInit, ViewEncapsulation, forwardRef } from '@angular/core';
|
||||
import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';
|
||||
import * as CodeMirror from 'codemirror-minified';
|
||||
import * as CodeMirror from 'codemirror';
|
||||
|
||||
import * as _$ from 'jquery';
|
||||
const $: any = _$;
|
||||
|
||||
// CodeMirror extensions
|
||||
import 'codemirror-minified/mode/meta';
|
||||
import 'codemirror-minified/addon/lint/lint';
|
||||
import 'codemirror-minified/addon/hint/show-hint';
|
||||
// import 'codemirror-minified/addon/mode/loadmode';
|
||||
import 'codemirror-minified/addon/edit/matchbrackets';
|
||||
import 'codemirror-minified/addon/edit/closebrackets';
|
||||
import 'codemirror-minified/addon/display/placeholder';
|
||||
import 'codemirror-minified/addon/scroll/annotatescrollbar';
|
||||
import 'codemirror-minified/addon/scroll/simplescrollbars';
|
||||
import 'codemirror/mode/meta';
|
||||
import 'codemirror/addon/lint/lint';
|
||||
import 'codemirror/addon/hint/show-hint';
|
||||
// import 'codemirror/addon/mode/loadmode';
|
||||
import 'codemirror/addon/edit/matchbrackets';
|
||||
import 'codemirror/addon/edit/closebrackets';
|
||||
import 'codemirror/addon/display/placeholder';
|
||||
import 'codemirror/addon/scroll/annotatescrollbar';
|
||||
import 'codemirror/addon/scroll/simplescrollbars';
|
||||
|
||||
// Lint support
|
||||
// Unclear how to import this dynamically...
|
||||
// import 'codemirror-minified/addon/lint/javascript-lint';
|
||||
// import 'codemirror-minified/addon/lint/json-lint';
|
||||
// import 'codemirror-minified/addon/lint/yaml-lint';
|
||||
// import 'codemirror/addon/lint/javascript-lint';
|
||||
// import 'codemirror/addon/lint/json-lint';
|
||||
// import 'codemirror/addon/lint/yaml-lint';
|
||||
|
||||
// TODO: use dynamic import with JS7 in the future. CM autoLoad cannot load it properly - thinks its AMD
|
||||
// Supported languages until dynamic loading
|
||||
// import 'codemirror-minified/mode/groovy/groovy';
|
||||
// import 'codemirror-minified/mode/javascript/javascript';
|
||||
// import 'codemirror-minified/mode/python/python';
|
||||
// import 'codemirror-minified/mode/ruby/ruby';
|
||||
// import 'codemirror-minified/mode/clike/clike';
|
||||
// import 'codemirror-minified/mode/yaml/yaml';
|
||||
// import 'codemirror/mode/groovy/groovy';
|
||||
// import 'codemirror/mode/javascript/javascript';
|
||||
// import 'codemirror/mode/python/python';
|
||||
// import 'codemirror/mode/ruby/ruby';
|
||||
// import 'codemirror/mode/clike/clike';
|
||||
// import 'codemirror/mode/yaml/yaml';
|
||||
|
||||
@Component({
|
||||
selector: 'code-editor',
|
||||
@@ -63,31 +63,31 @@ export class CodeEditorComponent implements OnInit, ControlValueAccessor {
|
||||
private _onTouchHandler: () => void;
|
||||
|
||||
@Input('line-numbers')
|
||||
private lineNumbers = false;
|
||||
lineNumbers = false;
|
||||
|
||||
@Input('line-wrapping')
|
||||
private lineWrapping = false;
|
||||
lineWrapping = false;
|
||||
|
||||
@Input('scrollbar-style')
|
||||
private scrollbarStyle: string;
|
||||
scrollbarStyle: string;
|
||||
|
||||
@Input()
|
||||
private placeholder: string;
|
||||
placeholder: string;
|
||||
|
||||
@Input('overview-ruler')
|
||||
private overviewRuler: boolean;
|
||||
overviewRuler: boolean;
|
||||
|
||||
@Output()
|
||||
private dslChange = new EventEmitter<string>();
|
||||
dslChange = new EventEmitter<string>();
|
||||
|
||||
@Output()
|
||||
private focus = new EventEmitter<void>();
|
||||
focus = new EventEmitter<void>();
|
||||
|
||||
@Output()
|
||||
private blur = new EventEmitter<void>();
|
||||
blur = new EventEmitter<void>();
|
||||
|
||||
@Output()
|
||||
private editor = new EventEmitter<CodeMirror.EditorFromTextArea>();
|
||||
editor = new EventEmitter<CodeMirror.EditorFromTextArea>();
|
||||
|
||||
private _dslChangedHandler = () => {
|
||||
this._dsl = this.doc.getValue();
|
||||
@@ -1,14 +1,14 @@
|
||||
import { Component, Input, Output, ElementRef, EventEmitter, OnInit, ViewEncapsulation } from '@angular/core';
|
||||
import * as _ from 'lodash';
|
||||
import * as CodeMirror from 'codemirror-minified';
|
||||
import * as CodeMirror from 'codemirror';
|
||||
import * as _$ from 'jquery';
|
||||
const $: any = _$;
|
||||
|
||||
import 'codemirror-minified/addon/lint/lint';
|
||||
import 'codemirror-minified/addon/hint/show-hint';
|
||||
import 'codemirror-minified/addon/display/placeholder';
|
||||
import 'codemirror-minified/addon/scroll/annotatescrollbar';
|
||||
import 'codemirror-minified/addon/scroll/simplescrollbars';
|
||||
import 'codemirror/addon/lint/lint';
|
||||
import 'codemirror/addon/hint/show-hint';
|
||||
import 'codemirror/addon/display/placeholder';
|
||||
import 'codemirror/addon/scroll/annotatescrollbar';
|
||||
import 'codemirror/addon/scroll/simplescrollbars';
|
||||
|
||||
@Component({
|
||||
selector: 'dsl-editor',
|
||||
@@ -27,31 +27,31 @@ export class DslEditorComponent implements OnInit {
|
||||
private _hint: any;
|
||||
|
||||
@Input('line-numbers')
|
||||
private lineNumbers = false;
|
||||
lineNumbers = false;
|
||||
|
||||
@Input('line-wrapping')
|
||||
private lineWrapping = false;
|
||||
lineWrapping = false;
|
||||
|
||||
@Input('scrollbar-style')
|
||||
private scrollbarStyle: string;
|
||||
scrollbarStyle: string;
|
||||
|
||||
@Input()
|
||||
private placeholder: string;
|
||||
placeholder: string;
|
||||
|
||||
@Input()
|
||||
private debounce = 0;
|
||||
debounce = 0;
|
||||
|
||||
@Output()
|
||||
private dslChange = new EventEmitter<string>();
|
||||
dslChange = new EventEmitter<string>();
|
||||
|
||||
@Output()
|
||||
private focus = new EventEmitter<void>();
|
||||
focus = new EventEmitter<void>();
|
||||
|
||||
@Output()
|
||||
private blur = new EventEmitter<void>();
|
||||
blur = new EventEmitter<void>();
|
||||
|
||||
@Output()
|
||||
private editor = new EventEmitter<CodeMirror.EditorFromTextArea>();
|
||||
editor = new EventEmitter<CodeMirror.EditorFromTextArea>();
|
||||
|
||||
private _dslChangedHandler = () => {
|
||||
this._dsl = this.doc.getValue();
|
||||
13
projects/lib/ng-package.json
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"$schema": "../../../../node_modules/ng-packagr/ng-package.schema.json",
|
||||
"dest": "../../dist/spring-flo",
|
||||
"deleteDestPath": true,
|
||||
"lib": {
|
||||
"entryFile": "./index.ts"
|
||||
},
|
||||
"allowedNonPeerDependencies": [
|
||||
"codemirror",
|
||||
"jointjs",
|
||||
"ts-disposables"
|
||||
]
|
||||
}
|
||||
22
projects/lib/package.json
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"name": "spring-flo",
|
||||
"version": "0.11.0",
|
||||
"description": "Library for quickly building text DSL visualization diagram editor",
|
||||
"author": "Andy Clement, Alex Boyko",
|
||||
"license": "Apache-2.0",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/spring-projects/spring-flo.git"
|
||||
},
|
||||
"dependencies": {
|
||||
"codemirror": "5.54.0",
|
||||
"jointjs": "3.4.1",
|
||||
"ts-disposables": "2.2.3"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@angular/core": ">=15.0.0 <17.0.0",
|
||||
"@angular/forms": ">=15.0.0 < 17.0.0",
|
||||
"@angular/common": ">=15.0.0 <17.0.0",
|
||||
"rxjs": ">=7.0.0 <8.0.0"
|
||||
}
|
||||
}
|
||||
@@ -30,8 +30,8 @@
|
||||
</select>
|
||||
|
||||
<code-editor *ngSwitchCase="types.CODE" class="df-property-control" [id]="model.id"
|
||||
[formControlName]="model.id" [language]="model['language']" [(ngModel)]="model.value" line-numbers="true"
|
||||
scrollbar-style="simple" [placeholder]="model.defaultValue || 'Enter code snippet...'" overview-ruler="true">
|
||||
[formControlName]="model.id" [language]="model['language']" [(ngModel)]="model.value" [line-numbers]="true"
|
||||
scrollbar-style="simple" [placeholder]="model.defaultValue || 'Enter code snippet...'" [overview-ruler]="true">
|
||||
</code-editor>
|
||||
|
||||
<input *ngSwitchDefault class="df-property-control" type="text" [id]="model.id" [formControlName]="model.id"
|
||||
8
projects/lib/styles.scss
Normal file
@@ -0,0 +1,8 @@
|
||||
@import "./../../node_modules/jointjs/dist/joint.core.css";
|
||||
/*
|
||||
@import "./../../node_modules/codemirror/lib/codemirror.css";
|
||||
|
||||
@import "./../../node_modules/codemirror/addon/hint/show-hint.css";
|
||||
@import "./../../node_modules/codemirror/addon/lint/lint.css";
|
||||
@import "./../../node_modules/codemirror/addon/scroll/simplescrollbars.css";
|
||||
*/
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"bundlerOptions": {
|
||||
"ignoreImports": ["~@angular/.*"],
|
||||
"logLevel": "silent"
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 5.3 KiB |
@@ -1,5 +0,0 @@
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
|
||||
import { AppModule } from './app/app.module';
|
||||
|
||||
platformBrowserDynamic().bootstrapModule(AppModule);
|
||||
@@ -1,49 +0,0 @@
|
||||
var templateUrlRegex = /templateUrl\s*:(\s*['"`](.*?)['"`]\s*)/gm;
|
||||
var stylesRegex = /styleUrls *:(\s*\[[^\]]*?\])/g;
|
||||
var stringRegex = /(['`"])((?:[^\\]\\\1|.)*?)\1/g;
|
||||
|
||||
module.exports.translate = function (load) {
|
||||
if (load.source.indexOf('moduleId') != -1) return load;
|
||||
|
||||
var url = document.createElement('a');
|
||||
url.href = load.address;
|
||||
|
||||
var basePathParts = url.pathname.split('/');
|
||||
|
||||
basePathParts.pop();
|
||||
var basePath = basePathParts.join('/');
|
||||
|
||||
var baseHref = document.createElement('a');
|
||||
baseHref.href = this.baseURL;
|
||||
baseHref = baseHref.pathname;
|
||||
|
||||
if (!baseHref.startsWith('/base/')) { // it is not karma
|
||||
basePath = basePath.replace(baseHref, '');
|
||||
}
|
||||
|
||||
load.source = load.source
|
||||
.replace(templateUrlRegex, function (match, quote, url) {
|
||||
let resolvedUrl = url;
|
||||
|
||||
if (url.startsWith('.')) {
|
||||
resolvedUrl = basePath + url.substr(1);
|
||||
}
|
||||
|
||||
return 'templateUrl: "' + resolvedUrl + '"';
|
||||
})
|
||||
.replace(stylesRegex, function (match, relativeUrls) {
|
||||
var urls = [];
|
||||
|
||||
while ((match = stringRegex.exec(relativeUrls)) !== null) {
|
||||
if (match[2].startsWith('.')) {
|
||||
urls.push('"' + basePath + match[2].substr(1) + '"');
|
||||
} else {
|
||||
urls.push('"' + match[2] + '"');
|
||||
}
|
||||
}
|
||||
|
||||
return "styleUrls: [" + urls.join(', ') + "]";
|
||||
});
|
||||
|
||||
return load;
|
||||
};
|
||||
@@ -1,138 +0,0 @@
|
||||
/**
|
||||
* System configuration for Angular samples
|
||||
* Adjust as necessary for your application needs.
|
||||
*/
|
||||
(function (global) {
|
||||
System.config({
|
||||
transpiler: false,
|
||||
paths: {
|
||||
// paths serve as alias
|
||||
'npm:': 'node_modules/'
|
||||
},
|
||||
// map tells the System loader where to look for things
|
||||
map: {
|
||||
// our app is within the app folder
|
||||
app: 'app',
|
||||
|
||||
// angular bundles
|
||||
'@angular/core': 'npm:@angular/core/bundles/core.umd.js',
|
||||
'@angular/common': 'npm:@angular/common/bundles/common.umd.js',
|
||||
'@angular/compiler': 'npm:@angular/compiler/bundles/compiler.umd.js',
|
||||
'@angular/platform-browser': 'npm:@angular/platform-browser/bundles/platform-browser.umd.js',
|
||||
'@angular/platform-browser-dynamic': 'npm:@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js',
|
||||
'@angular/http': 'npm:@angular/http/bundles/http.umd.js',
|
||||
'@angular/router': 'npm:@angular/router/bundles/router.umd.js',
|
||||
'@angular/forms': 'npm:@angular/forms/bundles/forms.umd.js',
|
||||
'@angular/animations': 'npm:@angular/animations/bundles/animations.umd.js',
|
||||
|
||||
'ngx-bootstrap': 'npm:ngx-bootstrap/bundles/ngx-bootstrap.umd.min.js',
|
||||
// Below workaround due to https://github.com/valor-software/ngx-bootstrap/issues/5195
|
||||
'ngx-bootstrap/chronos': 'npm:ngx-bootstrap/chronos/bundles/ngx-bootstrap-chronos.umd.min.js',
|
||||
'ngx-bootstrap/utils': 'npm:ngx-bootstrap/utils/bundles/ngx-bootstrap-utils.umd.min.js',
|
||||
'ngx-bootstrap/dropdown': 'npm:ngx-bootstrap/dropdown/bundles/ngx-bootstrap-dropdown.umd.min.js',
|
||||
'ngx-bootstrap/accordion': 'npm:ngx-bootstrap/accordion/bundles/ngx-bootstrap-accordion.umd.min.js',
|
||||
'ngx-bootstrap/collapse': 'npm:ngx-bootstrap/collapse/bundles/ngx-bootstrap-collapse.umd.min.js',
|
||||
'ngx-bootstrap/alert': 'npm:ngx-bootstrap/alert/bundles/ngx-bootstrap-alert.umd.min.js',
|
||||
'ngx-bootstrap/buttons': 'npm:ngx-bootstrap/buttons/bundles/ngx-bootstrap-buttons.umd.min.js',
|
||||
'ngx-bootstrap/carousel': 'npm:ngx-bootstrap/carousel/bundles/ngx-bootstrap-carousel.umd.min.js',
|
||||
'ngx-bootstrap/mini-ngrx': 'npm:ngx-bootstrap/mini-ngrx/bundles/ngx-bootstrap-mini-ngrx.umd.min.js',
|
||||
'ngx-bootstrap/component-loader': 'npm:ngx-bootstrap/component-loader/bundles/ngx-bootstrap-component-loader.umd.min.js',
|
||||
'ngx-bootstrap/positioning': 'npm:ngx-bootstrap/positioning/bundles/ngx-bootstrap-positioning.umd.min.js',
|
||||
'ngx-bootstrap/pagination': 'npm:ngx-bootstrap/pagination/bundles/ngx-bootstrap-pagination.umd.min.js',
|
||||
'ngx-bootstrap/progressbar': 'npm:ngx-bootstrap/progressbar/bundles/ngx-bootstrap-progressbar.umd.min.js',
|
||||
'ngx-bootstrap/rating': 'npm:ngx-bootstrap/rating/bundles/ngx-bootstrap-rating.umd.min.js',
|
||||
'ngx-bootstrap/tabs': 'npm:ngx-bootstrap/tabs/bundles/ngx-bootstrap-tabs.umd.min.js',
|
||||
'ngx-bootstrap/timepicker': 'npm:ngx-bootstrap/timepicker/bundles/ngx-bootstrap-timepicker.umd.min.js',
|
||||
'ngx-bootstrap/tooltip': 'npm:ngx-bootstrap/tooltip/bundles/ngx-bootstrap-tooltip.umd.min.js',
|
||||
'ngx-bootstrap/typeahead': 'npm:ngx-bootstrap/typeahead/bundles/ngx-bootstrap-typeahead.umd.min.js',
|
||||
'ngx-bootstrap/popover': 'npm:ngx-bootstrap/popover/bundles/ngx-bootstrap-popover.umd.min.js',
|
||||
'ngx-bootstrap/locale': 'npm:ngx-bootstrap/locale/bundles/ngx-bootstrap-locale.umd.min.js',
|
||||
'ngx-bootstrap/sortable': 'npm:ngx-bootstrap/sortable/bundles/ngx-bootstrap-sortable.umd.min.js',
|
||||
'ngx-bootstrap/datepicker': 'npm:ngx-bootstrap/datepicker/bundles/ngx-bootstrap-datepicker.umd.min.js',
|
||||
'ngx-bootstrap/modal': 'npm:ngx-bootstrap/modal/bundles/ngx-bootstrap-modal.umd.min.js',
|
||||
|
||||
// other libraries
|
||||
'rxjs': 'npm:rxjs',
|
||||
'jointjs': 'npm:jointjs',
|
||||
'jquery': 'npm:jquery',
|
||||
'backbone': 'npm:backbone',
|
||||
'lodash': 'npm:lodash',
|
||||
'underscore': 'npm:lodash',
|
||||
'dagre': 'npm:dagre',
|
||||
'codemirror': 'npm:codemirror-minified',
|
||||
'codemirror-minified': 'npm:codemirror-minified',
|
||||
'moment': 'npm:moment/moment.js',
|
||||
'ts-disposables': 'npm:ts-disposables',
|
||||
'jshint': 'npm:jshint/dist/jshint.js'
|
||||
},
|
||||
meta: {
|
||||
'lodash': {
|
||||
exports: '_',
|
||||
format: 'global'
|
||||
},
|
||||
'jshint': {
|
||||
deps: ['lodash'],
|
||||
format: 'global'
|
||||
}
|
||||
},
|
||||
// packages tells the System loader how to load when no filename and/or no extension
|
||||
packages: {
|
||||
app: {
|
||||
defaultExtension: 'js',
|
||||
meta: {
|
||||
'./*.js': {
|
||||
loader: 'systemjs-angular-loader.js'
|
||||
},
|
||||
}
|
||||
},
|
||||
rx: {
|
||||
main: './dist/rx.js'
|
||||
},
|
||||
rxjs: {
|
||||
main: 'index.js',
|
||||
defaultExtension: 'js'
|
||||
},
|
||||
'rxjs/operators': {
|
||||
main: './index.js'
|
||||
},
|
||||
'ts-disposables': {
|
||||
defaultExtension: 'js',
|
||||
main: './dist/index.js'
|
||||
},
|
||||
jointjs: {
|
||||
main: './dist/joint.js'
|
||||
},
|
||||
jquery: {
|
||||
main: './dist/jquery.js'
|
||||
},
|
||||
backbone: {
|
||||
main: './backbone.js'
|
||||
},
|
||||
lodash: {
|
||||
main: './index.js'
|
||||
},
|
||||
dagre: {
|
||||
main: './dist/dagre.js'
|
||||
},
|
||||
codemirror: {
|
||||
main: './lib/codemirror.js'
|
||||
},
|
||||
jshint: {
|
||||
meta: {
|
||||
lodash: {
|
||||
format: 'global'
|
||||
}
|
||||
}
|
||||
},
|
||||
'spring-flo': {
|
||||
main: 'index.js',
|
||||
defaultExtension: 'js',
|
||||
meta: {
|
||||
'./*.js': {
|
||||
loader: 'systemjs-angular-loader.js'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
})(this);
|
||||
@@ -1,22 +0,0 @@
|
||||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"angularCompilerOptions": {
|
||||
"paths": {
|
||||
"spring-flo": [ "../../dist/lib" ]
|
||||
}
|
||||
},
|
||||
"compilerOptions": {
|
||||
"baseUrl": "",
|
||||
"module": "commonjs",
|
||||
"declaration": false,
|
||||
"emitDecoratorMetadata": true,
|
||||
"paths": {
|
||||
"spring-flo": [
|
||||
"../../dist/lib"
|
||||
]
|
||||
}
|
||||
},
|
||||
"exclude": [
|
||||
"main-aot.ts"
|
||||
]
|
||||
}
|
||||
@@ -1,45 +0,0 @@
|
||||
{
|
||||
"name": "spring-flo",
|
||||
"version": "0.11.0",
|
||||
"description": "Library for quickly building text DSL visualization diagram editor",
|
||||
"author": "Andy Clement, Alex Boyko",
|
||||
"license": "Apache-2.0",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/spring-projects/spring-flo.git"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 6.9.0",
|
||||
"npm": ">= 3.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"codemirror-minified": "5.54.0",
|
||||
"jointjs": "3.4.1",
|
||||
"ts-disposables": "2.2.3"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@angular/core": ">=11.0.0 <13.0.0",
|
||||
"@angular/forms": ">=11.0.0 < 13.0.0",
|
||||
"@angular/common": ">=11.0.0 <13.0.0",
|
||||
"rxjs": ">=6.0.0 <7.0.0"
|
||||
},
|
||||
"ngPackage": {
|
||||
"lib": {
|
||||
"entryFile": "./index.ts",
|
||||
"umdModuleIds": {
|
||||
"jointjs": "joint",
|
||||
"jquery": "$",
|
||||
"lodash": "_",
|
||||
"ts-disposables": "tsDisposables",
|
||||
"codemirror-minified": "codemirror"
|
||||
}
|
||||
},
|
||||
"whitelistedNonPeerDependencies": [
|
||||
"codemirror-minified",
|
||||
"jointjs",
|
||||
"ts-disposables"
|
||||
],
|
||||
"dest": "../../dist",
|
||||
"deleteDestPath": true
|
||||
}
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
@import "./../../node_modules/jointjs/dist/joint.core.css";
|
||||
@import "./../../node_modules/codemirror-minified/lib/codemirror.css";
|
||||
@import "./../../node_modules/codemirror-minified/addon/hint/show-hint.css";
|
||||
@import "./../../node_modules/codemirror-minified/addon/lint/lint.css";
|
||||
@import "./../../node_modules/codemirror-minified/addon/scroll/simplescrollbars.css";
|
||||
@@ -1,7 +1,14 @@
|
||||
/* To learn more about this file see: https://angular.io/config/tsconfig. */
|
||||
{
|
||||
"compileOnSave": false,
|
||||
"compilerOptions": {
|
||||
"target": "es5",
|
||||
"module": "es2015",
|
||||
"paths": {
|
||||
"spring-flo": ["projects/lib"],
|
||||
"spring-flo/*": ["projects/lib/*"]
|
||||
|
||||
},
|
||||
"baseUrl": "./",
|
||||
"outDir": "./dist/out-tsc",
|
||||
"moduleResolution": "node",
|
||||
"sourceMap": true,
|
||||
"inlineSources": true,
|
||||
@@ -11,17 +18,15 @@
|
||||
"suppressImplicitAnyIndexErrors": true,
|
||||
"skipLibCheck": true,
|
||||
"stripInternal": true,
|
||||
"lib": [
|
||||
"es2015",
|
||||
"dom"
|
||||
],
|
||||
"typeRoots": [
|
||||
"node_modules/@types",
|
||||
"src/lib/@types"
|
||||
],
|
||||
"strictNullChecks":false
|
||||
"target": "ES2022",
|
||||
"module": "ES2022",
|
||||
"useDefineForClassFields": false,
|
||||
"lib": ["ES2022", "dom"]
|
||||
},
|
||||
"angularCompilerOptions": {
|
||||
"enableIvy": true
|
||||
"enableI18nLegacyMessageIdFormat": false,
|
||||
"strictInjectionParameters": true,
|
||||
"strictInputAccessModifiers": true,
|
||||
"strictTemplates": true
|
||||
}
|
||||
}
|
||||
|
||||
125
tslint.json
@@ -1,125 +0,0 @@
|
||||
{
|
||||
"rules": {
|
||||
"class-name": true,
|
||||
"comment-format": [
|
||||
false,
|
||||
"check-space"
|
||||
],
|
||||
"curly": true,
|
||||
"eofline": true,
|
||||
"forin": true,
|
||||
"indent": [
|
||||
true,
|
||||
"spaces"
|
||||
],
|
||||
"label-position": true,
|
||||
"max-line-length": [
|
||||
false,
|
||||
140
|
||||
],
|
||||
"member-access": false,
|
||||
"member-ordering": [
|
||||
{
|
||||
"name": "static field",
|
||||
"kinds": [
|
||||
"public-static-field",
|
||||
"protected-static-field",
|
||||
"private-static-field"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "instance field",
|
||||
"kinds": [
|
||||
"public-instance-field",
|
||||
"protected-instance-field",
|
||||
"private-instance-field"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "static method",
|
||||
"kinds": [
|
||||
"public-static-method",
|
||||
"private-static-method",
|
||||
"protected-static-method",
|
||||
"public-static-accessor",
|
||||
"protected-static-accessor",
|
||||
"private-static-accessor"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "instance method",
|
||||
"kinds": [
|
||||
"public-constructor",
|
||||
"protected-constructor",
|
||||
"private-constructor",
|
||||
"public-instance-method",
|
||||
"protected-instance-method",
|
||||
"private-instance-method",
|
||||
"public-instance-accessor",
|
||||
"protected-instance-accessor",
|
||||
"private-instance-accessor"
|
||||
]
|
||||
}
|
||||
],
|
||||
"no-arg": true,
|
||||
"no-bitwise": true,
|
||||
"no-console": [
|
||||
true,
|
||||
"info",
|
||||
"time",
|
||||
"timeEnd",
|
||||
"trace"
|
||||
],
|
||||
"no-construct": true,
|
||||
"no-debugger": true,
|
||||
"no-duplicate-variable": true,
|
||||
"no-empty": false,
|
||||
"no-eval": true,
|
||||
"no-inferrable-types": [true, "ignore-params"],
|
||||
"no-shadowed-variable": true,
|
||||
"no-string-literal": false,
|
||||
"no-switch-case-fall-through": true,
|
||||
"no-trailing-whitespace": true,
|
||||
"no-unused-expression": true,
|
||||
"no-var-keyword": true,
|
||||
"object-literal-sort-keys": false,
|
||||
"one-line": [
|
||||
true,
|
||||
"check-open-brace",
|
||||
"check-catch",
|
||||
"check-else",
|
||||
"check-whitespace"
|
||||
],
|
||||
"quotemark": [
|
||||
true,
|
||||
"single"
|
||||
],
|
||||
"radix": true,
|
||||
"semicolon": [
|
||||
"always"
|
||||
],
|
||||
"triple-equals": [
|
||||
true,
|
||||
"allow-null-check"
|
||||
],
|
||||
"typedef-whitespace": [
|
||||
true,
|
||||
{
|
||||
"call-signature": "nospace",
|
||||
"index-signature": "nospace",
|
||||
"parameter": "nospace",
|
||||
"property-declaration": "nospace",
|
||||
"variable-declaration": "nospace"
|
||||
}
|
||||
],
|
||||
"variable-name": false,
|
||||
"whitespace": [
|
||||
true,
|
||||
"check-branch",
|
||||
"check-decl",
|
||||
"check-operator",
|
||||
"check-separator",
|
||||
"check-type"
|
||||
]
|
||||
}
|
||||
}
|
||||