[ADF-2514][ADF-2517][ADF-2143] Fix build isssues (#3097)

* fix remove angular folder problem

* fix npm import cli

* fix search module

* fix comment

* fix tsconfig output

* es 20016 tsconfig

* travis add demo shell dist

* exclude datapicker process services

* demo shell script fix

* bundle check new build

* add simulate publish

* invert publish

* test distribution

* improve sh help

* uncomment script

* finally got the guilty piece of code

* run e2e
This commit is contained in:
Eugenio Romano 2018-03-20 11:53:11 +00:00 committed by GitHub
parent c06cf28769
commit c578529b15
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
19 changed files with 188 additions and 49 deletions

View File

@ -58,8 +58,11 @@ script:
(./scripts/start.sh -dev -t -ss -vjsapi alpha || exit 1;); (./scripts/start.sh -dev -t -ss -vjsapi alpha || exit 1;);
fi fi
fi fi
jobs: jobs:
include: include:
- stage: Check build demo shell in production mode AND e2e
script: ./scripts/test-dist.sh
- stage: Check 2.0.0 Project Update - stage: Check 2.0.0 Project Update
script: ./scripts/test-e2e-bc.sh script: ./scripts/test-e2e-bc.sh
- stage: Check ADF exports - stage: Check ADF exports

View File

@ -6,22 +6,20 @@
"scripts": { "scripts": {
"ng": "ng", "ng": "ng",
"prestart": "npm run validate-config", "prestart": "npm run validate-config",
"start": "npm run server-versions && rimraf dist && ng serve --host 0.0.0.0 --proxy-config proxy.conf.js --app dist --open --aot=false", "start": "npm run server-versions && rimraf dist && ng serve --host 0.0.0.0 --proxy-config proxy.conf.js --app dist --open",
"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\" \"npm run copy:dev\" ", "start:dev": " npm run lint && npm run server-versions && rimraf dist && 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\" \"npm run copy:dev\" ",
"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", "start:dist": "npm run server-versions && rimraf dist && node --max_old_space_size=30000 node_modules/.bin/ng serve --prod --host 0.0.0.0 --disable-host-check --app dist",
"build": "npm run validate-config && npm run server-versions && rimraf dist && ng build --app dist", "build": "npm run validate-config && npm run server-versions && rimraf dist && ng build--app dist",
"build:dev": "npm run validate-config && npm run lint && npm run style:dev && npm run server-versions && rimraf dist && ng build --app dev", "build:dev": "npm run validate-config && npm run lint && npm run style:dev && npm run server-versions && rimraf dist && ng build --app dev",
"build:dist": "npm run validate-config && npm run style:dev && npm run server-versions && rimraf dist && node --max_old_space_size=30000 node_modules/.bin/ng build --prod --build-optimizer=false --aot=false --app dist", "build:dist": "npm run validate-config && npm run server-versions && rimraf dist && ng build --prod --app dist",
"style:dev": "npm run webpack -- --config config/webpack.style.js --progress --profile --bail", "style:dev": "npm run webpack -- --config config/webpack.style.js --progress --profile --bail",
"copy:dev": "node ./config/dev-copy-watch.js", "copy:dev": "node ./config/dev-copy-watch.js",
"test": " npm run clean-lib-angular && ng test --single-run", "test": " ng test --single-run",
"lint": "ng lint", "lint": "ng lint",
"e2e": "ng e2e", "e2e": "ng e2e",
"validate-config": "ajv validate -s ../lib/core/app-config/schema.json -d ./src/app.config.json --errors=text --verbose", "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", "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": "rimraf dist node_modules typings",
"clean-lib-angular": "rimraf ../lib/node_modules/@angular",
"clean-build": "rimraf 'app/{,**/}**.js' 'app/{,**/}**.js.map' 'app/{,**/}**.d.ts'",
"clean-lock": "rimraf package-lock.json", "clean-lock": "rimraf package-lock.json",
"webpack": "node node_modules/webpack/bin/webpack.js" "webpack": "node node_modules/webpack/bin/webpack.js"
}, },
@ -63,10 +61,10 @@
], ],
"private": true, "private": true,
"dependencies": { "dependencies": {
"@alfresco/adf-content-services": "2.2.0", "@alfresco/adf-content-services": "2.3.0-beta3",
"@alfresco/adf-core": "2.2.0", "@alfresco/adf-core": "2.3.0-beta3",
"@alfresco/adf-insights": "2.2.0", "@alfresco/adf-insights": "2.3.0-beta3",
"@alfresco/adf-process-services": "2.2.0", "@alfresco/adf-process-services": "2.3.0-beta3",
"@angular/animations": "5.1.1", "@angular/animations": "5.1.1",
"@angular/cdk": "5.0.1", "@angular/cdk": "5.0.1",
"@angular/common": "5.1.1", "@angular/common": "5.1.1",
@ -82,7 +80,7 @@
"@mat-datetimepicker/core": "^1.0.1", "@mat-datetimepicker/core": "^1.0.1",
"@mat-datetimepicker/moment": "^1.0.1", "@mat-datetimepicker/moment": "^1.0.1",
"@ngx-translate/core": "9.1.1", "@ngx-translate/core": "9.1.1",
"alfresco-js-api": "2.2.0", "alfresco-js-api": "^2.3.0-beta3",
"chart.js": "2.5.0", "chart.js": "2.5.0",
"classlist.js": "1.1.20150312", "classlist.js": "1.1.20150312",
"core-js": "2.4.1", "core-js": "2.4.1",
@ -102,7 +100,7 @@
}, },
"devDependencies": { "devDependencies": {
"@angular-devkit/core": "0.0.28", "@angular-devkit/core": "0.0.28",
"@angular/cli": "1.6.5", "@angular/cli": "1.7.3",
"@angular/compiler-cli": "^5.2.0", "@angular/compiler-cli": "^5.2.0",
"@angular/language-service": "^5.2.0", "@angular/language-service": "^5.2.0",
"@types/jasmine": "~2.8.3", "@types/jasmine": "~2.8.3",

View File

@ -29,14 +29,14 @@ import { SearchControlComponent } from './components/search-control.component';
import { SearchComponent } from './components/search.component'; import { SearchComponent } from './components/search.component';
import { EmptySearchResultComponent } from './components/empty-search-result.component'; import { EmptySearchResultComponent } from './components/empty-search-result.component';
export const ALFRESCO_SEARCH_DIRECTIVES: [any] = [ export const ALFRESCO_SEARCH_DIRECTIVES: any[] = [
SearchComponent, SearchComponent,
SearchControlComponent, SearchControlComponent,
SearchTriggerDirective, SearchTriggerDirective,
EmptySearchResultComponent EmptySearchResultComponent
]; ];
export const ALFRESCO_SEARCH_PROVIDERS: [any] = [ export const ALFRESCO_SEARCH_PROVIDERS: any[] = [
SearchService SearchService
]; ];

View File

@ -16,7 +16,7 @@
"noFallthroughCasesInSwitch": true, "noFallthroughCasesInSwitch": true,
"removeComments": true, "removeComments": true,
"declaration": true, "declaration": true,
"outDir": "./", "outDir": "../dist/content-services/",
"baseUrl" : "./", "baseUrl" : "./",
"paths": { "paths": {
"@alfresco/adf-process-services": ["../process-services"], "@alfresco/adf-process-services": ["../process-services"],
@ -25,7 +25,7 @@
"@angular/*": ["../node_modules/@angular/*"] "@angular/*": ["../node_modules/@angular/*"]
}, },
"lib": [ "lib": [
"es2015", "es2016",
"dom" "dom"
], ],
"suppressImplicitAnyIndexErrors": true, "suppressImplicitAnyIndexErrors": true,

View File

@ -16,7 +16,7 @@
"noFallthroughCasesInSwitch": true, "noFallthroughCasesInSwitch": true,
"removeComments": true, "removeComments": true,
"declaration": true, "declaration": true,
"outDir": "./", "outDir": "../dist/core/",
"baseUrl" : "./", "baseUrl" : "./",
"allowSyntheticDefaultImports": true, "allowSyntheticDefaultImports": true,
"paths": { "paths": {
@ -26,7 +26,7 @@
"@angular/*": ["../node_modules/@angular/*"] "@angular/*": ["../node_modules/@angular/*"]
}, },
"lib": [ "lib": [
"es2015", "es2016",
"dom" "dom"
], ],
"suppressImplicitAnyIndexErrors": true, "suppressImplicitAnyIndexErrors": true,

View File

@ -16,7 +16,7 @@
"noFallthroughCasesInSwitch": true, "noFallthroughCasesInSwitch": true,
"removeComments": true, "removeComments": true,
"declaration": true, "declaration": true,
"outDir": "./", "outDir": "../dist/insights/",
"baseUrl" : "./", "baseUrl" : "./",
"paths": { "paths": {
"@alfresco/adf-process-services": ["../process-services"], "@alfresco/adf-process-services": ["../process-services"],
@ -26,7 +26,7 @@
"@angular/*": ["../node_modules/@angular/*"] "@angular/*": ["../node_modules/@angular/*"]
}, },
"lib": [ "lib": [
"es2015", "es2016",
"dom" "dom"
], ],
"suppressImplicitAnyIndexErrors": true, "suppressImplicitAnyIndexErrors": true,

View File

@ -7,7 +7,7 @@
"clean": "rimraf node_modules", "clean": "rimraf node_modules",
"clean-lock": "rimraf package-lock.json", "clean-lock": "rimraf package-lock.json",
"rimraf": "rimraf", "rimraf": "rimraf",
"build": "npm run webpack -- --config config/webpack.build.js --progress --profile --bail && npm run build-style && npm run bundlesize-check", "build": "npm run webpack -- --config config/webpack.build.js --progress --profile --bail && npm run build-style",
"test": "node node_modules/karma/bin/karma start --reporters mocha,coverage --single-run --component .", "test": "node node_modules/karma/bin/karma start --reporters mocha,coverage --single-run --component .",
"build-style": "npm run bundle-scss && npm run webpack -- --config config/webpack.style.js --progress --profile --bail", "build-style": "npm run bundle-scss && npm run webpack -- --config config/webpack.style.js --progress --profile --bail",
"build-style-new": "npm run bundle-scss-new && npm run webpack -- --config config/webpack.style.js --progress --profile --bail", "build-style-new": "npm run bundle-scss-new && npm run webpack -- --config config/webpack.style.js --progress --profile --bail",
@ -24,7 +24,7 @@
"copy-i18n": "mkdir -p dist/core/bundles/assets/adf-core/i18n && cp -R core/i18n/* dist/core/bundles/assets/adf-core/i18n && mkdir -p dist/content-services/bundles/assets/adf-content-services/i18n && cp -R content-services/i18n/* dist/content-services/bundles/assets/adf-content-services/i18n && mkdir -p dist/process-services/bundles/assets/adf-process-services/i18n && cp -R process-services/i18n/* dist/process-services/bundles/assets/adf-process-services/i18n && mkdir -p dist/insights/bundles/assets/adf-insights/i18n && cp -R insights/i18n/* dist/insights/bundles/assets/adf-insights/i18n", "copy-i18n": "mkdir -p dist/core/bundles/assets/adf-core/i18n && cp -R core/i18n/* dist/core/bundles/assets/adf-core/i18n && mkdir -p dist/content-services/bundles/assets/adf-content-services/i18n && cp -R content-services/i18n/* dist/content-services/bundles/assets/adf-content-services/i18n && mkdir -p dist/process-services/bundles/assets/adf-process-services/i18n && cp -R process-services/i18n/* dist/process-services/bundles/assets/adf-process-services/i18n && mkdir -p dist/insights/bundles/assets/adf-insights/i18n && cp -R insights/i18n/* dist/insights/bundles/assets/adf-insights/i18n",
"copy-assets": "cp -R core/assets/* dist/core/bundles/assets && cp -R content-services/assets/* dist/content-services/bundles/assets && cp -R process-services/assets/* dist/process-services/bundles/assets", "copy-assets": "cp -R core/assets/* dist/core/bundles/assets && cp -R content-services/assets/* dist/content-services/bundles/assets && cp -R process-services/assets/* dist/process-services/bundles/assets",
"copy-app-schema": "cp core/app-config/schema.json dist/core/app.config.schema.json", "copy-app-schema": "cp core/app-config/schema.json dist/core/app.config.schema.json",
"new-build": "npm run build-bundles && npm run build-style-new && npm run copy-i18n && npm run copy-assets && npm run copy-app-schema", "new-build": "rm -rf node_modules/@alfresco && npm run build-bundles && npm run build-style-new && npm run copy-i18n && npm run copy-assets && npm run copy-app-schema && npm run bundlesize-check",
"build-bundles": "npm run build-core && npm run link-core && npm run build-content && npm run link-content && npm run build-process && npm run build-insights", "build-bundles": "npm run build-core && npm run link-core && npm run build-content && npm run link-content && npm run build-process && npm run build-insights",
"link-core": "mkdir -p ./node_modules/@alfresco/adf-core/ && cp -R ./dist/core/* ./node_modules/@alfresco/adf-core/", "link-core": "mkdir -p ./node_modules/@alfresco/adf-core/ && cp -R ./dist/core/* ./node_modules/@alfresco/adf-core/",
"link-content": "mkdir -p ./node_modules/@alfresco/adf-content-services/ && cp -R ./dist/content-services/* ./node_modules/@alfresco/adf-content-services/", "link-content": "mkdir -p ./node_modules/@alfresco/adf-content-services/ && cp -R ./dist/content-services/* ./node_modules/@alfresco/adf-content-services/",
@ -161,19 +161,19 @@
"license": "Apache-2.0", "license": "Apache-2.0",
"bundlesize": [ "bundlesize": [
{ {
"path": "./content-services/bundles/adf-content-services.js", "path": "./dist/content-services/bundles/adf-content-services.umd.js",
"maxSize": "50 kb" "maxSize": "50 kb"
}, },
{ {
"path": "./process-services/bundles/adf-process-services.js", "path": "./dist/process-services/bundles/adf-process-services.umd.js",
"maxSize": "60 kb" "maxSize": "50 kb"
}, },
{ {
"path": "./insights/bundles/adf-insights.js", "path": "./dist/insights/bundles/adf-insights.umd.js",
"maxSize": "60 kb" "maxSize": "50 kb"
}, },
{ {
"path": "./core/bundles/adf-core.js", "path": "./dist/core/bundles/adf-core.umd.js",
"maxSize": "150 kb" "maxSize": "150 kb"
} }
], ],

View File

@ -19,7 +19,6 @@
import { Component, ViewEncapsulation, OnInit } from '@angular/core'; import { Component, ViewEncapsulation, OnInit } from '@angular/core';
import { import {
baseHost,
UploadWidgetComponent, UploadWidgetComponent,
FormService, FormService,
LogService, LogService,
@ -32,12 +31,23 @@ import {
import { ContentNodeDialogService } from '@alfresco/adf-content-services'; import { ContentNodeDialogService } from '@alfresco/adf-content-services';
import { MinimalNodeEntryEntity } from 'alfresco-js-api'; import { MinimalNodeEntryEntity } from 'alfresco-js-api';
import { Observable } from 'rxjs/Observable'; import { Observable } from 'rxjs/Observable';
import 'rxjs/add/observable/from';
@Component({ @Component({
selector: 'attach-widget', selector: 'attach-widget',
templateUrl: './attach-file-widget.component.html', templateUrl: './attach-file-widget.component.html',
styleUrls: ['./attach-file-widget.component.scss'], styleUrls: ['./attach-file-widget.component.scss'],
host: baseHost, host: {
'(click)': 'event($event)',
'(blur)': 'event($event)',
'(change)': 'event($event)',
'(focus)': 'event($event)',
'(focusin)': 'event($event)',
'(focusout)': 'event($event)',
'(input)': 'event($event)',
'(invalid)': 'event($event)',
'(select)': 'event($event)'
},
encapsulation: ViewEncapsulation.None encapsulation: ViewEncapsulation.None
}) })
export class AttachFileWidgetComponent extends UploadWidgetComponent implements OnInit { export class AttachFileWidgetComponent extends UploadWidgetComponent implements OnInit {

View File

@ -19,7 +19,6 @@
import { Component, ViewEncapsulation, OnInit } from '@angular/core'; import { Component, ViewEncapsulation, OnInit } from '@angular/core';
import { import {
baseHost,
WidgetComponent, WidgetComponent,
FormService, FormService,
NodesApiService NodesApiService
@ -31,7 +30,17 @@ import { MinimalNodeEntryEntity } from 'alfresco-js-api';
selector: 'attach-folder-widget', selector: 'attach-folder-widget',
templateUrl: './attach-folder-widget.component.html', templateUrl: './attach-folder-widget.component.html',
styleUrls: ['./attach-folder-widget.component.scss'], styleUrls: ['./attach-folder-widget.component.scss'],
host: baseHost, host: {
'(click)': 'event($event)',
'(blur)': 'event($event)',
'(change)': 'event($event)',
'(focus)': 'event($event)',
'(focusin)': 'event($event)',
'(focusout)': 'event($event)',
'(input)': 'event($event)',
'(invalid)': 'event($event)',
'(select)': 'event($event)'
},
encapsulation: ViewEncapsulation.None encapsulation: ViewEncapsulation.None
}) })
export class AttachFolderWidgetComponent extends WidgetComponent implements OnInit { export class AttachFolderWidgetComponent extends WidgetComponent implements OnInit {

View File

@ -13,6 +13,7 @@
"minimatch": "minimatch", "minimatch": "minimatch",
"@angular/platform-browser/animations": "@angular/platform-browser/animations", "@angular/platform-browser/animations": "@angular/platform-browser/animations",
"@angular/material": "@angular/material", "@angular/material": "@angular/material",
"@mat-datetimepicker": "@mat-datetimepicker",
"@angular/flex-layout": "@angular/flex-layout", "@angular/flex-layout": "@angular/flex-layout",
"@alfresco/adf-core": "@alfresco/adf-core", "@alfresco/adf-core": "@alfresco/adf-core",
"@alfresco/adf-content-services": "@alfresco/adf-content-services", "@alfresco/adf-content-services": "@alfresco/adf-content-services",

View File

@ -90,7 +90,7 @@ export class ProcessInstanceDetailsComponent implements OnChanges {
} }
/** /**
* Reset the task detail to undefined * Reset the task detail
*/ */
reset() { reset() {
this.processInstanceDetails = null; this.processInstanceDetails = null;

View File

@ -27,6 +27,7 @@ import 'rxjs/add/observable/throw';
import 'rxjs/add/observable/forkJoin'; import 'rxjs/add/observable/forkJoin';
import 'rxjs/add/observable/fromPromise'; import 'rxjs/add/observable/fromPromise';
import 'rxjs/operator/switchMap'; import 'rxjs/operator/switchMap';
import 'rxjs/add/observable/from';
@Injectable() @Injectable()
export class TaskListService { export class TaskListService {

View File

@ -16,7 +16,7 @@
"noFallthroughCasesInSwitch": true, "noFallthroughCasesInSwitch": true,
"removeComments": true, "removeComments": true,
"declaration": true, "declaration": true,
"outDir": "./", "outDir": "../dist/process-services/",
"baseUrl" : "./", "baseUrl" : "./",
"paths": { "paths": {
"@alfresco/adf-process-services": ["../process-services"], "@alfresco/adf-process-services": ["../process-services"],
@ -26,7 +26,7 @@
"@angular/*": ["../node_modules/@angular/*"] "@angular/*": ["../node_modules/@angular/*"]
}, },
"lib": [ "lib": [
"es2015", "es2016",
"dom" "dom"
], ],
"suppressImplicitAnyIndexErrors": true, "suppressImplicitAnyIndexErrors": true,

View File

@ -31,7 +31,7 @@
"rxjs/*": ["./node_modules/rxjs/*"] "rxjs/*": ["./node_modules/rxjs/*"]
}, },
"lib": [ "lib": [
"es2015", "es2016",
"dom" "dom"
], ],
"suppressImplicitAnyIndexErrors": true, "suppressImplicitAnyIndexErrors": true,

View File

@ -369,4 +369,28 @@ This script test that the update from 2.0.0 to 2.x.x is still smooth
```sh ```sh
./test-e2e-bc ./test-e2e-bc
```
# simulate-publish.sh
***simulate-publish.sh***
This script run a verdaccio server and simulate a publish on it
## Examples
```sh
./simulate-publish
```
# test-dist.sh
***test-dist.sh***
This script test the distribution of ADF against the demo shell
## Examples
```sh
./test-dist
``` ```

View File

@ -0,0 +1,26 @@
storage: ./.verdaccio_test_env/test-storage
uplinks:
npmjs:
url: https://registry.npmjs.org/
auth:
auth-memory:
users:
test:
name: test
password: test
logs:
- {type: stdout, format: pretty, level: trace}
packages:
'@*/*':
# scoped packages
access: $all
publish: $anonymous
proxy: npmjs
'**':
access: $all
publish: $anonymous
proxy: npmjs

23
scripts/simulate-publish.sh Executable file
View File

@ -0,0 +1,23 @@
#!/usr/bin/env bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
npm set registry https://registry.npmjs.org/
echo "====== Install verdaccio ===== "
npm install -g verdaccio
npm install -g concurrently
npm install -g verdaccio-auth-memory
echo "====== Update version ===== "
$DIR/update-version.sh -nextalpha
echo "====== Change registry ===== "
npm set registry http://localhost:4873/
echo "====== Run verdaccio ===== "
concurrently "verdaccio --listen 4873 --config $DIR/config/config-verdaccio.yaml" "$DIR/npm-publish.sh"

View File

@ -24,16 +24,16 @@ eval projects=( "@alfresco/core"
show_help() { show_help() {
echo "Usage: start.sh" echo "Usage: start.sh"
echo "" echo ""
echo "-ss or -skipstart build only the demo shell without start" echo "-ss or --skipstart build only the demo shell without start"
echo "-si or -skipinstall start the demo shell and skip the install the dependencies" echo "-si or --skipinstall start the demo shell and skip the install the dependencies"
echo "-dev or -develop start the demo shell using the relative lib folder to link the components" echo "-dev or --develop start the demo shell using the relative lib folder to link the components"
echo "-dist create the disbuild the demo shell in dist mode" echo "-dist build or start the demo shell in dist mode"
echo "-t or -test execute test" echo "-t or --test execute test"
echo "--e2e execute e2e test" echo "--e2e execute e2e test"
echo "-u or -update start the demo shell and update the dependencies" echo "-u or --update start the demo shell and update the dependencies"
echo "-c or -clean clean the demo shell and reinstall the dependencies" echo "-c or --clean clean the demo shell and reinstall the dependencies"
echo "-r or -registry to download the packages from an alternative npm registry example -registry 'http://npm.local.me:8080/' " echo "-r or --registry to download the packages from an alternative npm registry example -registry 'http://npm.local.me:8080/' "
echo "-v or -version install different version of ng2_components from npm defined in the package.json this option is not compatible with -d" echo "-v or --version install different version of ng2_components from npm defined in the package.json this option is not compatible with -d"
echo "-gitjsapi to build all the components against a commit-ish version of the JS-API" echo "-gitjsapi to build all the components against a commit-ish version of the JS-API"
echo "-vjsapi install different version from npm of JS-API defined in the package.json" echo "-vjsapi install different version from npm of JS-API defined in the package.json"
} }

44
scripts/test-dist.sh Executable file
View File

@ -0,0 +1,44 @@
#!/usr/bin/env bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
echo "====== Install demo-shell ===== "
cd $DIR/../demo-shell
npm install
echo "====== Install lib ===== "
cd $DIR/../lib
npm install
echo "====== Install JS-API alpha ===== "
npm install alfresco-js-api@alpha
echo "====== Build ADF ===== "
npm run new-build
echo "====== COPY new build in demo shell node_modules ===== "
rm -rf ../demo-shell/node_modules/@alfresco
mkdir -p $DIR/../demo-shell/node_modules/@alfresco/adf-core
mkdir -p $DIR/../demo-shell/node_modules/@alfresco/adf-content-services
mkdir -p $DIR/../demo-shell/node_modules/@alfresco/adf-process-services
mkdir -p $DIR/../demo-shell/node_modules/@alfresco/adf-insights
cp -R $DIR/../lib/dist/core/* $DIR/../demo-shell/node_modules/@alfresco/adf-core
cp -R $DIR/../lib/dist/content-services/* $DIR/../demo-shell/node_modules/@alfresco/adf-content-services
cp -R $DIR/../lib/dist/process-services/* $DIR/../demo-shell/node_modules/@alfresco/adf-process-services
cp -R $DIR/../lib/dist/insights/* $DIR/../demo-shell/node_modules/@alfresco/adf-insights
echo "====== Build dist demo shell ===== "
cd $DIR/../demo-shell
npm run build:dist
echo "====== e2e test ===== "
npm run e2e