Skip to content

Commit

Permalink
Merge pull request #3206 from Alfresco/development
Browse files Browse the repository at this point in the history
2.3.0
  • Loading branch information
eromano authored Apr 17, 2018
2 parents 99db801 + 89af790 commit afa2980
Show file tree
Hide file tree
Showing 842 changed files with 28,610 additions and 9,584 deletions.
25 changes: 23 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ node_js:

addons:
chrome: stable
before_script:
- "sudo chown root /opt/google/chrome/chrome-sandbox"
- "sudo chmod 4755 /opt/google/chrome/chrome-sandbox"

before_install:
- export CHROME_BIN=chromium-browser
Expand All @@ -26,7 +29,7 @@ install:
if ([ "$TRAVIS_BRANCH" = "master" ]); then
(./scripts/npm-build-all.sh || exit 1;);
else
(./scripts/npm-build-all.sh -vjsapi alpha || exit 1;);
(./scripts/npm-build-all.sh -vjsapi alpha -sb || exit 1;);
fi
fi

Expand All @@ -48,7 +51,7 @@ script:
fi

- if ([ "$MODULE" == "packaging" ]); then
(cd lib && npm run new-build || exit 1;);
(cd lib && npm run build || exit 1;);
fi

- if ([ "$MODULE" == "demo-shell" ]); then
Expand All @@ -58,12 +61,30 @@ script:
(./scripts/start.sh -dev -t -ss -vjsapi alpha || exit 1;);
fi
fi

jobs:
include:
- stage: Check build demo shell in production mode AND e2e
before_install:
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
script: travis_wait 30 ./scripts/test-dist.sh
- stage: Check 2.0.0 Project Update
script: ./scripts/test-e2e-bc.sh
- stage: Check ADF exports
script: cd lib && npm run test-export
- stage: Update Generator
if: tag =~ .*beta.*
script: ./scripts/update-project.sh -gnu -t $GITHUB_TOKEN -n generator-ng2-alfresco-app
- stage: Update Content app
if: tag =~ .*beta.*
script: ./scripts/update-project.sh -gnu -t $GITHUB_TOKEN -n alfresco-content-app
- stage: Update DW
if: tag =~ .*beta.*
script: ./scripts/update-project.sh -gnu -t $GITHUB_TOKEN -n adf-app-manager-ui
- stage: Update ng2-components
if: tag =~ .*beta.*
script: ./scripts/update-project.sh -gnu -t $GITHUB_TOKEN -n alfresco-ng2-components

