diff --git a/.gitignore b/.gitignore
index d2eb351acc..e427910ca0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -13,3 +13,4 @@ src/environments/
/ng2-components/ng2-example-webpack/
/ng2-components/config/coverage/
*.npmrc
+/demo-shell-ng2/ng2-components/
diff --git a/.travis.yml b/.travis.yml
index 6dfa73d91f..5fa7fadaf3 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -13,17 +13,26 @@ env:
- MODULE=ng2-components
- MODULE=ng2-demo-shell
+install:
+ - if ([ "$MODULE" == "ng2-components" ]); then
+ if ([ "$TRAVIS_BRANCH" = "master" ]); then
+ (./scripts/npm-build-all.sh || exit 1;);
+ else
+ (./scripts/npm-build-all.sh -gitjsapi development || exit 1;);
+ fi
+ fi
+
script:
- - if ([ "$MODULE" == "ng2-components" ]); then
- if ([ "$TRAVIS_BRANCH" = "master" ]); then
- (./scripts/npm-build-all.sh -t || exit 1;);
- else
- (./scripts/npm-build-all.sh -t -gitjsapi development|| exit 1;);
- fi
- fi
- - if ([ "$MODULE" == "ng2-demo-shell" ]); then
- (cd demo-shell-ng2 && npm install && npm run test || exit 1;);
- fi
+ - if ([ "$MODULE" == "ng2-components" ]); then
+ (./scripts/npm-build-all.sh -si -sb -t || exit 1;);
+ fi
+ - if ([ "$MODULE" == "ng2-demo-shell" ]); then
+ if ([ "$TRAVIS_BRANCH" = "master" ]); then
+ (./scripts/start.sh -t -ss || exit 1;);
+ else
+ (./scripts/start.sh -dev -t -ss -gitjsapi development || exit 1;);
+ fi
+ fi
# Send coverage data to Coveralls
after_success:
diff --git a/appveyor.yml b/appveyor.yml
index 2ffd0d6662..e67a197745 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -23,7 +23,12 @@ install:
else
(cd scripts && sh npm-build-all.sh -t -gitjsapi development|| exit 1)
)
- - if %COMPONENT_NAME% EQU ng2-demo-shell (cd demo-shell-ng2 && npm install && npm run test || exit 1)
+ - if %COMPONENT_NAME% EQU g2-demo-shell (
+ if %APPVEYOR_REPO_BRANCH EQU master
+ (cd scripts && sh start.sh -t -ss || exit 1)
+ else
+ (cd scripts && sh start.sh -d -t -ss -gitjsapi development|| exit 1)
+ )
# Don't actually build.
build: off
diff --git a/demo-shell-ng2/.gitignore b/demo-shell-ng2/.gitignore
index 5cb7530c4a..67093b31a5 100644
--- a/demo-shell-ng2/.gitignore
+++ b/demo-shell-ng2/.gitignore
@@ -1,8 +1,11 @@
typings/
node_modules/
bower_components/
+ng2-components/
app/**/*.js
app/**/*.js.map
+app/**/*.d.ts
+
!app/js/Polyline.js
.idea
versions.json
diff --git a/demo-shell-ng2/app/components/activiti/activiti-demo.component.html b/demo-shell-ng2/app/components/activiti/activiti-demo.component.html
index 943a2cacdc..9162e56a70 100644
--- a/demo-shell-ng2/app/components/activiti/activiti-demo.component.html
+++ b/demo-shell-ng2/app/components/activiti/activiti-demo.component.html
@@ -72,10 +72,10 @@
Attachments
-
-
+
+
+
+
diff --git a/demo-shell-ng2/config/karma.conf.js b/demo-shell-ng2/config/karma.conf.js
index ae013cbe5e..c7bf96fe26 100644
--- a/demo-shell-ng2/config/karma.conf.js
+++ b/demo-shell-ng2/config/karma.conf.js
@@ -7,6 +7,8 @@ module.exports = function (config) {
frameworks: ['jasmine'],
files: [
+ './node_modules/hammerjs/hammer.js',
+
{ pattern: './config/karma-test-shim.js', watched: false }
],
diff --git a/demo-shell-ng2/config/webpack.common.js b/demo-shell-ng2/config/webpack.common.js
index 4c2374ddb9..02e4627a26 100644
--- a/demo-shell-ng2/config/webpack.common.js
+++ b/demo-shell-ng2/config/webpack.common.js
@@ -63,7 +63,7 @@ module.exports = {
},
{
test: /\.ts$/,
- include: [helpers.root('app')],
+ include: [helpers.root('app'), helpers.root('../ng2-components')],
loader: [
'ts-loader',
'angular2-template-loader'
@@ -77,7 +77,7 @@ module.exports = {
},
{
test: /\.css$/,
- exclude: helpers.root('app'),
+ exclude: [helpers.root('app'), helpers.root('../ng2-components')],
loader: ExtractTextPlugin.extract({
fallback: 'style-loader',
use: 'css-loader?sourceMap'
@@ -85,7 +85,7 @@ module.exports = {
},
{
test: /\.css$/,
- include: helpers.root('app'),
+ include: [helpers.root('app'), helpers.root('../ng2-components')],
loader: 'raw-loader'
},
{
@@ -157,6 +157,15 @@ module.exports = {
})
],
+ devServer: {
+ contentBase: helpers.root('dist'),
+ compress: true,
+ port: 3000,
+ historyApiFallback: true,
+ host: '0.0.0.0',
+ inline: true
+ },
+
node: {
fs: 'empty'
}
diff --git a/demo-shell-ng2/config/webpack.dev.js b/demo-shell-ng2/config/webpack.dev.js
index a0192ecaed..9b3824a5af 100644
--- a/demo-shell-ng2/config/webpack.dev.js
+++ b/demo-shell-ng2/config/webpack.dev.js
@@ -1,15 +1,13 @@
+const webpack = require('webpack');
const webpackMerge = require('webpack-merge');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const commonConfig = require('./webpack.common.js');
const helpers = require('./helpers');
+const path = require('path');
module.exports = webpackMerge(commonConfig, {
- devtool: 'cheap-module-eval-source-map',
- resolve: {
- extensions: ['.ts', '.js'],
- modules: [helpers.root('../ng2-components'), helpers.root('node_modules')]
- },
+ devtool: 'cheap-module-eval-source-map',
output: {
path: helpers.root('dist'),
@@ -17,16 +15,38 @@ module.exports = webpackMerge(commonConfig, {
chunkFilename: '[id].chunk.js'
},
- plugins: [
- new ExtractTextPlugin('[name].css')
- ],
+ resolve: {
+ alias: {
+ "ng2-alfresco-core$": path.resolve(__dirname, '../../ng2-components/ng2-alfresco-core/index.ts'),
+ "ng2-alfresco-datatable$": path.resolve(__dirname, '../../ng2-components/ng2-alfresco-datatable/index.ts'),
+ "ng2-activiti-form/stencils/runtime.ng1$": path.resolve(__dirname, '../../ng2-components/ng2-activiti-form/stencils/runtime.ng1'),
+ "ng2-activiti-form/stencils/runtime.adf$": path.resolve(__dirname, '../../ng2-components/ng2-activiti-form/stencils/runtime.adf'),
+ "ng2-activiti-diagrams$": path.resolve(__dirname, '../../ng2-components/ng2-activiti-diagrams/index.ts'),
+ "ng2-activiti-analytics$": path.resolve(__dirname, '../../ng2-components/ng2-activiti-analytics/index.ts'),
+ "ng2-activiti-form$": path.resolve(__dirname, '../../ng2-components/ng2-activiti-form/index.ts'),
+ "ng2-activiti-tasklist$": path.resolve(__dirname, '../../ng2-components/ng2-activiti-tasklist/index.ts'),
+ "ng2-activiti-processlist$": path.resolve(__dirname, '../../ng2-components/ng2-activiti-processlist/index.ts'),
+ "ng2-alfresco-documentlist$": path.resolve(__dirname, '../../ng2-components/ng2-alfresco-documentlist/index.ts'),
+ "ng2-alfresco-login$": path.resolve(__dirname, '../../ng2-components/ng2-alfresco-login/index.ts'),
+ "ng2-alfresco-search$": path.resolve(__dirname, '../../ng2-components/ng2-alfresco-search/index.ts'),
+ "ng2-alfresco-social$": path.resolve(__dirname, '../../ng2-components/ng2-alfresco-social/index.ts'),
+ "ng2-alfresco-tag$": path.resolve(__dirname, '../../ng2-components/ng2-alfresco-tag/index.ts'),
+ "ng2-alfresco-upload$": path.resolve(__dirname, '../../ng2-components/ng2-alfresco-upload/index.ts'),
+ "ng2-alfresco-viewer$": path.resolve(__dirname, '../../ng2-components/ng2-alfresco-viewer/index.ts'),
+ "ng2-alfresco-webscript$": path.resolve(__dirname, '../../ng2-components/ng2-alfresco-webscript/index.ts'),
+ "ng2-alfresco-userinfo$": path.resolve(__dirname, '../../ng2-components/ng2-alfresco-userinfo/index.ts')
+ },
+ extensions: ['.ts', '.js'],
+ modules: [path.resolve(__dirname, '../node_modules')]
+ },
- devServer: {
- contentBase: helpers.root('dist'),
- compress: true,
- port: 3000,
- historyApiFallback: true,
- host: '0.0.0.0',
- inline: true
- }
+ plugins: [
+ new webpack.NoEmitOnErrorsPlugin(),
+ new ExtractTextPlugin('[name].[hash].css'),
+ new webpack.LoaderOptionsPlugin({
+ htmlLoader: {
+ minimize: false // workaround for ng2
+ }
+ })
+ ]
});
diff --git a/demo-shell-ng2/config/webpack.prod.js b/demo-shell-ng2/config/webpack.prod.js
index d39bcc9dc8..d2a903ea77 100644
--- a/demo-shell-ng2/config/webpack.prod.js
+++ b/demo-shell-ng2/config/webpack.prod.js
@@ -7,6 +7,7 @@ const helpers = require('./helpers');
const ENV = process.env.NODE_ENV = process.env.ENV = 'production';
module.exports = webpackMerge(commonConfig, {
+
devtool: 'source-map',
output: {
@@ -21,6 +22,19 @@ module.exports = webpackMerge(commonConfig, {
modules: [helpers.root('node_modules')]
},
+ module: {
+ rules: [
+ {
+ test: /\.ts$/,
+ loader: [
+ 'ts-loader',
+ 'angular2-template-loader'
+ ],
+ exclude: [ /node_modules/, /public/, /resources/, /dist/]
+ }
+ ]
+ },
+
plugins: [
new webpack.NoEmitOnErrorsPlugin(),
new webpack.optimize.UglifyJsPlugin({ // https://github.com/angular/angular/issues/10618
diff --git a/demo-shell-ng2/config/webpack.test.js b/demo-shell-ng2/config/webpack.test.js
index 1da37cd34d..c03156628c 100644
--- a/demo-shell-ng2/config/webpack.test.js
+++ b/demo-shell-ng2/config/webpack.test.js
@@ -2,6 +2,7 @@ const webpack = require('webpack');
const helpers = require('./helpers');
module.exports = {
+
devtool: 'inline-source-map',
resolve: {
diff --git a/demo-shell-ng2/package.json b/demo-shell-ng2/package.json
index 420281958a..caf1ae5aae 100644
--- a/demo-shell-ng2/package.json
+++ b/demo-shell-ng2/package.json
@@ -4,16 +4,17 @@
"version": "1.4.0",
"author": "Alfresco Software, Ltd.",
"scripts": {
- "build": "rimraf dist && webpack --config config/webpack.prod.js --progress --profile --bail",
- "build:dev": "rimraf dist && webpack --config config/webpack.dev.js --progress --profile --bail",
- "start:dist": "wsrv -s dist/ -p 3000 -a 0.0.0.0",
- "start": "npm run server-versions && npm run webpack-dev-server --progress -config config/webpack.prod.js --content-base ./",
- "start:dev": "npm run server-versions && npm run webpack-dev-server --progress -config config/webpack.dev.js --content-base ./",
+ "build": "rimraf dist && npm run webpack -- --config config/webpack.prod.js --progress --profile --bail",
+ "build:dev": "rimraf dist && npm run webpack -- --config config/webpack.dev.js --progress --profile --bail",
+ "start:dist": "npm run server-versions && wsrv -s dist/ -p 3000 -a 0.0.0.0",
+ "start": "npm run server-versions && npm run webpack-dev-server -- --config config/webpack.prod.js --progress --content-base app/",
+ "start:dev": "npm run server-versions && npm run webpack-dev-server -- --config config/webpack.dev.js --progress --content-base app/",
"test": "rimraf coverage && karma start --single-run",
"clean": "npm run clean-build && rimraf dist node_modules typings dist",
"clean-build": "rimraf 'app/{,**/}**.js' 'app/{,**/}**.js.map' 'app/{,**/}**.d.ts'",
"server-versions": "rimraf versions.json && npm list --depth=0 --json=true --prod=true > versions.json || exit 0",
"webpack-dev-server": "node --max_old_space_size=4096 node_modules/webpack-dev-server/bin/webpack-dev-server.js",
+ "webpack": "node node_modules/webpack/bin/webpack.js",
"aws": "node app.js"
},
"repository": {
@@ -63,13 +64,11 @@
"@angular/platform-browser-dynamic": "~4.0.0",
"@angular/router": "~4.0.0",
"@angular/compiler-cli": "~4.0.0",
-
"@angular/material": "2.0.0-beta.1",
"core-js": "2.4.1",
"reflect-metadata": "0.1.9",
"rxjs": "5.1.0",
"zone.js": "0.8.4",
-
"dialog-polyfill": "^0.4.7",
"material-design-icons": "2.2.3",
"material-design-lite": "1.2.1",
@@ -83,7 +82,6 @@
"md-date-time-picker": "2.2.0",
"element.scrollintoviewifneeded-polyfill": "^1.0.1",
"ng2-3d-editor": "0.0.15",
-
"alfresco-js-api": "~1.4.0",
"ng2-activiti-analytics": "1.4.0",
"ng2-activiti-diagrams": "1.4.0",
@@ -103,8 +101,9 @@
"ng2-alfresco-webscript": "1.4.0"
},
"devDependencies": {
- "@types/jasmine": "2.5.41",
- "@types/node": "^7.0.5",
+ "@types/hammerjs": "^2.0.34",
+ "@types/jasmine": "2.5.35",
+ "@types/node": "6.0.45",
"angular2-template-loader": "^0.6.2",
"copy-webpack-plugin": "^4.0.1",
"css-loader": "0.26.1",
@@ -114,8 +113,8 @@
"html-webpack-plugin": "^2.28.0",
"jasmine-core": "^2.5.2",
"karma": "^1.4.1",
- "karma-coverage": "^1.1.1",
"karma-chrome-launcher": "2.0.0",
+ "karma-coverage": "^1.1.1",
"karma-jasmine": "^1.1.0",
"karma-jasmine-ajax": "0.1.13",
"karma-jasmine-html-reporter": "0.2.0",
@@ -124,13 +123,13 @@
"karma-sourcemap-loader": "^0.3.7",
"karma-webpack": "^2.0.2",
"null-loader": "^0.1.1",
- "to-string-loader": "^1.1.4",
"raw-loader": "^0.5.1",
"rimraf": "^2.5.4",
"script-loader": "0.7.0",
"source-map-loader": "^0.1.6",
"sourcemap-istanbul-instrumenter-loader": "^0.2.0",
"style-loader": "0.13.1",
+ "to-string-loader": "^1.1.4",
"ts-loader": "^2.0.0",
"tslint": "^4.4.2",
"tslint-loader": "^3.3.0",
diff --git a/demo-shell-ng2/tsconfig.json b/demo-shell-ng2/tsconfig.json
index da9e50181f..875b81f937 100644
--- a/demo-shell-ng2/tsconfig.json
+++ b/demo-shell-ng2/tsconfig.json
@@ -6,15 +6,33 @@
"sourceMap": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
- "lib": [ "es2015", "dom" ],
- "noImplicitAny": false,
- "suppressImplicitAnyIndexErrors": true,
"skipLibCheck": true,
- "declaration": true
+ "noLib": false,
+ "allowUnreachableCode": false,
+ "allowUnusedLabels": false,
+ "noImplicitAny": false,
+ "noImplicitReturns": false,
+ "noImplicitUseStrict": false,
+ "noFallthroughCasesInSwitch": true,
+ "removeComments": true,
+ "declaration": true,
+ "outDir": "./dist",
+ "lib": [
+ "es2015",
+ "dom"
+ ],
+ "typeRoots": [
+ "./node_modules/@types"
+ ],
+ "suppressImplicitAnyIndexErrors": true
},
"exclude": [
+ "demo",
"node_modules",
- "dist",
- "demo"
- ]
+ "dist"
+ ],
+ "angularCompilerOptions": {
+ "strictMetadataEmit": false,
+ "skipTemplateCodegen": true
+ }
}
diff --git a/ng2-components/config/webpack.common.js b/ng2-components/config/webpack.common.js
index 95cd33177e..67fd8b9440 100644
--- a/ng2-components/config/webpack.common.js
+++ b/ng2-components/config/webpack.common.js
@@ -5,6 +5,8 @@ const path = require('path');
module.exports = {
+ devtool: 'cheap-module-source-map',
+
resolveLoader: {
alias: {
"file-multi-loader": path.resolve(__dirname, "./custom-loaders/file-loader-multi"),
@@ -55,7 +57,12 @@ module.exports = {
},
{
test: /\.ts$/,
- use: ['ts-loader', 'angular2-template-loader'],
+ use: ['ts-loader?' + JSON.stringify({
+ "compilerOptions": {
+ "typeRoots": [
+ "../node_modules/@types"
+ ]}
+ }), 'angular2-template-loader'],
exclude: [/node_modules/, /bundles/, /dist/, /demo/]
},
{
@@ -67,7 +74,7 @@ module.exports = {
test: /\.css$/,
loader: ['to-string-loader', 'css-loader'],
exclude: [/node_modules/, /bundles/, /dist/, /demo/]
- },{
+ }, {
enforce: 'pre',
test: /\.ts$/,
loader: 'license-check',
@@ -75,7 +82,7 @@ module.exports = {
emitErrors: true,
licenseFile: path.resolve(__dirname, './assets/license_header.txt')
},
- exclude: [/node_modules/, /bundles/, /dist/, /demo/, /rendering-queue.services.ts/ ],
+ exclude: [/node_modules/, /bundles/, /dist/, /demo/, /rendering-queue.services.ts/],
},
{
test: /\.(png|jpe?g|gif|svg|woff|woff2|ttf|eot|ico)$/,
@@ -96,11 +103,26 @@ module.exports = {
},
resolve: {
+ alias: {
+ "ng2-alfresco-core": path.resolve(__dirname, '../ng2-alfresco-core/index.ts'),
+ "ng2-alfresco-datatable": path.resolve(__dirname, '../ng2-alfresco-datatable/index.ts'),
+ "ng2-activiti-diagrams": path.resolve(__dirname, '../ng2-activiti-diagrams/index.ts'),
+ "ng2-activiti-analytics":path.resolve(__dirname, '../ng2-activiti-analytics/index.ts'),
+ "ng2-activiti-form":path.resolve(__dirname, '../ng2-activiti-form/index.ts'),
+ "ng2-activiti-tasklist": path.resolve(__dirname, '../ng2-activiti-tasklist/index.ts'),
+ "ng2-activiti-processlist": path.resolve(__dirname, '../ng2-activiti-processlist/index.ts'),
+ "ng2-alfresco-documentlist": path.resolve(__dirname, '../ng2-alfresco-documentlist/index.ts'),
+ "ng2-alfresco-login": path.resolve(__dirname, '../ng2-alfresco-login/index.ts'),
+ "ng2-alfresco-search": path.resolve(__dirname, '../ng2-alfresco-search/index.ts'),
+ "ng2-alfresco-social": path.resolve(__dirname, '../ng2-alfresco-social/index.ts'),
+ "ng2-alfresco-tag": path.resolve(__dirname, '../ng2-alfresco-tag/index.ts'),
+ "ng2-alfresco-upload": path.resolve(__dirname, '../ng2-alfresco-upload/index.ts'),
+ "ng2-alfresco-viewer": path.resolve(__dirname, '../ng2-alfresco-viewer/index.ts'),
+ "ng2-alfresco-webscript": path.resolve(__dirname, '../ng2-alfresco-webscript/index.ts'),
+ "ng2-alfresco-userinfo": path.resolve(__dirname, '../ng2-alfresco-userinfo/index.ts')
+ },
extensions: ['.ts', '.js'],
- symlinks: false,
- modules: [
- '../ng2-components', 'node_modules'
- ]
+ modules: [helpers.root('node_modules')]
},
plugins: [
@@ -115,8 +137,6 @@ module.exports = {
)
],
- devtool: 'cheap-module-source-map',
-
node: {
fs: 'empty',
module: false
diff --git a/ng2-components/config/webpack.test.js b/ng2-components/config/webpack.test.js
index 486fed8c15..b446f486c7 100644
--- a/ng2-components/config/webpack.test.js
+++ b/ng2-components/config/webpack.test.js
@@ -7,12 +7,6 @@ module.exports = {
devtool: 'inline-source-map',
- resolve: {
- extensions: ['.ts', '.js'],
- symlinks: false,
- modules: [helpers.root('../ng2-components'), helpers.root('node_modules')]
- },
-
module: {
rules: [
{
@@ -58,6 +52,12 @@ module.exports = {
]
},
+ resolve: {
+ extensions: ['.ts', '.js'],
+ symlinks: false,
+ modules: [helpers.root('../ng2-components'), helpers.root('node_modules')]
+ },
+
plugins: [
new webpack.NoEmitOnErrorsPlugin(),
diff --git a/ng2-components/ng2-activiti-analytics/karma.conf.js b/ng2-components/ng2-activiti-analytics/karma.conf.js
index 9001db1c10..8c0e83bd7e 100644
--- a/ng2-components/ng2-activiti-analytics/karma.conf.js
+++ b/ng2-components/ng2-activiti-analytics/karma.conf.js
@@ -24,8 +24,6 @@ module.exports = function (config) {
{pattern: 'karma-test-shim.js', watched: false},
{pattern: './src/assets/**/*.*', included: false, served: true, watched: false},
{pattern: './src/i18n/**/*.*', included: false, served: true, watched: false},
- {pattern: './dist/**/*.js', included: false, served: true, watched: false},
- {pattern: './dist/**/*.js.map', included: false, served: true, watched: false},
{pattern: './src/**/*.ts', included: false, served: true, watched: false}
],
diff --git a/ng2-components/ng2-activiti-analytics/tsconfig.json b/ng2-components/ng2-activiti-analytics/tsconfig.json
index 156810e6af..ba1ef9cea2 100644
--- a/ng2-components/ng2-activiti-analytics/tsconfig.json
+++ b/ng2-components/ng2-activiti-analytics/tsconfig.json
@@ -17,12 +17,32 @@
"removeComments": true,
"declaration": true,
"outDir": "./dist",
+ "baseUrl" : "./",
+ "paths": {
+ "ng2-alfresco-core": ["../ng2-alfresco-core/"],
+ "ng2-alfresco-datatable": ["../ng2-alfresco-datatable/"],
+ "ng2-activiti-diagrams": ["../ng2-activiti-diagrams/"],
+ "ng2-activiti-analytics":["../ng2-activiti-analytics/"],
+ "ng2-activiti-form":["../ng2-activiti-form/"],
+ "ng2-activiti-tasklist": ["../ng2-activiti-tasklist/"],
+ "ng2-activiti-processlist": ["../ng2-activiti-processlist/"],
+ "ng2-alfresco-documentlist": ["../ng2-alfresco-documentlist/"],
+ "ng2-alfresco-login": ["../ng2-alfresco-login/"],
+ "ng2-alfresco-search": ["../ng2-alfresco-search/"],
+ "ng2-alfresco-social": ["../ng2-alfresco-social/"],
+ "ng2-alfresco-tag": ["../ng2-alfresco-tag/"],
+ "ng2-alfresco-upload": ["../ng2-alfresco-upload/"],
+ "ng2-alfresco-viewer": ["../ng2-alfresco-viewer/"],
+ "ng2-alfresco-webscript": ["../ng2-alfresco-webscript/"],
+ "ng2-alfresco-userinfo": ["../ng2-alfresco-userinfo"],
+ "alfresco-js-api": ["../node_modules/alfresco-js-api/"]
+ },
"lib": [
"es2015",
"dom"
],
"typeRoots": [
- "../node_modules/@types"
+ "./node_modules/@types"
],
"suppressImplicitAnyIndexErrors": true
},
diff --git a/ng2-components/ng2-activiti-diagrams/karma.conf.js b/ng2-components/ng2-activiti-diagrams/karma.conf.js
index 9001db1c10..8c0e83bd7e 100644
--- a/ng2-components/ng2-activiti-diagrams/karma.conf.js
+++ b/ng2-components/ng2-activiti-diagrams/karma.conf.js
@@ -24,8 +24,6 @@ module.exports = function (config) {
{pattern: 'karma-test-shim.js', watched: false},
{pattern: './src/assets/**/*.*', included: false, served: true, watched: false},
{pattern: './src/i18n/**/*.*', included: false, served: true, watched: false},
- {pattern: './dist/**/*.js', included: false, served: true, watched: false},
- {pattern: './dist/**/*.js.map', included: false, served: true, watched: false},
{pattern: './src/**/*.ts', included: false, served: true, watched: false}
],
diff --git a/ng2-components/ng2-activiti-diagrams/tsconfig.json b/ng2-components/ng2-activiti-diagrams/tsconfig.json
index 156810e6af..ba1ef9cea2 100644
--- a/ng2-components/ng2-activiti-diagrams/tsconfig.json
+++ b/ng2-components/ng2-activiti-diagrams/tsconfig.json
@@ -17,12 +17,32 @@
"removeComments": true,
"declaration": true,
"outDir": "./dist",
+ "baseUrl" : "./",
+ "paths": {
+ "ng2-alfresco-core": ["../ng2-alfresco-core/"],
+ "ng2-alfresco-datatable": ["../ng2-alfresco-datatable/"],
+ "ng2-activiti-diagrams": ["../ng2-activiti-diagrams/"],
+ "ng2-activiti-analytics":["../ng2-activiti-analytics/"],
+ "ng2-activiti-form":["../ng2-activiti-form/"],
+ "ng2-activiti-tasklist": ["../ng2-activiti-tasklist/"],
+ "ng2-activiti-processlist": ["../ng2-activiti-processlist/"],
+ "ng2-alfresco-documentlist": ["../ng2-alfresco-documentlist/"],
+ "ng2-alfresco-login": ["../ng2-alfresco-login/"],
+ "ng2-alfresco-search": ["../ng2-alfresco-search/"],
+ "ng2-alfresco-social": ["../ng2-alfresco-social/"],
+ "ng2-alfresco-tag": ["../ng2-alfresco-tag/"],
+ "ng2-alfresco-upload": ["../ng2-alfresco-upload/"],
+ "ng2-alfresco-viewer": ["../ng2-alfresco-viewer/"],
+ "ng2-alfresco-webscript": ["../ng2-alfresco-webscript/"],
+ "ng2-alfresco-userinfo": ["../ng2-alfresco-userinfo"],
+ "alfresco-js-api": ["../node_modules/alfresco-js-api/"]
+ },
"lib": [
"es2015",
"dom"
],
"typeRoots": [
- "../node_modules/@types"
+ "./node_modules/@types"
],
"suppressImplicitAnyIndexErrors": true
},
diff --git a/ng2-components/ng2-activiti-form/karma.conf.js b/ng2-components/ng2-activiti-form/karma.conf.js
index 9001db1c10..8c0e83bd7e 100644
--- a/ng2-components/ng2-activiti-form/karma.conf.js
+++ b/ng2-components/ng2-activiti-form/karma.conf.js
@@ -24,8 +24,6 @@ module.exports = function (config) {
{pattern: 'karma-test-shim.js', watched: false},
{pattern: './src/assets/**/*.*', included: false, served: true, watched: false},
{pattern: './src/i18n/**/*.*', included: false, served: true, watched: false},
- {pattern: './dist/**/*.js', included: false, served: true, watched: false},
- {pattern: './dist/**/*.js.map', included: false, served: true, watched: false},
{pattern: './src/**/*.ts', included: false, served: true, watched: false}
],
diff --git a/ng2-components/ng2-activiti-form/tsconfig.json b/ng2-components/ng2-activiti-form/tsconfig.json
index 156810e6af..ba1ef9cea2 100644
--- a/ng2-components/ng2-activiti-form/tsconfig.json
+++ b/ng2-components/ng2-activiti-form/tsconfig.json
@@ -17,12 +17,32 @@
"removeComments": true,
"declaration": true,
"outDir": "./dist",
+ "baseUrl" : "./",
+ "paths": {
+ "ng2-alfresco-core": ["../ng2-alfresco-core/"],
+ "ng2-alfresco-datatable": ["../ng2-alfresco-datatable/"],
+ "ng2-activiti-diagrams": ["../ng2-activiti-diagrams/"],
+ "ng2-activiti-analytics":["../ng2-activiti-analytics/"],
+ "ng2-activiti-form":["../ng2-activiti-form/"],
+ "ng2-activiti-tasklist": ["../ng2-activiti-tasklist/"],
+ "ng2-activiti-processlist": ["../ng2-activiti-processlist/"],
+ "ng2-alfresco-documentlist": ["../ng2-alfresco-documentlist/"],
+ "ng2-alfresco-login": ["../ng2-alfresco-login/"],
+ "ng2-alfresco-search": ["../ng2-alfresco-search/"],
+ "ng2-alfresco-social": ["../ng2-alfresco-social/"],
+ "ng2-alfresco-tag": ["../ng2-alfresco-tag/"],
+ "ng2-alfresco-upload": ["../ng2-alfresco-upload/"],
+ "ng2-alfresco-viewer": ["../ng2-alfresco-viewer/"],
+ "ng2-alfresco-webscript": ["../ng2-alfresco-webscript/"],
+ "ng2-alfresco-userinfo": ["../ng2-alfresco-userinfo"],
+ "alfresco-js-api": ["../node_modules/alfresco-js-api/"]
+ },
"lib": [
"es2015",
"dom"
],
"typeRoots": [
- "../node_modules/@types"
+ "./node_modules/@types"
],
"suppressImplicitAnyIndexErrors": true
},
diff --git a/ng2-components/ng2-activiti-processlist/karma.conf.js b/ng2-components/ng2-activiti-processlist/karma.conf.js
index 9001db1c10..8c0e83bd7e 100644
--- a/ng2-components/ng2-activiti-processlist/karma.conf.js
+++ b/ng2-components/ng2-activiti-processlist/karma.conf.js
@@ -24,8 +24,6 @@ module.exports = function (config) {
{pattern: 'karma-test-shim.js', watched: false},
{pattern: './src/assets/**/*.*', included: false, served: true, watched: false},
{pattern: './src/i18n/**/*.*', included: false, served: true, watched: false},
- {pattern: './dist/**/*.js', included: false, served: true, watched: false},
- {pattern: './dist/**/*.js.map', included: false, served: true, watched: false},
{pattern: './src/**/*.ts', included: false, served: true, watched: false}
],
diff --git a/ng2-components/ng2-activiti-processlist/tsconfig.json b/ng2-components/ng2-activiti-processlist/tsconfig.json
index 156810e6af..ba1ef9cea2 100644
--- a/ng2-components/ng2-activiti-processlist/tsconfig.json
+++ b/ng2-components/ng2-activiti-processlist/tsconfig.json
@@ -17,12 +17,32 @@
"removeComments": true,
"declaration": true,
"outDir": "./dist",
+ "baseUrl" : "./",
+ "paths": {
+ "ng2-alfresco-core": ["../ng2-alfresco-core/"],
+ "ng2-alfresco-datatable": ["../ng2-alfresco-datatable/"],
+ "ng2-activiti-diagrams": ["../ng2-activiti-diagrams/"],
+ "ng2-activiti-analytics":["../ng2-activiti-analytics/"],
+ "ng2-activiti-form":["../ng2-activiti-form/"],
+ "ng2-activiti-tasklist": ["../ng2-activiti-tasklist/"],
+ "ng2-activiti-processlist": ["../ng2-activiti-processlist/"],
+ "ng2-alfresco-documentlist": ["../ng2-alfresco-documentlist/"],
+ "ng2-alfresco-login": ["../ng2-alfresco-login/"],
+ "ng2-alfresco-search": ["../ng2-alfresco-search/"],
+ "ng2-alfresco-social": ["../ng2-alfresco-social/"],
+ "ng2-alfresco-tag": ["../ng2-alfresco-tag/"],
+ "ng2-alfresco-upload": ["../ng2-alfresco-upload/"],
+ "ng2-alfresco-viewer": ["../ng2-alfresco-viewer/"],
+ "ng2-alfresco-webscript": ["../ng2-alfresco-webscript/"],
+ "ng2-alfresco-userinfo": ["../ng2-alfresco-userinfo"],
+ "alfresco-js-api": ["../node_modules/alfresco-js-api/"]
+ },
"lib": [
"es2015",
"dom"
],
"typeRoots": [
- "../node_modules/@types"
+ "./node_modules/@types"
],
"suppressImplicitAnyIndexErrors": true
},
diff --git a/ng2-components/ng2-activiti-tasklist/karma.conf.js b/ng2-components/ng2-activiti-tasklist/karma.conf.js
index 9001db1c10..8c0e83bd7e 100644
--- a/ng2-components/ng2-activiti-tasklist/karma.conf.js
+++ b/ng2-components/ng2-activiti-tasklist/karma.conf.js
@@ -24,8 +24,6 @@ module.exports = function (config) {
{pattern: 'karma-test-shim.js', watched: false},
{pattern: './src/assets/**/*.*', included: false, served: true, watched: false},
{pattern: './src/i18n/**/*.*', included: false, served: true, watched: false},
- {pattern: './dist/**/*.js', included: false, served: true, watched: false},
- {pattern: './dist/**/*.js.map', included: false, served: true, watched: false},
{pattern: './src/**/*.ts', included: false, served: true, watched: false}
],
diff --git a/ng2-components/ng2-activiti-tasklist/tsconfig.json b/ng2-components/ng2-activiti-tasklist/tsconfig.json
index 156810e6af..ba1ef9cea2 100644
--- a/ng2-components/ng2-activiti-tasklist/tsconfig.json
+++ b/ng2-components/ng2-activiti-tasklist/tsconfig.json
@@ -17,12 +17,32 @@
"removeComments": true,
"declaration": true,
"outDir": "./dist",
+ "baseUrl" : "./",
+ "paths": {
+ "ng2-alfresco-core": ["../ng2-alfresco-core/"],
+ "ng2-alfresco-datatable": ["../ng2-alfresco-datatable/"],
+ "ng2-activiti-diagrams": ["../ng2-activiti-diagrams/"],
+ "ng2-activiti-analytics":["../ng2-activiti-analytics/"],
+ "ng2-activiti-form":["../ng2-activiti-form/"],
+ "ng2-activiti-tasklist": ["../ng2-activiti-tasklist/"],
+ "ng2-activiti-processlist": ["../ng2-activiti-processlist/"],
+ "ng2-alfresco-documentlist": ["../ng2-alfresco-documentlist/"],
+ "ng2-alfresco-login": ["../ng2-alfresco-login/"],
+ "ng2-alfresco-search": ["../ng2-alfresco-search/"],
+ "ng2-alfresco-social": ["../ng2-alfresco-social/"],
+ "ng2-alfresco-tag": ["../ng2-alfresco-tag/"],
+ "ng2-alfresco-upload": ["../ng2-alfresco-upload/"],
+ "ng2-alfresco-viewer": ["../ng2-alfresco-viewer/"],
+ "ng2-alfresco-webscript": ["../ng2-alfresco-webscript/"],
+ "ng2-alfresco-userinfo": ["../ng2-alfresco-userinfo"],
+ "alfresco-js-api": ["../node_modules/alfresco-js-api/"]
+ },
"lib": [
"es2015",
"dom"
],
"typeRoots": [
- "../node_modules/@types"
+ "./node_modules/@types"
],
"suppressImplicitAnyIndexErrors": true
},
diff --git a/ng2-components/ng2-alfresco-core/karma.conf.js b/ng2-components/ng2-alfresco-core/karma.conf.js
index 9001db1c10..8c0e83bd7e 100644
--- a/ng2-components/ng2-alfresco-core/karma.conf.js
+++ b/ng2-components/ng2-alfresco-core/karma.conf.js
@@ -24,8 +24,6 @@ module.exports = function (config) {
{pattern: 'karma-test-shim.js', watched: false},
{pattern: './src/assets/**/*.*', included: false, served: true, watched: false},
{pattern: './src/i18n/**/*.*', included: false, served: true, watched: false},
- {pattern: './dist/**/*.js', included: false, served: true, watched: false},
- {pattern: './dist/**/*.js.map', included: false, served: true, watched: false},
{pattern: './src/**/*.ts', included: false, served: true, watched: false}
],
diff --git a/ng2-components/ng2-alfresco-core/package.json b/ng2-components/ng2-alfresco-core/package.json
index 10649392d9..7f08e15059 100644
--- a/ng2-components/ng2-alfresco-core/package.json
+++ b/ng2-components/ng2-alfresco-core/package.json
@@ -5,6 +5,7 @@
"author": "Alfresco Software, Ltd.",
"scripts": {
"clean": "rimraf dist node_modules typings bundles coverage .npmrc",
+ "rimraf": "rimraf",
"build": "webpack --config webpack.build.js --progress --profile --bail",
"test": "karma start karma.conf.js --reporters mocha,coverage --single-run --component",
"test-browser": "karma start karma.conf.js --reporters kjhtml --component",
diff --git a/ng2-components/ng2-alfresco-core/tsconfig.json b/ng2-components/ng2-alfresco-core/tsconfig.json
index 156810e6af..ba1ef9cea2 100644
--- a/ng2-components/ng2-alfresco-core/tsconfig.json
+++ b/ng2-components/ng2-alfresco-core/tsconfig.json
@@ -17,12 +17,32 @@
"removeComments": true,
"declaration": true,
"outDir": "./dist",
+ "baseUrl" : "./",
+ "paths": {
+ "ng2-alfresco-core": ["../ng2-alfresco-core/"],
+ "ng2-alfresco-datatable": ["../ng2-alfresco-datatable/"],
+ "ng2-activiti-diagrams": ["../ng2-activiti-diagrams/"],
+ "ng2-activiti-analytics":["../ng2-activiti-analytics/"],
+ "ng2-activiti-form":["../ng2-activiti-form/"],
+ "ng2-activiti-tasklist": ["../ng2-activiti-tasklist/"],
+ "ng2-activiti-processlist": ["../ng2-activiti-processlist/"],
+ "ng2-alfresco-documentlist": ["../ng2-alfresco-documentlist/"],
+ "ng2-alfresco-login": ["../ng2-alfresco-login/"],
+ "ng2-alfresco-search": ["../ng2-alfresco-search/"],
+ "ng2-alfresco-social": ["../ng2-alfresco-social/"],
+ "ng2-alfresco-tag": ["../ng2-alfresco-tag/"],
+ "ng2-alfresco-upload": ["../ng2-alfresco-upload/"],
+ "ng2-alfresco-viewer": ["../ng2-alfresco-viewer/"],
+ "ng2-alfresco-webscript": ["../ng2-alfresco-webscript/"],
+ "ng2-alfresco-userinfo": ["../ng2-alfresco-userinfo"],
+ "alfresco-js-api": ["../node_modules/alfresco-js-api/"]
+ },
"lib": [
"es2015",
"dom"
],
"typeRoots": [
- "../node_modules/@types"
+ "./node_modules/@types"
],
"suppressImplicitAnyIndexErrors": true
},
diff --git a/ng2-components/ng2-alfresco-datatable/karma.conf.js b/ng2-components/ng2-alfresco-datatable/karma.conf.js
index 9001db1c10..8c0e83bd7e 100644
--- a/ng2-components/ng2-alfresco-datatable/karma.conf.js
+++ b/ng2-components/ng2-alfresco-datatable/karma.conf.js
@@ -24,8 +24,6 @@ module.exports = function (config) {
{pattern: 'karma-test-shim.js', watched: false},
{pattern: './src/assets/**/*.*', included: false, served: true, watched: false},
{pattern: './src/i18n/**/*.*', included: false, served: true, watched: false},
- {pattern: './dist/**/*.js', included: false, served: true, watched: false},
- {pattern: './dist/**/*.js.map', included: false, served: true, watched: false},
{pattern: './src/**/*.ts', included: false, served: true, watched: false}
],
diff --git a/ng2-components/ng2-alfresco-datatable/tsconfig.json b/ng2-components/ng2-alfresco-datatable/tsconfig.json
index 156810e6af..ba1ef9cea2 100644
--- a/ng2-components/ng2-alfresco-datatable/tsconfig.json
+++ b/ng2-components/ng2-alfresco-datatable/tsconfig.json
@@ -17,12 +17,32 @@
"removeComments": true,
"declaration": true,
"outDir": "./dist",
+ "baseUrl" : "./",
+ "paths": {
+ "ng2-alfresco-core": ["../ng2-alfresco-core/"],
+ "ng2-alfresco-datatable": ["../ng2-alfresco-datatable/"],
+ "ng2-activiti-diagrams": ["../ng2-activiti-diagrams/"],
+ "ng2-activiti-analytics":["../ng2-activiti-analytics/"],
+ "ng2-activiti-form":["../ng2-activiti-form/"],
+ "ng2-activiti-tasklist": ["../ng2-activiti-tasklist/"],
+ "ng2-activiti-processlist": ["../ng2-activiti-processlist/"],
+ "ng2-alfresco-documentlist": ["../ng2-alfresco-documentlist/"],
+ "ng2-alfresco-login": ["../ng2-alfresco-login/"],
+ "ng2-alfresco-search": ["../ng2-alfresco-search/"],
+ "ng2-alfresco-social": ["../ng2-alfresco-social/"],
+ "ng2-alfresco-tag": ["../ng2-alfresco-tag/"],
+ "ng2-alfresco-upload": ["../ng2-alfresco-upload/"],
+ "ng2-alfresco-viewer": ["../ng2-alfresco-viewer/"],
+ "ng2-alfresco-webscript": ["../ng2-alfresco-webscript/"],
+ "ng2-alfresco-userinfo": ["../ng2-alfresco-userinfo"],
+ "alfresco-js-api": ["../node_modules/alfresco-js-api/"]
+ },
"lib": [
"es2015",
"dom"
],
"typeRoots": [
- "../node_modules/@types"
+ "./node_modules/@types"
],
"suppressImplicitAnyIndexErrors": true
},
diff --git a/ng2-components/ng2-alfresco-documentlist/karma.conf.js b/ng2-components/ng2-alfresco-documentlist/karma.conf.js
index 9001db1c10..8c0e83bd7e 100644
--- a/ng2-components/ng2-alfresco-documentlist/karma.conf.js
+++ b/ng2-components/ng2-alfresco-documentlist/karma.conf.js
@@ -24,8 +24,6 @@ module.exports = function (config) {
{pattern: 'karma-test-shim.js', watched: false},
{pattern: './src/assets/**/*.*', included: false, served: true, watched: false},
{pattern: './src/i18n/**/*.*', included: false, served: true, watched: false},
- {pattern: './dist/**/*.js', included: false, served: true, watched: false},
- {pattern: './dist/**/*.js.map', included: false, served: true, watched: false},
{pattern: './src/**/*.ts', included: false, served: true, watched: false}
],
diff --git a/ng2-components/ng2-alfresco-documentlist/tsconfig.json b/ng2-components/ng2-alfresco-documentlist/tsconfig.json
index 156810e6af..ba1ef9cea2 100644
--- a/ng2-components/ng2-alfresco-documentlist/tsconfig.json
+++ b/ng2-components/ng2-alfresco-documentlist/tsconfig.json
@@ -17,12 +17,32 @@
"removeComments": true,
"declaration": true,
"outDir": "./dist",
+ "baseUrl" : "./",
+ "paths": {
+ "ng2-alfresco-core": ["../ng2-alfresco-core/"],
+ "ng2-alfresco-datatable": ["../ng2-alfresco-datatable/"],
+ "ng2-activiti-diagrams": ["../ng2-activiti-diagrams/"],
+ "ng2-activiti-analytics":["../ng2-activiti-analytics/"],
+ "ng2-activiti-form":["../ng2-activiti-form/"],
+ "ng2-activiti-tasklist": ["../ng2-activiti-tasklist/"],
+ "ng2-activiti-processlist": ["../ng2-activiti-processlist/"],
+ "ng2-alfresco-documentlist": ["../ng2-alfresco-documentlist/"],
+ "ng2-alfresco-login": ["../ng2-alfresco-login/"],
+ "ng2-alfresco-search": ["../ng2-alfresco-search/"],
+ "ng2-alfresco-social": ["../ng2-alfresco-social/"],
+ "ng2-alfresco-tag": ["../ng2-alfresco-tag/"],
+ "ng2-alfresco-upload": ["../ng2-alfresco-upload/"],
+ "ng2-alfresco-viewer": ["../ng2-alfresco-viewer/"],
+ "ng2-alfresco-webscript": ["../ng2-alfresco-webscript/"],
+ "ng2-alfresco-userinfo": ["../ng2-alfresco-userinfo"],
+ "alfresco-js-api": ["../node_modules/alfresco-js-api/"]
+ },
"lib": [
"es2015",
"dom"
],
"typeRoots": [
- "../node_modules/@types"
+ "./node_modules/@types"
],
"suppressImplicitAnyIndexErrors": true
},
diff --git a/ng2-components/ng2-alfresco-login/karma.conf.js b/ng2-components/ng2-alfresco-login/karma.conf.js
index 9001db1c10..8c0e83bd7e 100644
--- a/ng2-components/ng2-alfresco-login/karma.conf.js
+++ b/ng2-components/ng2-alfresco-login/karma.conf.js
@@ -24,8 +24,6 @@ module.exports = function (config) {
{pattern: 'karma-test-shim.js', watched: false},
{pattern: './src/assets/**/*.*', included: false, served: true, watched: false},
{pattern: './src/i18n/**/*.*', included: false, served: true, watched: false},
- {pattern: './dist/**/*.js', included: false, served: true, watched: false},
- {pattern: './dist/**/*.js.map', included: false, served: true, watched: false},
{pattern: './src/**/*.ts', included: false, served: true, watched: false}
],
diff --git a/ng2-components/ng2-alfresco-login/tsconfig.json b/ng2-components/ng2-alfresco-login/tsconfig.json
index 156810e6af..ba1ef9cea2 100644
--- a/ng2-components/ng2-alfresco-login/tsconfig.json
+++ b/ng2-components/ng2-alfresco-login/tsconfig.json
@@ -17,12 +17,32 @@
"removeComments": true,
"declaration": true,
"outDir": "./dist",
+ "baseUrl" : "./",
+ "paths": {
+ "ng2-alfresco-core": ["../ng2-alfresco-core/"],
+ "ng2-alfresco-datatable": ["../ng2-alfresco-datatable/"],
+ "ng2-activiti-diagrams": ["../ng2-activiti-diagrams/"],
+ "ng2-activiti-analytics":["../ng2-activiti-analytics/"],
+ "ng2-activiti-form":["../ng2-activiti-form/"],
+ "ng2-activiti-tasklist": ["../ng2-activiti-tasklist/"],
+ "ng2-activiti-processlist": ["../ng2-activiti-processlist/"],
+ "ng2-alfresco-documentlist": ["../ng2-alfresco-documentlist/"],
+ "ng2-alfresco-login": ["../ng2-alfresco-login/"],
+ "ng2-alfresco-search": ["../ng2-alfresco-search/"],
+ "ng2-alfresco-social": ["../ng2-alfresco-social/"],
+ "ng2-alfresco-tag": ["../ng2-alfresco-tag/"],
+ "ng2-alfresco-upload": ["../ng2-alfresco-upload/"],
+ "ng2-alfresco-viewer": ["../ng2-alfresco-viewer/"],
+ "ng2-alfresco-webscript": ["../ng2-alfresco-webscript/"],
+ "ng2-alfresco-userinfo": ["../ng2-alfresco-userinfo"],
+ "alfresco-js-api": ["../node_modules/alfresco-js-api/"]
+ },
"lib": [
"es2015",
"dom"
],
"typeRoots": [
- "../node_modules/@types"
+ "./node_modules/@types"
],
"suppressImplicitAnyIndexErrors": true
},
diff --git a/ng2-components/ng2-alfresco-search/karma.conf.js b/ng2-components/ng2-alfresco-search/karma.conf.js
index 9001db1c10..8c0e83bd7e 100644
--- a/ng2-components/ng2-alfresco-search/karma.conf.js
+++ b/ng2-components/ng2-alfresco-search/karma.conf.js
@@ -24,8 +24,6 @@ module.exports = function (config) {
{pattern: 'karma-test-shim.js', watched: false},
{pattern: './src/assets/**/*.*', included: false, served: true, watched: false},
{pattern: './src/i18n/**/*.*', included: false, served: true, watched: false},
- {pattern: './dist/**/*.js', included: false, served: true, watched: false},
- {pattern: './dist/**/*.js.map', included: false, served: true, watched: false},
{pattern: './src/**/*.ts', included: false, served: true, watched: false}
],
diff --git a/ng2-components/ng2-alfresco-search/tsconfig.json b/ng2-components/ng2-alfresco-search/tsconfig.json
index 156810e6af..ba1ef9cea2 100644
--- a/ng2-components/ng2-alfresco-search/tsconfig.json
+++ b/ng2-components/ng2-alfresco-search/tsconfig.json
@@ -17,12 +17,32 @@
"removeComments": true,
"declaration": true,
"outDir": "./dist",
+ "baseUrl" : "./",
+ "paths": {
+ "ng2-alfresco-core": ["../ng2-alfresco-core/"],
+ "ng2-alfresco-datatable": ["../ng2-alfresco-datatable/"],
+ "ng2-activiti-diagrams": ["../ng2-activiti-diagrams/"],
+ "ng2-activiti-analytics":["../ng2-activiti-analytics/"],
+ "ng2-activiti-form":["../ng2-activiti-form/"],
+ "ng2-activiti-tasklist": ["../ng2-activiti-tasklist/"],
+ "ng2-activiti-processlist": ["../ng2-activiti-processlist/"],
+ "ng2-alfresco-documentlist": ["../ng2-alfresco-documentlist/"],
+ "ng2-alfresco-login": ["../ng2-alfresco-login/"],
+ "ng2-alfresco-search": ["../ng2-alfresco-search/"],
+ "ng2-alfresco-social": ["../ng2-alfresco-social/"],
+ "ng2-alfresco-tag": ["../ng2-alfresco-tag/"],
+ "ng2-alfresco-upload": ["../ng2-alfresco-upload/"],
+ "ng2-alfresco-viewer": ["../ng2-alfresco-viewer/"],
+ "ng2-alfresco-webscript": ["../ng2-alfresco-webscript/"],
+ "ng2-alfresco-userinfo": ["../ng2-alfresco-userinfo"],
+ "alfresco-js-api": ["../node_modules/alfresco-js-api/"]
+ },
"lib": [
"es2015",
"dom"
],
"typeRoots": [
- "../node_modules/@types"
+ "./node_modules/@types"
],
"suppressImplicitAnyIndexErrors": true
},
diff --git a/ng2-components/ng2-alfresco-social/karma.conf.js b/ng2-components/ng2-alfresco-social/karma.conf.js
index 9001db1c10..8c0e83bd7e 100644
--- a/ng2-components/ng2-alfresco-social/karma.conf.js
+++ b/ng2-components/ng2-alfresco-social/karma.conf.js
@@ -24,8 +24,6 @@ module.exports = function (config) {
{pattern: 'karma-test-shim.js', watched: false},
{pattern: './src/assets/**/*.*', included: false, served: true, watched: false},
{pattern: './src/i18n/**/*.*', included: false, served: true, watched: false},
- {pattern: './dist/**/*.js', included: false, served: true, watched: false},
- {pattern: './dist/**/*.js.map', included: false, served: true, watched: false},
{pattern: './src/**/*.ts', included: false, served: true, watched: false}
],
diff --git a/ng2-components/ng2-alfresco-social/tsconfig.json b/ng2-components/ng2-alfresco-social/tsconfig.json
index 156810e6af..ba1ef9cea2 100644
--- a/ng2-components/ng2-alfresco-social/tsconfig.json
+++ b/ng2-components/ng2-alfresco-social/tsconfig.json
@@ -17,12 +17,32 @@
"removeComments": true,
"declaration": true,
"outDir": "./dist",
+ "baseUrl" : "./",
+ "paths": {
+ "ng2-alfresco-core": ["../ng2-alfresco-core/"],
+ "ng2-alfresco-datatable": ["../ng2-alfresco-datatable/"],
+ "ng2-activiti-diagrams": ["../ng2-activiti-diagrams/"],
+ "ng2-activiti-analytics":["../ng2-activiti-analytics/"],
+ "ng2-activiti-form":["../ng2-activiti-form/"],
+ "ng2-activiti-tasklist": ["../ng2-activiti-tasklist/"],
+ "ng2-activiti-processlist": ["../ng2-activiti-processlist/"],
+ "ng2-alfresco-documentlist": ["../ng2-alfresco-documentlist/"],
+ "ng2-alfresco-login": ["../ng2-alfresco-login/"],
+ "ng2-alfresco-search": ["../ng2-alfresco-search/"],
+ "ng2-alfresco-social": ["../ng2-alfresco-social/"],
+ "ng2-alfresco-tag": ["../ng2-alfresco-tag/"],
+ "ng2-alfresco-upload": ["../ng2-alfresco-upload/"],
+ "ng2-alfresco-viewer": ["../ng2-alfresco-viewer/"],
+ "ng2-alfresco-webscript": ["../ng2-alfresco-webscript/"],
+ "ng2-alfresco-userinfo": ["../ng2-alfresco-userinfo"],
+ "alfresco-js-api": ["../node_modules/alfresco-js-api/"]
+ },
"lib": [
"es2015",
"dom"
],
"typeRoots": [
- "../node_modules/@types"
+ "./node_modules/@types"
],
"suppressImplicitAnyIndexErrors": true
},
diff --git a/ng2-components/ng2-alfresco-tag/karma.conf.js b/ng2-components/ng2-alfresco-tag/karma.conf.js
index 9001db1c10..8c0e83bd7e 100644
--- a/ng2-components/ng2-alfresco-tag/karma.conf.js
+++ b/ng2-components/ng2-alfresco-tag/karma.conf.js
@@ -24,8 +24,6 @@ module.exports = function (config) {
{pattern: 'karma-test-shim.js', watched: false},
{pattern: './src/assets/**/*.*', included: false, served: true, watched: false},
{pattern: './src/i18n/**/*.*', included: false, served: true, watched: false},
- {pattern: './dist/**/*.js', included: false, served: true, watched: false},
- {pattern: './dist/**/*.js.map', included: false, served: true, watched: false},
{pattern: './src/**/*.ts', included: false, served: true, watched: false}
],
diff --git a/ng2-components/ng2-alfresco-tag/tsconfig.json b/ng2-components/ng2-alfresco-tag/tsconfig.json
index 156810e6af..ba1ef9cea2 100644
--- a/ng2-components/ng2-alfresco-tag/tsconfig.json
+++ b/ng2-components/ng2-alfresco-tag/tsconfig.json
@@ -17,12 +17,32 @@
"removeComments": true,
"declaration": true,
"outDir": "./dist",
+ "baseUrl" : "./",
+ "paths": {
+ "ng2-alfresco-core": ["../ng2-alfresco-core/"],
+ "ng2-alfresco-datatable": ["../ng2-alfresco-datatable/"],
+ "ng2-activiti-diagrams": ["../ng2-activiti-diagrams/"],
+ "ng2-activiti-analytics":["../ng2-activiti-analytics/"],
+ "ng2-activiti-form":["../ng2-activiti-form/"],
+ "ng2-activiti-tasklist": ["../ng2-activiti-tasklist/"],
+ "ng2-activiti-processlist": ["../ng2-activiti-processlist/"],
+ "ng2-alfresco-documentlist": ["../ng2-alfresco-documentlist/"],
+ "ng2-alfresco-login": ["../ng2-alfresco-login/"],
+ "ng2-alfresco-search": ["../ng2-alfresco-search/"],
+ "ng2-alfresco-social": ["../ng2-alfresco-social/"],
+ "ng2-alfresco-tag": ["../ng2-alfresco-tag/"],
+ "ng2-alfresco-upload": ["../ng2-alfresco-upload/"],
+ "ng2-alfresco-viewer": ["../ng2-alfresco-viewer/"],
+ "ng2-alfresco-webscript": ["../ng2-alfresco-webscript/"],
+ "ng2-alfresco-userinfo": ["../ng2-alfresco-userinfo"],
+ "alfresco-js-api": ["../node_modules/alfresco-js-api/"]
+ },
"lib": [
"es2015",
"dom"
],
"typeRoots": [
- "../node_modules/@types"
+ "./node_modules/@types"
],
"suppressImplicitAnyIndexErrors": true
},
diff --git a/ng2-components/ng2-alfresco-upload/karma.conf.js b/ng2-components/ng2-alfresco-upload/karma.conf.js
index 9001db1c10..8c0e83bd7e 100644
--- a/ng2-components/ng2-alfresco-upload/karma.conf.js
+++ b/ng2-components/ng2-alfresco-upload/karma.conf.js
@@ -24,8 +24,6 @@ module.exports = function (config) {
{pattern: 'karma-test-shim.js', watched: false},
{pattern: './src/assets/**/*.*', included: false, served: true, watched: false},
{pattern: './src/i18n/**/*.*', included: false, served: true, watched: false},
- {pattern: './dist/**/*.js', included: false, served: true, watched: false},
- {pattern: './dist/**/*.js.map', included: false, served: true, watched: false},
{pattern: './src/**/*.ts', included: false, served: true, watched: false}
],
diff --git a/ng2-components/ng2-alfresco-upload/tsconfig.json b/ng2-components/ng2-alfresco-upload/tsconfig.json
index 156810e6af..ba1ef9cea2 100644
--- a/ng2-components/ng2-alfresco-upload/tsconfig.json
+++ b/ng2-components/ng2-alfresco-upload/tsconfig.json
@@ -17,12 +17,32 @@
"removeComments": true,
"declaration": true,
"outDir": "./dist",
+ "baseUrl" : "./",
+ "paths": {
+ "ng2-alfresco-core": ["../ng2-alfresco-core/"],
+ "ng2-alfresco-datatable": ["../ng2-alfresco-datatable/"],
+ "ng2-activiti-diagrams": ["../ng2-activiti-diagrams/"],
+ "ng2-activiti-analytics":["../ng2-activiti-analytics/"],
+ "ng2-activiti-form":["../ng2-activiti-form/"],
+ "ng2-activiti-tasklist": ["../ng2-activiti-tasklist/"],
+ "ng2-activiti-processlist": ["../ng2-activiti-processlist/"],
+ "ng2-alfresco-documentlist": ["../ng2-alfresco-documentlist/"],
+ "ng2-alfresco-login": ["../ng2-alfresco-login/"],
+ "ng2-alfresco-search": ["../ng2-alfresco-search/"],
+ "ng2-alfresco-social": ["../ng2-alfresco-social/"],
+ "ng2-alfresco-tag": ["../ng2-alfresco-tag/"],
+ "ng2-alfresco-upload": ["../ng2-alfresco-upload/"],
+ "ng2-alfresco-viewer": ["../ng2-alfresco-viewer/"],
+ "ng2-alfresco-webscript": ["../ng2-alfresco-webscript/"],
+ "ng2-alfresco-userinfo": ["../ng2-alfresco-userinfo"],
+ "alfresco-js-api": ["../node_modules/alfresco-js-api/"]
+ },
"lib": [
"es2015",
"dom"
],
"typeRoots": [
- "../node_modules/@types"
+ "./node_modules/@types"
],
"suppressImplicitAnyIndexErrors": true
},
diff --git a/ng2-components/ng2-alfresco-userinfo/karma.conf.js b/ng2-components/ng2-alfresco-userinfo/karma.conf.js
index 9001db1c10..8c0e83bd7e 100644
--- a/ng2-components/ng2-alfresco-userinfo/karma.conf.js
+++ b/ng2-components/ng2-alfresco-userinfo/karma.conf.js
@@ -24,8 +24,6 @@ module.exports = function (config) {
{pattern: 'karma-test-shim.js', watched: false},
{pattern: './src/assets/**/*.*', included: false, served: true, watched: false},
{pattern: './src/i18n/**/*.*', included: false, served: true, watched: false},
- {pattern: './dist/**/*.js', included: false, served: true, watched: false},
- {pattern: './dist/**/*.js.map', included: false, served: true, watched: false},
{pattern: './src/**/*.ts', included: false, served: true, watched: false}
],
diff --git a/ng2-components/ng2-alfresco-userinfo/tsconfig.json b/ng2-components/ng2-alfresco-userinfo/tsconfig.json
index 156810e6af..ba1ef9cea2 100644
--- a/ng2-components/ng2-alfresco-userinfo/tsconfig.json
+++ b/ng2-components/ng2-alfresco-userinfo/tsconfig.json
@@ -17,12 +17,32 @@
"removeComments": true,
"declaration": true,
"outDir": "./dist",
+ "baseUrl" : "./",
+ "paths": {
+ "ng2-alfresco-core": ["../ng2-alfresco-core/"],
+ "ng2-alfresco-datatable": ["../ng2-alfresco-datatable/"],
+ "ng2-activiti-diagrams": ["../ng2-activiti-diagrams/"],
+ "ng2-activiti-analytics":["../ng2-activiti-analytics/"],
+ "ng2-activiti-form":["../ng2-activiti-form/"],
+ "ng2-activiti-tasklist": ["../ng2-activiti-tasklist/"],
+ "ng2-activiti-processlist": ["../ng2-activiti-processlist/"],
+ "ng2-alfresco-documentlist": ["../ng2-alfresco-documentlist/"],
+ "ng2-alfresco-login": ["../ng2-alfresco-login/"],
+ "ng2-alfresco-search": ["../ng2-alfresco-search/"],
+ "ng2-alfresco-social": ["../ng2-alfresco-social/"],
+ "ng2-alfresco-tag": ["../ng2-alfresco-tag/"],
+ "ng2-alfresco-upload": ["../ng2-alfresco-upload/"],
+ "ng2-alfresco-viewer": ["../ng2-alfresco-viewer/"],
+ "ng2-alfresco-webscript": ["../ng2-alfresco-webscript/"],
+ "ng2-alfresco-userinfo": ["../ng2-alfresco-userinfo"],
+ "alfresco-js-api": ["../node_modules/alfresco-js-api/"]
+ },
"lib": [
"es2015",
"dom"
],
"typeRoots": [
- "../node_modules/@types"
+ "./node_modules/@types"
],
"suppressImplicitAnyIndexErrors": true
},
diff --git a/ng2-components/ng2-alfresco-viewer/karma.conf.js b/ng2-components/ng2-alfresco-viewer/karma.conf.js
index f2a4bff546..349c3853d3 100644
--- a/ng2-components/ng2-alfresco-viewer/karma.conf.js
+++ b/ng2-components/ng2-alfresco-viewer/karma.conf.js
@@ -21,9 +21,14 @@ module.exports = function (config) {
{pattern: './node_modules/md-date-time-picker/**/*.js', included: false, served: true, watched: false},
{pattern: './node_modules/moment/**/*.js', included: false, served: true, watched: false},
+ // pdf-js
+ {pattern: './node_modules/pdfjs-dist/build/pdf.js', included: true, watched: false},
+ {pattern: './node_modules/pdfjs-dist/build/pdf.worker.js', included: true, watched: false},
+ {pattern: './node_modules/pdfjs-dist/web/pdf_viewer.js', included: true, watched: false},
+
{pattern: 'karma-test-shim.js', watched: false},
- {pattern: './dist/**/*.*', included: false, served: true, watched: false},
{pattern: './src/**/*.*', included: false, served: true, watched: false}
+
],
webpack: webpackConfig,
diff --git a/ng2-components/ng2-alfresco-viewer/src/components/pdfViewer.component.spec.ts b/ng2-components/ng2-alfresco-viewer/src/components/pdfViewer.component.spec.ts
index 92ab3c45a5..42ff3d4f69 100644
--- a/ng2-components/ng2-alfresco-viewer/src/components/pdfViewer.component.spec.ts
+++ b/ng2-components/ng2-alfresco-viewer/src/components/pdfViewer.component.spec.ts
@@ -185,19 +185,25 @@ describe('Test ng2-alfresco-viewer PdfViewer component', () => {
it('Total number of pages should be loaded', (done) => {
component.ngOnChanges(null).then(() => {
fixture.detectChanges();
- expect(component.totalPages).toEqual(6);
- done();
+ fixture.whenStable().then(() => {
+
+ expect(component.totalPages).toEqual(6);
+ done();
+ });
});
}, 5000);
it('right arrow should move to the next page', (done) => {
component.ngOnChanges(null).then(() => {
fixture.detectChanges();
- expect(component.displayPage).toBe(1);
- EventMock.keyDown(39);
- fixture.detectChanges();
- expect(component.displayPage).toBe(2);
- done();
+ fixture.whenStable().then(() => {
+ expect(component.displayPage).toBe(1);
+ EventMock.keyDown(39);
+ fixture.detectChanges();
+ expect(component.displayPage).toBe(2);
+ done();
+ });
+
});
}, 5000);
@@ -206,24 +212,30 @@ describe('Test ng2-alfresco-viewer PdfViewer component', () => {
component.ngOnChanges(null).then(() => {
fixture.detectChanges();
- expect(component.displayPage).toBe(1);
- nextPageButton.click();
- fixture.detectChanges();
- expect(component.displayPage).toBe(2);
- done();
+ fixture.whenStable().then(() => {
+
+ expect(component.displayPage).toBe(1);
+ nextPageButton.click();
+ fixture.detectChanges();
+ expect(component.displayPage).toBe(2);
+ done();
+ });
});
});
it('left arrow should move to the previous page', (done) => {
component.ngOnChanges(null).then(() => {
fixture.detectChanges();
- expect(component.displayPage).toBe(1);
- EventMock.keyDown(39);
- EventMock.keyDown(39);
- EventMock.keyDown(37);
- fixture.detectChanges();
- expect(component.displayPage).toBe(2);
- done();
+ fixture.whenStable().then(() => {
+
+ expect(component.displayPage).toBe(1);
+ EventMock.keyDown(39);
+ EventMock.keyDown(39);
+ EventMock.keyDown(37);
+ fixture.detectChanges();
+ expect(component.displayPage).toBe(2);
+ done();
+ });
});
});
@@ -233,35 +245,44 @@ describe('Test ng2-alfresco-viewer PdfViewer component', () => {
component.ngOnChanges(null).then(() => {
fixture.detectChanges();
- expect(component.displayPage).toBe(1);
- nextPageButton.click();
- nextPageButton.click();
- previousPageButton.click();
- fixture.detectChanges();
- expect(component.displayPage).toBe(2);
- done();
+ fixture.whenStable().then(() => {
+
+ expect(component.displayPage).toBe(1);
+ nextPageButton.click();
+ nextPageButton.click();
+ previousPageButton.click();
+ fixture.detectChanges();
+ expect(component.displayPage).toBe(2);
+ done();
+ });
});
});
it('previous page should not move to the previous page if is page 1', (done) => {
component.ngOnChanges(null).then(() => {
fixture.detectChanges();
- expect(component.displayPage).toBe(1);
- component.previousPage();
- fixture.detectChanges();
- expect(component.displayPage).toBe(1);
- done();
+ fixture.whenStable().then(() => {
+
+ expect(component.displayPage).toBe(1);
+ component.previousPage();
+ fixture.detectChanges();
+ expect(component.displayPage).toBe(1);
+ done();
+ });
});
});
it('Input page should move to the inserted page', (done) => {
component.ngOnChanges(null).then(() => {
fixture.detectChanges();
- expect(component.displayPage).toBe(1);
- component.inputPage('2');
- fixture.detectChanges();
- expect(component.displayPage).toBe(2);
- done();
+ fixture.whenStable().then(() => {
+
+ expect(component.displayPage).toBe(1);
+ component.inputPage('2');
+ fixture.detectChanges();
+ expect(component.displayPage).toBe(2);
+ done();
+ });
});
});
@@ -314,39 +335,50 @@ describe('Test ng2-alfresco-viewer PdfViewer component', () => {
});
describe('Resize interaction', () => {
+
beforeEach(() => {
component.urlFile = require('../assets/fake-test-file.pdf');
+ fixture.detectChanges();
component.inputPage('1');
});
+
it('resize event should trigger setScaleUpdatePages', (done) => {
component.ngOnChanges(null).then(() => {
fixture.detectChanges();
- spyOn(component, 'onResize');
- EventMock.resizeMobileView();
- expect(component.onResize).toHaveBeenCalled();
- done();
+ fixture.whenStable().then(() => {
+
+ spyOn(component, 'onResize');
+ EventMock.resizeMobileView();
+ expect(component.onResize).toHaveBeenCalled();
+ done();
+ });
});
});
});
describe('scroll interaction', () => {
+
beforeEach(() => {
component.urlFile = require('../assets/fake-test-file.pdf');
fixture.detectChanges();
});
+
it('scroll page should return the current page', (done) => {
component.ngOnChanges(null).then(() => {
fixture.detectChanges();
- expect(component.displayPage).toBe(1);
- component.inputPage('2');
- fixture.detectChanges();
- expect(component.displayPage).toBe(2);
- let documentContainer = element.querySelector('#viewer-pdf-container');
- documentContainer.scrollTop = 100000;
- component.watchScroll(documentContainer);
- fixture.detectChanges();
- expect(component.displayPage).toBe(6);
- done();
+ fixture.whenStable().then(() => {
+
+ expect(component.displayPage).toBe(1);
+ component.inputPage('2');
+ fixture.detectChanges();
+ expect(component.displayPage).toBe(2);
+ let documentContainer = element.querySelector('#viewer-pdf-container');
+ documentContainer.scrollTop = 100000;
+ component.watchScroll(documentContainer);
+ fixture.detectChanges();
+ expect(component.displayPage).toBe(6);
+ done();
+ });
});
});
});
diff --git a/ng2-components/ng2-alfresco-viewer/tsconfig.json b/ng2-components/ng2-alfresco-viewer/tsconfig.json
index 156810e6af..ba1ef9cea2 100644
--- a/ng2-components/ng2-alfresco-viewer/tsconfig.json
+++ b/ng2-components/ng2-alfresco-viewer/tsconfig.json
@@ -17,12 +17,32 @@
"removeComments": true,
"declaration": true,
"outDir": "./dist",
+ "baseUrl" : "./",
+ "paths": {
+ "ng2-alfresco-core": ["../ng2-alfresco-core/"],
+ "ng2-alfresco-datatable": ["../ng2-alfresco-datatable/"],
+ "ng2-activiti-diagrams": ["../ng2-activiti-diagrams/"],
+ "ng2-activiti-analytics":["../ng2-activiti-analytics/"],
+ "ng2-activiti-form":["../ng2-activiti-form/"],
+ "ng2-activiti-tasklist": ["../ng2-activiti-tasklist/"],
+ "ng2-activiti-processlist": ["../ng2-activiti-processlist/"],
+ "ng2-alfresco-documentlist": ["../ng2-alfresco-documentlist/"],
+ "ng2-alfresco-login": ["../ng2-alfresco-login/"],
+ "ng2-alfresco-search": ["../ng2-alfresco-search/"],
+ "ng2-alfresco-social": ["../ng2-alfresco-social/"],
+ "ng2-alfresco-tag": ["../ng2-alfresco-tag/"],
+ "ng2-alfresco-upload": ["../ng2-alfresco-upload/"],
+ "ng2-alfresco-viewer": ["../ng2-alfresco-viewer/"],
+ "ng2-alfresco-webscript": ["../ng2-alfresco-webscript/"],
+ "ng2-alfresco-userinfo": ["../ng2-alfresco-userinfo"],
+ "alfresco-js-api": ["../node_modules/alfresco-js-api/"]
+ },
"lib": [
"es2015",
"dom"
],
"typeRoots": [
- "../node_modules/@types"
+ "./node_modules/@types"
],
"suppressImplicitAnyIndexErrors": true
},
diff --git a/ng2-components/ng2-alfresco-webscript/karma.conf.js b/ng2-components/ng2-alfresco-webscript/karma.conf.js
index 9001db1c10..8c0e83bd7e 100644
--- a/ng2-components/ng2-alfresco-webscript/karma.conf.js
+++ b/ng2-components/ng2-alfresco-webscript/karma.conf.js
@@ -24,8 +24,6 @@ module.exports = function (config) {
{pattern: 'karma-test-shim.js', watched: false},
{pattern: './src/assets/**/*.*', included: false, served: true, watched: false},
{pattern: './src/i18n/**/*.*', included: false, served: true, watched: false},
- {pattern: './dist/**/*.js', included: false, served: true, watched: false},
- {pattern: './dist/**/*.js.map', included: false, served: true, watched: false},
{pattern: './src/**/*.ts', included: false, served: true, watched: false}
],
diff --git a/ng2-components/ng2-alfresco-webscript/tsconfig.json b/ng2-components/ng2-alfresco-webscript/tsconfig.json
index 156810e6af..875b81f937 100644
--- a/ng2-components/ng2-alfresco-webscript/tsconfig.json
+++ b/ng2-components/ng2-alfresco-webscript/tsconfig.json
@@ -22,7 +22,7 @@
"dom"
],
"typeRoots": [
- "../node_modules/@types"
+ "./node_modules/@types"
],
"suppressImplicitAnyIndexErrors": true
},
diff --git a/ng2-components/package-base.json b/ng2-components/package-base.json
index 50bb86ead2..6db34dfdc1 100644
--- a/ng2-components/package-base.json
+++ b/ng2-components/package-base.json
@@ -7,8 +7,8 @@
"clean": "rimraf node_modules",
"build": "webpack --config config/webpack.build.js --progress --profile --bail",
"pkg-build": "package-json-merge ng2-alfresco-core/package.json ng2-alfresco-datatable/package.json ng2-activiti-diagrams/package.json ng2-activiti-analytics/package.json ng2-activiti-form/package.json ng2-activiti-tasklist/package.json ng2-activiti-processlist/package.json ng2-alfresco-documentlist/package.json ng2-alfresco-login/package.json ng2-alfresco-search/package.json ng2-alfresco-tag/package.json ng2-alfresco-upload/package.json ng2-alfresco-viewer/package.json ng2-alfresco-webscript/package.json ng2-alfresco-webscript/package.json ng2-alfresco-userinfo/package.json ng2-alfresco-social/package.json package-base.json > package.json",
- "test": "karma start --reporters mocha,coverage --single-run",
- "test-browser": "karma start karma.conf.js --reporters kjhtml",
+ "test": "node node_modules/karma/bin/karma start --reporters mocha,coverage --single-run --component .",
+ "test-browser": "node node_modules/karma/bin/karma start karma.conf.js --reporters kjhtml",
"tslint": "",
"prepublish": "",
"tsc": "",
diff --git a/ng2-components/package.json b/ng2-components/package.json
index 86142a1e7a..ee2f3adc7b 100644
--- a/ng2-components/package.json
+++ b/ng2-components/package.json
@@ -5,12 +5,12 @@
"author": "Alfresco Software, Ltd.",
"scripts": {
"clean": "rimraf node_modules",
+ "rimraf": "rimraf",
"build": "webpack --config config/webpack.build.js --progress --profile --bail",
- "test": "karma start --reporters mocha,coverage --single-run",
- "test-browser": "karma start karma.conf.js --reporters kjhtml",
+ "test": "node node_modules/karma/bin/karma start --reporters mocha,coverage --single-run --component .",
+ "test-browser": "node node_modules/karma/bin/karma start karma.conf.js --reporters kjhtml",
"coverage": "",
"prepublish": "",
- "rimraf": "rimraf",
"pkg-build": "package-json-merge ng2-alfresco-core/package.json ng2-alfresco-datatable/package.json ng2-activiti-diagrams/package.json ng2-activiti-analytics/package.json ng2-activiti-form/package.json ng2-activiti-tasklist/package.json ng2-activiti-processlist/package.json ng2-alfresco-documentlist/package.json ng2-alfresco-login/package.json ng2-alfresco-search/package.json ng2-alfresco-tag/package.json ng2-alfresco-upload/package.json ng2-alfresco-viewer/package.json ng2-alfresco-webscript/package.json ng2-alfresco-webscript/package.json ng2-alfresco-userinfo/package.json ng2-alfresco-social/package.json package-base.json > package.json",
"tslint": "",
"tsc": "",
diff --git a/scripts/README.md b/scripts/README.md
index a6f4771596..2364589cf3 100644
--- a/scripts/README.md
+++ b/scripts/README.md
@@ -1,5 +1,12 @@
## Running a demo project
+
+- [Quick examples](#quick-examples)
+- [start.sh Demo shell script](#start.sh)
+- [Ng2 components framework alfresco build](#npm-build-all.sh)
+- [Clean components and Demo](#npm-clean.sh)
+
+
The Alfresco application development framework comes with a demo project that you can run to get a
feel for what's available.
@@ -10,22 +17,63 @@ feel for what's available.
cd scripts
```
-* Start the demo and Install all the dependencies (*Note. do it this way only the first time, and be aware, it will take some time*)
+# Quick examples if you want develop the ADF framework
+
+* Start the demo shell using the JS-API from the development branch and the local component in the ng2-components folder
```sh
-./start.sh -install or -i
+./start.sh -dev -t -gitjsapi development
```
-* Start the demo (*the standard way of starting the demo after first initialization*):
+* Build the ng2-components folder using the JS-API from the development branch
```sh
-./start.sh
+./npm-build-all.sh -gitjsapi development
+```
+
+* Build the ng2-components folder using the JS-API from the development branch and run the test on it
+
+```sh
+./npm-build-all.sh -t -gitjsapi development
+```
+
+# start.sh
+
+***start.sh*** script provide a easy way to deal with the npm command and the correct sequence to run the task on demo-shell during develop phases.
+
+## Options
+
+The default behaviour of the ***start.sh*** script always run the install and the start of the demo shell on the port 3000, anyway 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 to start it |
+| -t or --test | run the test on the demo-shell |
+| -r or --registry | Start the demo using an alternative npm registry |
+| -v or --version | Instead to use the version defined in the pacakge.json . Download from npm and Install a different version of the ng2-components (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 oly build it providing a dist folder in the relative demo-shell-ng2 folder |
+| -dev or --develop | Start the demo in development mode building the relative folder ng2-components with all the components and pointing to those components instead to the ng2-components present in the node_modules folder |
+| -dist | Start the demo shell using a light server and the files builded in the dist folder, particular useful to test the final result of the project |
+| -gitjsapi | if you want start the demo shell using an alfresco-js-api referenced by commit-ish version of the JS-API |
+| -vjsapi | Instead to 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
+
+```sh
+./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*):
```sh
-./start.sh -c -i
+./start.sh -c
```
* Start the demo using an alternative npm registry
@@ -40,7 +88,7 @@ feel for what's available.
./start.sh -update or -u
```
-* Install a different version of the ng2-components specified in the package.json his option is not compatible with -d
+* Instead to use the version defined in the pacakge.json . Download from npm and Install a different version of the ng2-components (this option is not compatible with -dev) |
```sh
./start.sh -version or -v COMPONENTS_VERSION
@@ -51,10 +99,10 @@ feel for what's available.
* Start the demo in development mode building the relative folder ng2-components with all the components and pointing to this component instead to the node_modules one
```sh
-./start.sh -develop or -d
+./start.sh -develop or -dev
```
-* Start the demo start the demo shell in dist mode
+* Start the demo shell using a light server using the files builded in the dist folder
```sh
./start.sh -dist
@@ -77,28 +125,54 @@ feel for what's available.
```
+* If you want run the Demo shell test
+
+```sh
+./start.sh -t
+
+```
+
+# npm-build-all.sh
+
+***npm-build-all.sh*** this script provide a easy way to deal with the npm command and the correct sequence to build the ng2-components
+
+## 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 | If you want run the test: |
+| -c or --clean | clean the ng2_components folders before to start from all the temp builds file as node_modules |
+| -gitjsapi | if you want start the demo shell using an alfresco-js-api referenced by commit-ish version of the JS-API |
+| -si or --skipinstall | skip the install of the node_modules |
+| -sb or --skipbuild | skip the creation of the bundles files and skip the errors and lint check inside the components |
+
+
* If you want to build all your local component:
```sh
-./npm-buid-all.sh
+./npm-build-all.sh
```
* If you want to build all your local component and run the test:
```sh
-./npm-buid-all.sh -t or -test
+./npm-build-all.sh -t or -test
```
* If you want clean the ng2-components folder node_modules before to build
```sh
-./npm-buid-all.sh -c
+./npm-build-all.sh -c
```
* If you want build to build all the components against a commit-ish version of the JS-API
```sh
- ./npm-buid-all.sh -gitjsapi commit-ish
+ ./npm-build-all.sh -gitjsapi commit-ish
./npm-build-all.sh -gitjsapi development
@@ -108,15 +182,13 @@ feel for what's available.
* If you want avoid initial build and run only all the test
```sh
-./npm-buid-all.sh -s -t
+./npm-build-all.sh -s -t
```
-* If you want test in less time (high memoery consumign less detail)
+* If you want skip initial install node_modules
```sh
-./npm-buid-all.sh -ft //test and build
-
-./npm-buid-all.sh -s -ft //only test
+./npm-build-all.sh -si
```
* If you want clean all your local component and the demo shell:
@@ -126,3 +198,15 @@ feel for what's available.
```
For development environment configuration please refer to [project docs](../demo-shell-ng2/README.md).
+
+
+# npm-clean.sh
+
+***npm-clean.sh*** clean all the projects folder : ng2-components, ng2-components/*.*/demo and demo-shell-ng2.
+
+## Options
+
+| Option | Description |
+| --- | --- |
+| -h or --help | show the help |
+| -sd or --skipDemo | skip the demo folder clean |
diff --git a/scripts/npm-build-all.sh b/scripts/npm-build-all.sh
index d78262f55e..dcb2da8f6b 100755
--- a/scripts/npm-build-all.sh
+++ b/scripts/npm-build-all.sh
@@ -5,6 +5,7 @@ eval RUN_TEST=false
eval EXEC_FAST_TEST=false
eval EXEC_CLEAN=false
eval EXEC_BUILD=true
+eval EXEC_INSTALL=true
eval EXEC_GIT_NPM_INSTALL_JSAPI=false
eval GIT_ISH=""
@@ -29,10 +30,11 @@ eval projects=( "ng2-alfresco-core"
show_help() {
echo "Usage: npm-build-all.sh"
echo ""
- echo "-e or -exclude exclude initial build"
echo "-t or -test build all your local component and run also the test on them"
- echo "-ft or -fast test build all your local component and run also the test in one single karmatestshim (high memory consuming and less details)"
echo "-c or -clean the node_modules folder before to start the build"
+ echo "-si or -skipinstall skip the install node_modules folder before to start the build"
+ echo "-sb or skip build"
+ echo "-ft or -fast test build all your local component and run also the test in one single karma-test-shim (high memory consuming and less details)"
echo "-gitjsapi to build all the components against a commit-ish version of the JS-API"
}
@@ -62,15 +64,19 @@ exclude_build(){
EXEC_BUILD=false
}
+exec_install(){
+ EXEC_INSTALL=false
+}
+
while [[ $1 == -* ]]; do
case "$1" in
-h|--help|-\?) show_help; exit 0;;
-t|--test) enable_test; shift;;
-ft|--fasttest) enable_fast_test; shift;;
-gitjsapi) enable_js_api_git_link $2; shift 2;;
- -v|--version) install_version_pacakge $2; shift 2;;
-c|--clean) clean; shift;;
- -s|--skipbuild) exclude_build; shift;;
+ -si|--skipinstall) exec_install; shift;;
+ -sb|--skipbuild) exclude_build; shift;;
-*) echo "invalid option: $1" 1>&2; show_help; exit 1;;
esac
done
@@ -87,8 +93,10 @@ echo "====== Regenerate global ng2-components package.json ====="
npm install package-json-merge
npm run pkg-build
-echo "====== Install ng2-components dependencies ====="
-npm install
+if $EXEC_INSTALL == true; then
+ echo "====== Install ng2-components dependencies ====="
+ npm install
+fi
if $EXEC_GIT_NPM_INSTALL_JSAPI == true; then
echo "====== Use the alfresco JS-API '$GIT_ISH'====="
diff --git a/scripts/npm-clean.sh b/scripts/npm-clean.sh
index 9293465cda..94327ba20a 100755
--- a/scripts/npm-clean.sh
+++ b/scripts/npm-clean.sh
@@ -2,6 +2,14 @@
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+eval EXEC_CLEAN_DEMO=true
+
+show_help() {
+ echo "Usage: npm-clean.sh"
+ echo ""
+ echo "-sd or -skipDemo skip the clean of the demo folder of any components"
+}
+
eval projects=( "ng2-activiti-diagrams"
"ng2-activiti-analytics"
"ng2-activiti-form"
@@ -20,25 +28,42 @@ eval projects=( "ng2-activiti-diagrams"
"ng2-alfresco-webscript"
"ng2-alfresco-userinfo" )
-npm install rimraf
+clea_demo() {
+ EXEC_CLEAN_DEMO=false
+}
+
+while [[ $1 == -* ]]; do
+ case "$1" in
+ -h|--help|-\?) show_help; exit 0;;
+ -sd|--skipDemo) update; shift;;
+ -*) shift;;
+ esac
+done
for PACKAGE in ${projects[@]}
do
- echo "====== clean component: ${PACKAGE} ====="
- cd "$DIR/../ng2-components/${PACKAGE}"
- npm run clean
-
- if [ -d "$DIR/../ng2-components/${PACKAGE}/demo" ]; then
- echo "====== clean component demo: ${PACKAGE} ====="
- cd "$DIR/../ng2-components/${PACKAGE}/demo"
+ echo "====== clean component: ${PACKAGE} ====="
+ cd "$DIR/../ng2-components/${PACKAGE}"
+ npm install rimraf
npm run clean
- fi
+
+ if $EXEC_CLEAN_DEMO == true; then
+ if [ -d "$DIR/../ng2-components/${PACKAGE}/demo" ]; then
+ echo "====== clean component demo: ${PACKAGE} ====="
+ cd "$DIR/../ng2-components/${PACKAGE}/demo"
+ npm install rimraf
+ npm run clean
+ fi
+ fi
done
cd "$DIR/../demo-shell-ng2"
+npm install rimraf
npm run clean
+
cd "$DIR/../ng2-components"
+npm install rimraf
npm run clean
cd ${DIR}
diff --git a/scripts/npm-publish.sh b/scripts/npm-publish.sh
index 9395024b80..ae964258a8 100755
--- a/scripts/npm-publish.sh
+++ b/scripts/npm-publish.sh
@@ -7,6 +7,8 @@ eval EXEC_CHANGE_REGISTRY=false
eval NPM_REGISTRY=false
eval TOKEN_REGISTRY=""
eval OPTIONS=""
+eval EXEC_GIT_NPM_INSTALL_JSAPI=false
+eval GIT_ISH=""
cd "$DIR/../demo-shell-ng2"
@@ -17,6 +19,7 @@ show_help() {
echo "-r or -registry to publish in an alternative npm registry -registry 'http://npm.local.me:8080/' "
echo "-token auth token for publish in the npm registry"
echo "-t or -tag to add a tag when publish a package"
+ echo "-gitjsapi to build all the components against a commit-ish version of the JS-API"
}
enable_force(){
@@ -38,6 +41,11 @@ get_token_registry(){
fi
}
+enable_js_api_git_link() {
+ GIT_ISH='git://github.com/Alfresco/alfresco-js-api.git#'$1
+ EXEC_GIT_NPM_INSTALL_JSAPI=true
+}
+
add_tag(){
eval TAG=$1
@@ -72,6 +80,7 @@ while [[ $1 == -* ]]; do
-f|--force) enable_force; shift;;
-token) get_token_registry $2; shift 2;;
-r|--registry) enable_change_registry $2; shift 2;;
+ -gitjsapi) enable_js_api_git_link $2; shift 2;;
-*) echo "invalid option: $1" 1>&2; show_help; exit 0;;
esac
done
@@ -102,6 +111,14 @@ do
npm run clean
npm install
+ if $EXEC_GIT_NPM_INSTALL_JSAPI == true; then
+ echo "====== Use the alfresco JS-API '$GIT_ISH'====="
+ npm install $GIT_ISH
+ cd "${DESTDIR}/node_modules/alfresco-js-api"
+ npm install
+ cd ${DESTDIR}
+ fi
+
if $EXEC_CHANGE_REGISTRY == true; then
change_registry
fi
diff --git a/scripts/start.sh b/scripts/start.sh
index ea6e0a84d1..c7822d4e49 100755
--- a/scripts/start.sh
+++ b/scripts/start.sh
@@ -2,14 +2,16 @@
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
-eval EXEC_INSTALL=false
+eval EXEC_INSTALL=true
eval EXEC_UPDATE=false
eval EXEC_CLEAN=false
eval EXEC_DEVELOP=false
eval EXEC_VERSION=false
-eval ENABLE_DIST=false
+eval EXEC_DIST=false
eval EXEC_GIT_NPM_INSTALL_JSAPI=false
eval EXEC_VERSION_JSAPI=false
+eval EXEC_START=true
+eval EXEC_TEST=false
eval JSAPI_VERSION=""
eval NG2_COMPONENTS_VERSION=""
eval GIT_ISH=""
@@ -35,19 +37,21 @@ eval projects=( "ng2-alfresco-core"
show_help() {
echo "Usage: start.sh"
echo ""
- echo "-d or -develop start the demo shell using the relative ng2-components folder to link the components"
- echo "-dist start the demo shell in dist mode"
- echo "-i or -install start the demo shell and install the dependencies"
+ 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 "-dev or -develop start the demo shell using the relative ng2-components folder to link the components"
+ echo "-dist create the disbuild the demo shell in dist mode"
+ echo "-t or -test execute test"
echo "-u or -update start the demo shell and update the dependencies"
- 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 "-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 "-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 "-vjsapi install different version from npm of JS-API defined in the package.json"
}
install() {
- EXEC_INSTALL=true
+ EXEC_INSTALL=false
}
update() {
@@ -59,7 +63,15 @@ develop() {
}
enable_dist() {
- ENABLE_DIST=true
+ EXEC_DIST=true
+}
+
+disable_start() {
+ EXEC_START=false
+}
+
+enable_test() {
+ EXEC_TEST=false
}
enable_js_api_git_link() {
@@ -112,12 +124,14 @@ clean() {
while [[ $1 == -* ]]; do
case "$1" in
-h|--help|-\?) show_help; exit 0;;
- -i|--install) install; shift;;
-u|--update) update; shift;;
-c|--clean) clean; shift;;
- -d|--develop) develop; shift;;
+ -t|--test) enable_test; shift;;
-r|--registry) change_registry $2; shift 2;;
- -r|--version) version_component $2; shift 2;;
+ -v|--version) version_component $2; shift 2;;
+ -si|--skipinstall) install; shift;;
+ -ss|--skipstart) disable_start; shift;;
+ -dev|--develop) develop; shift;;
-dist) enable_dist; shift;;
-gitjsapi) enable_js_api_git_link $2; shift 2;;
-vjsapi) version_js_api $2; shift 2;;
@@ -125,34 +139,28 @@ while [[ $1 == -* ]]; do
esac
done
+cd "$DIR/../demo-shell-ng2"
+
if $EXEC_CLEAN == true; then
echo "====== Clean Demo shell ====="
- cd "$DIR/../demo-shell-ng2"
npm install rimraf
npm run clean
fi
+if $EXEC_INSTALL == true; then
+ echo "====== Install Demo shell ====="
+ npm install
+fi
+
if $EXEC_DEVELOP == true; then
- echo "====== Build ng2-components folder====="
- cd "$DIR/../scripts"
- sh npm-build-all.sh
-fi
-
-if $EXEC_INSTALL == true; then
- echo "====== Install Demo shell ====="
- cd "$DIR/../demo-shell-ng2"
- npm install
-fi
-
-if $EXEC_INSTALL == true; then
- echo "====== Install Demo shell ====="
- cd "$DIR/../demo-shell-ng2"
- npm install
+ echo "====== Install node_modules ng2-components ====="
+ cd "$DIR/../ng2-components"
+ npm install
+ cd "$DIR/../demo-shell-ng2"
fi
if $EXEC_VERSION == true; then
- echo "====== Install version "${NG2_COMPONENTS_VERSION}" of ng2-components ====="
- cd "$DIR/../demo-shell-ng2"
+ echo "====== Install version "${NG2_COMPONENTS_VERSION}" of ng2-components ====="
if [[ "${EXEC_DEVELOP}" == "" ]]
then
@@ -169,46 +177,52 @@ fi
if $EXEC_GIT_NPM_INSTALL_JSAPI == true; then
echo "====== Use the alfresco JS-API '$GIT_ISH'====="
npm install $GIT_ISH
- cd "$DIR/../ng2-components/node_modules/alfresco-js-api"
- npm install
- cd "$DIR/../ng2-components/"
-fi
-
-if $EXEC_GIT_NPM_INSTALL_JSAPI == true; then
- echo "====== Use the alfresco JS-API '$GIT_ISH'====="
- npm install $GIT_ISH
- cd "$DIR/../ng2-components/node_modules/alfresco-js-api"
+ cd "$DIR/../demo-shell-ng2/node_modules/alfresco-js-api"
npm install
+ if $EXEC_DEVELOP == true; then
+ cd "$DIR/../ng2-components/"
+ npm install $GIT_ISH
+ cd "$DIR/../ng2-components/node_modules/alfresco-js-api"
+ npm install
+ fi
+ cd "$DIR/../demo-shell-ng2"
fi
if $EXEC_VERSION_JSAPI == true; then
echo "====== Use the alfresco JS-API '$JSAPI_VERSION'====="
- cd "$DIR/../demo-shell-ng2"
npm install alfresco-js-api@${JSAPI_VERSION}
+ if $EXEC_DEVELOP == true; then
+ echo "====== Install node_modules ng2-components ====="
+ cd "$DIR/../ng2-components/"
+ npm install alfresco-js-api@${JSAPI_VERSION}
+ fi
+ cd "$DIR/../demo-shell-ng2"
fi
-if $EXEC_DEVELOP == true; then
- cd "$DIR/../demo-shell-ng2"
- if $ENABLE_DIST == true; then
- echo "====== Build and start dist Demo shell ====="
- npm run build:dev
+if $EXEC_TEST == true; then
+ echo "====== Demo shell Test====="
+ npm run test
+fi
+
+if $EXEC_START == true; then
+ if $EXEC_DEVELOP == true; then
+ echo "====== Start Demo shell dev mode ====="
+ npm run start:dev
+ elif $EXEC_DIST == true; then
+ echo "====== Start Demo shell dist mode ====="
npm run start:dist
else
echo "====== Start Demo shell ====="
- npm run start:dev
+ npm run start
fi
else
- cd "$DIR/../demo-shell-ng2"
-
- if $ENABLE_DIST == true; then
- echo "====== Build and start dist Demo shell ====="
- npm run build
- npm run start:dist
- else
- echo "====== Start Demo shell dev mode====="
- npm run start
- fi
-
+ if $EXEC_DEVELOP == true; then
+ echo "====== Build Demo shell dev mode ====="
+ npm run build:dev
+ else
+ echo "====== Build Demo shell ====="
+ npm run build
+ fi
fi