[ADF-2134] App config schema (#2892)

* Application config schema

* Adding descriptions

* validate-config npm script

* Finishing schema

* Package.json modifications

* Add validation to demo shell start
This commit is contained in:
Popovics András
2018-01-30 13:34:08 +00:00
committed by Eugenio Romano
parent 08f2cc9236
commit fafc75a9a0
4 changed files with 325 additions and 1 deletions

View File

@@ -5,6 +5,7 @@
"author": "Alfresco Software, Ltd.",
"scripts": {
"ng": "ng",
"prestart": "npm run validate-config",
"start": "npm run server-versions && rimraf dist && ng serve --host 0.0.0.0 --app dist --open --aot=false",
"start:dev": "npm run lint && npm run server-versions && rimraf dist && npm run clean-lib-angular && concurrently \"ng serve --host 0.0.0.0 --disable-host-check --app dev pp-dev --proxy-config proxy.conf.js --open\" \"npm run style:dev -- --watch\" ",
"start:dist": "npm run server-versions && rimraf dist && node --max_old_space_size=30000 node_modules/.bin/ng serve --prod --build-optimizer=false --aot=false --host 0.0.0.0 --disable-host-check --app dist",
@@ -15,6 +16,7 @@
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e",
"validate-config": "ajv validate -s ../lib/core/app-config/schema.json -d ./src/app.config.json --errors=text --verbose",
"server-versions": "rimraf ./src/versions.json && npm list --depth=0 --json=true --prod=true > ./src/versions.json || exit 0",
"clean": "npm run clean-build && rimraf dist node_modules typings dist",
"clean-lib-angular": "rimraf ../lib/node_modules/@angular",
@@ -105,6 +107,7 @@
"@types/jasmine": "~2.5.53",
"@types/jasminewd2": "~2.0.2",
"@types/node": "~6.0.60",
"ajv-cli": "^3.0.0",
"codelyzer": "4.0.0",
"concurrently": "^3.5.1",
"jasmine-core": "~2.6.2",

View File

@@ -1,4 +1,5 @@
{
"$schema": "../../lib/core/app-config/schema.json",
"ecmHost": "http://{hostname}:{port}",
"bpmHost": "http://{hostname}:{port}",
"application": {