* remove useless module * upgrade to angular 8 * upgrade material to v8 * upgrade adf libs * migrate demo shell to v8 * upgrade to angular 9 * upgrade material to v9 * remove hammer * upgrade nx * upgrade datetime picker * upgrade flex layout * update core api * remove entry components * code fixes * upgrade testbed usage * code fixes * remove unnecessary core-js from tests * upgrade CLI * ts config fixes * fix builds * fix testing config * compile fixes * fix demo shell dev setup * fix core tests * fix card view import * upgrade nx * disable smart builds for now * remove fdescribe * restore smart builds * fix issues * unify tsconfigs and fix newly found issues * fix configuration and cleanup package scripts * improved production build from the same config * use ADF libs directly instead of node_modules * disable smart build * single app configuration (angular) * fix core build * fix build scripts * lint fixes * fix linting setup * fix linting rules * various fixes * disable affected libs for unit tests * cleanup insights package.json * simplify smart-build * fix content tests * fix tests * test fixes * fix tests * fix test * fix tests * disable AppExtensionsModule (monaco example) * remove monaco extension module * upgrade bundle check rules * fix insights tests and karma config * fix protractor config * e2e workaround * upgrade puppeteer and split linting and build * reusable resources config * update protractor config * fix after rebase * fix protractor config * fix e2e tsconfig * update e2e setup * Save demoshell artifact on S3 and remove travis cache * Push the libs on S3 and fetch before releasing it * Add deps * Add dependencies among libs and run only affected unit test and build * fix the travis stage name * fix after renaming dev to demoshell * force the order of the projects * remove unused dependencies * fix content e2e script * exit codes fix * add extra exit codes to core e2e * postinstall hook and package cleanup * cleanup packages * remove deprecated code and dependency on router * improve bundle analyzer script * minor code fixes * update spec * fix code after rebase * upgrade protractor after rebase * fix e2e mapping lib * Update tsconfig.e2e.json * update e2e tsconfig * fix angular config * fix protractor runs * cache dist folder for libs * update material selectors for dropdowns * selector fixes * remove duplicated e2e that have unit tests already * fix login selector * fix e2e * fix test * fix import issues * fix selector * cleanup old monaco extension files * cleanup demo shell login * add protractor max retries * disable customisations of protractor * fix login validation * fix after rebase * fix after rebase, disable latest versions of libs * Hide the report tab and rollback the localstorage * rename protractor config back to js * restore lint as part of build * cleanup code * do not copy anything to node_modules on dist test * fix unit tests * config fixes * fix code * fix code after rebase * fix tests * remove existing words from spellcheck * remove useless directive decorators * update package.json after rebase * add js-api back * code fixes * add missing export * update configs * fix code * try fix the sso login test * fix * remove puppeteer unit * fix e2e script * fix * make provider easy * fix routes module before upgrade * fix unit tests * upgrade angular cli * upgrade to angular 10 Co-authored-by: maurizio vitale <maurizio.vitale@alfresco.com> Co-authored-by: Eugenio Romano <eugenio.romano@alfresco.com> Co-authored-by: Eugenio Romano <eromano@users.noreply.github.com>
Running a demo project
The Alfresco application development framework comes with a demo project that you can run to get a feel of what's available.
- Start by navigating into the app development framework source folder, and then the scripts folder:
cd alfresco-ng2-components
cd scripts
Quick examples developed with ADF
- Start the demo shell using the JS-API from the development branch and the local component in the lib folder
./start.sh -dev -gitjsapi development
- Build the lib folder using the JS-API from the development branch
./npm-build-all.sh -gitjsapi development
- Build the lib folder using the JS-API from the development branch and run the tests on it
./npm-build-all.sh -t -gitjsapi development
start.sh
start.sh script provide an easy way to deal with the npm command and the correct sequence to run the task on demo-shell during development phases.
Options
The default behaviour of the start.sh script always runs the install and the start of the demo shell on the port 3000, but with some of the options below this behaviour can be changed. All the commands before can be used in combination
Option | Description |
---|---|
-h or --help | show the help |
-u or --update | run the update of the node_modules packages on the demo shell |
-c or --clean | clean the demo shell folder before starting it |
-t or --test | run the tests on the demo-shell |
--e2e | execute e2e test |
-r or --registry | Start the demo using an alternative npm registry |
-v or --version | Use the version defined in the pacakge.json . Download from npm and Install a different version of the lib (this option is not compatible with -dev) |
-si or --skipinstall | skip the install of the node_modules |
-ss or --skipstart | skip the start of the demo shell and only build it providing a dist folder in the relative demo-shell folder |
-dev or --develop | Start the demo in development mode building the relative folder lib with all the components and pointing to those components instead of the lib present in the node_modules folder |
-dist | Start the demo shell using a light server and the files built in the dist folder, particular useful to test the final result of the project |
-gitjsapi | Start the demo shell using an alfresco-js-api referenced by commit-ish version of the JS-API |
-vjsapi | Use the version defined in the pacakge.json. Download from npm and install a different version of JS-API |
Examples
- Start the demo and install all the dependencies
./start.sh
- Start the demo, install all the dependencies, and remove the previous version of the npm packages (Note. do this only after big changes):
./start.sh -c
- Start the demo using an alternative npm registry
./start.sh -registry 'http://npm.local.me:8080/'
- Start the demo and update the dependencies:
./start.sh -update or -u
- Use instead the version defined in the pacakge.json. Download from npm and install a different version of the lib (this option is not compatible with -dev) |
./start.sh -version or -v COMPONENTS_VERSION
./start.sh -v 1.4.0
- Start the demo in development mode building the relative folder lib with all the components and pointing to this component instead of the node_modules one
./start.sh -develop or -dev
- Start the demo shell using a light server using the files built in the dist folder
./start.sh -dist
- Start the demo shell using an alfresco-js-api referenced by commit-ish version of the JS-API
./start.sh -gitjsapi commit-ish
./start.sh -gitjsapi development
./start.sh -gitjsapi de92be966e2ce7eca642ca9e9d7647ba4f849356
- Start the alfresco-js-api against a commit-ish version of the JS-API
./start.sh -vjsapi 1.4.0
- Run the Demo shell tests
./start.sh -t
npm-build-all.sh
npm-build-all.sh this script provides an easy way to deal with the npm command and the correct sequence to build the lib
Options
The default behaviour of the npm-build-all.sh install node_modules and build all the components
Option | Description |
---|---|
-h or --help | show the help |
-t or --test | Run the tests, this parameter accepts also a wildcard to execute tests for example -t "core" |
-d or --debug | Run the tests in browser, this parameter accepts also a wildcard to execute tests for example -d "core" |
-c or --clean | clean the ng2_components folders before start from all the temp builds files as node_modules |
-gitjsapi | start the demo shell using an alfresco-js-api referenced by commit-ish version of the JS-API |
-si or --skipinstall | skip the installation of the node_modules |
-sb or --skipbuild | skip the creation of the bundles files and skip the errors and lint checks inside the components |
- Build all your local components:
./npm-build-all.sh
- Build all your local components and run the tests:
./npm-build-all.sh -t
- Build all your local components and run the tests in BROWSER:
./npm-build-all.sh -d
- Build only a part of the component and run the tests only for a specific folder in BROWSER: (you can change core with, any other lib in the lib folder)
./npm-build-all.sh -si -sb -d "core"
- Clean the lib folder node_modules before build
./npm-build-all.sh -c
- Build all the components against a commit-ish version of the JS-API
./npm-build-all.sh -gitjsapi commit-ish
./npm-build-all.sh -gitjsapi development
./npm-build-all.sh -gitjsapi de92be966e2ce7eca642ca9e9d7647ba4f849356
- Skip initial build and run only all the test
./npm-build-all.sh -s -t
- Skip initial installation of node_modules
./npm-build-all.sh -si
For development environment configuration please refer to project docs.
npm-check-bundles.sh check the bundles in the package npm are present
Options
Option | Description |
---|---|
-h or --help | show the help |
-r or --registry | against which register you want to do this check |
-v or --version | the version of the components to check |
npm-add-pkg.sh
npm-add-pkg.sh check the bundles in the package npm are present
Add a package across all the pacakge json in the project
Options
Option | Description |
---|---|
-h or --help | show the help |
--save | save it in dependencies |
--save-dev | save it in dev dependencies |
- Add a package in the project
Examples
./npm-add-pkg.sh --save-dev NPM_NAME
extract-langs.sh
extract-langs.sh
Extract the i18n files from the repo and create a zip
Options
Option | Description |
---|---|
-h or --help | show the help |
--output or o | output folder otherwise will be 18n |
Examples
./extract-langs.sh
test-e2e-bc.sh
test-e2e-bc.sh
This script test that the update from 2.0.0 to 2.x.x is still smooth
Examples
./test-e2e-bc
test-e2e-bc.sh
test-e2e-bc.sh
This script test that the update from 2.0.0 to 2.x.x is still smooth
Examples
./test-e2e-bc
simulate-publish.sh
simulate-publish.sh
This script run a verdaccio server and simulate a publish on it
Examples
./simulate-publish
test-dist.sh
test-dist.sh
This script test the distribution of ADF against the demo shell
Examples
./test-dist
rancher-update.sh
rancher-update.sh
Internal script for update the rancher env
Option | Description |
---|---|
--access_key | rancher access key |
--secret_key | rancher secret key |
--url | rancher_url |
--environment_name s | ervice name to replace in rancher |
--image | image to gater and load in the service, example: docker:alfresco/demo-shell:latest |
Examples
/rancher-update.sh --access_key ACCESS_KEY --secret_key SECRET_KEY --url RANCHER_URL--environment_name adf-master --image docker:alfresco/demo-shell:master
test-e2e-lib.sh
test-e2e-lib.sh
Script to run e2e test
Option | Description |
---|---|
-u or --username | username to use |
-p or --password | password to use |
-e or --email | email user to use |
-b or --browser | browser run the test in the browsrwer (No headless mode) |
-s or --spec | spec run a single test file |
-dev or --dev | run it against local development environment it will deploy on localhost:4200 the current version of your branch |
-t or --timeout | override the timeout foe the wait utils |
-host or --host | host against to run the test |
-proxy or --proxy | proxy Back end URL to use |
Examples
./scripts/test-e2e-lib.sh -host adf.domain.com -u admin -p admin -e admin
Run on browser
./scripts/test-e2e-lib.sh -host adf.domain.com -u admin -p admin -e admin --browser
Run a single test
./scripts/test-e2e-lib.sh -host adf.domain.com -u admin -p admin -e admin --spec filenam.e2e.ts
if the test in a subfolder in e2e you need to add the subfolder in the path:
./scripts/test-e2e-lib.sh -host adf.domain.com -u admin -p admin -e admin --spec ./core/filenam.e2e.ts
Use a different backend
./scripts/test-e2e-lib.sh -host localhost:42000 -proxy adf.domain.com -u admin -p admin -e admin