# jobs:
# include:
Expand Down
1 change: 0 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
"**/.happypack": true
},
"editor.renderIndentGuides": true,
"tslint.configFile": "ng2-components/tslint.json",
"markdownlint.config": {
"MD032": false,
"MD004": false,
Expand Down
23 changes: 23 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Contributor Code of Conduct

We want to make everyone feel welcome to contribute to ADF.
We promise to respect everyone who posts issues, updates documentation,
submits pull requests, provides feedback in comments, or makes any other contribution to the project.

We expect all discussion about the project (on GitHub, social media and other channels) to be positive and constructive.
We do not accept personal attacks, trolling, public or private harassment, insults,
or other unprofessional conduct towards anyone.

We promise to show respect to all contributors regardless of their gender, gender identity,
sexual orientation, disability, age, race, ethnicity, religion, or level of experience.

We expect all contributors to understand and follow these standards
If any member of the community does not follow the code of conduct,
the maintainers will do whatever they consider appropriate to stop the unacceptable behavior.
This may include removing issues, comments, and PRs or blocking accounts.
Any bans may be temporary or permanent, at the maintainers’ discretion.

Contact us if you see any behavior that breaks the code of conduct, whether it is directed at you or at anyone else.
We take responsibility for making sure the code of conduct is clear and understandable,
so you should also contact us if you think there is anything that needs to be explained better.
Our contact email address is: [[email protected]](mailto:[email protected])
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM nginx
FROM nginx:alpine

COPY demo-shell/nginx.conf /etc/nginx/nginx.conf

Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,4 @@ install:
# Don't actually build.
build: off
matrix:
fast_finish: false
fast_finish: true
8 changes: 0 additions & 8 deletions demo-shell/.angular-cli.json
Original file line number Diff line number Diff line change
Expand Up @@ -149,14 +149,6 @@
{
"project": "src/tsconfig.app.json",
"exclude": "**/node_modules/**/*"
},
{
"project": "src/tsconfig.spec.json",
"exclude": "**/node_modules/**/*"
},
{
"project": "e2e/tsconfig.e2e.json",
"exclude": "**/node_modules/**/*"
}
],
"test": {
Expand Down
41 changes: 7 additions & 34 deletions demo-shell/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,44 +22,24 @@ To simplify development and reduce the time to get the application started, we h

The settings above address most common scenarios for running ACS on port 8080 and APS on port 9999 and allow you to skip the CORS configuration.

If you would like to change default proxy settings, please edit the `config/webpack.common.js` file.
If you would like to change default proxy settings, please edit the `proxy.conf.js` file.

## Application settings (server-side)

All server-side application settings are stored in the `app.config-dev.json` and `app.config-prod.json` files.
All server-side application settings are stored in the [src/app.config.json](src/app.config.json).
By default the configuration files have the content similar to the following one:

```json
{
"ecmHost": "http://localhost:3000/ecm",
"bpmHost": "http://localhost:3000/bpm",
"$schema": "../../lib/core/app-config/schema.json",
"ecmHost": "http://{hostname}:{port}",
"bpmHost": "http://{hostname}:{port}",
"application": {
"name": "Alfresco"
"name": "Alfresco ADF Application"
}
}
```

You can add any additional settings to the application configuration file if needed.

Configuration files are picked based on environment settings (see `app.module.ts` for more details).

```ts
let appConfigFile = 'app.config-dev.json';
if (process.env.ENV === 'production') {
appConfigFile = 'app.config-prod.json';
}

@NgModule({
imports: [
...
CoreModule.forRoot({
appConfigFile: appConfigFile
}),
...
]
})
```

## Development build

```sh
Expand All @@ -85,17 +65,10 @@ This command builds project in `production` mode.
All output is placed to `dist` folder and can be served to your preferred web server.
You should need no additional files outside the `dist` folder.

### Important notes

By default demo application is configured to use [wsrv](https://www.npmjs.com/package/wsrv) tool (lightweight web server)
to serve production build output. It will be running at `0.0.0.0` address with port `3000` and allow you to access your application
via network. However, you can use any web server of your choice in production.

## Development branch build

If you want to run the demo shell with the latest changes from the development branch, use the following command from the /script folder:

```sh
./npm-clean.sh
./start-linked.sh -install
npm run start:dev
```
16 changes: 8 additions & 8 deletions demo-shell/e2e/app.e2e-spec.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { MyappPage } from './app.po';

describe('myapp App', () => {
let page: MyappPage;
let page: MyappPage;

beforeEach(() => {
page = new MyappPage();
});
beforeEach(() => {
page = new MyappPage();
});

it('should display message saying app works', () => {
page.navigateTo();
expect(page.getParagraphText()).toEqual('app works!');
});
it('should display toolbar', () => {
page.navigateTo();
expect(page.getToolbar()).toBeDefined();
});
});
12 changes: 6 additions & 6 deletions demo-shell/e2e/app.po.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { browser, element, by } from 'protractor';

export class MyappPage {
navigateTo() {
return browser.get('/');
}
navigateTo() {
return browser.get('/');
}

getParagraphText() {
return element(by.css('app-root h1')).getText();
}
getToolbar() {
return element(by.tagName('adf-toolbar'));
}
}
34 changes: 16 additions & 18 deletions demo-shell/package.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,26 @@
{
"name": "Alfresco-ADF-Angular-Demo",
"description": "Demo shell for Alfresco Angular components",
"version": "2.2.0",
"version": "2.3.0",
"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\" \"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",
"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: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",
"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 --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 --host 0.0.0.0 --disable-host-check --app dist --proxy-config proxy.conf.js -open",
"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: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",
"copy:dev": "node ./config/dev-copy-watch.js",
"test": "ng test",
"test": " ng test --single-run",
"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": "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",
"webpack": "node node_modules/webpack/bin/webpack.js"
},
Expand Down Expand Up @@ -63,10 +62,10 @@
],
"private": true,
"dependencies": {
"@alfresco/adf-content-services": "2.2.0",
"@alfresco/adf-core": "2.2.0",
"@alfresco/adf-insights": "2.2.0",
"@alfresco/adf-process-services": "2.2.0",
"@alfresco/adf-content-services": "2.3.0",
"@alfresco/adf-core": "2.3.0",
"@alfresco/adf-insights": "2.3.0",
"@alfresco/adf-process-services": "2.3.0",
"@angular/animations": "5.1.1",
"@angular/cdk": "5.0.1",
"@angular/common": "5.1.1",
Expand All @@ -79,10 +78,10 @@
"@angular/platform-browser": "5.1.1",
"@angular/platform-browser-dynamic": "5.1.1",
"@angular/router": "5.1.1",
"@mat-datetimepicker/core": "^1.0.1",
"@mat-datetimepicker/moment": "^1.0.1",
"@mat-datetimepicker/core": "1.0.4",
"@mat-datetimepicker/moment": "1.0.4",
"@ngx-translate/core": "9.1.1",
"alfresco-js-api": "2.2.0",
"alfresco-js-api": "2.3.0",
"chart.js": "2.5.0",
"classlist.js": "1.1.20150312",
"core-js": "2.4.1",
Expand All @@ -101,7 +100,6 @@
"zone.js": "0.8.14"
},
"devDependencies": {
"@angular-devkit/core": "0.0.28",
"@angular/cli": "1.6.5",
"@angular/compiler-cli": "^5.2.0",
"@angular/language-service": "^5.2.0",
Expand Down
Loading

0 comments on commit afa2980

Please sign in to comment.