relative pointing (#1879)

readme modify
start.sh and nom-build-all refactoring
change travis conf
update version of zone.js (fixes console error)
karma conf remove dist
add alias build
override tsconfig components build
This commit is contained in:
Eugenio Romano
2017-05-22 09:57:10 +01:00
committed by Eugenio Romano
parent d5f90a59f4
commit 075ee8a538
55 changed files with 815 additions and 258 deletions

1
.gitignore vendored
View File

@@ -13,3 +13,4 @@ src/environments/
/ng2-components/ng2-example-webpack/ /ng2-components/ng2-example-webpack/
/ng2-components/config/coverage/ /ng2-components/config/coverage/
*.npmrc *.npmrc
/demo-shell-ng2/ng2-components/

View File

@@ -13,17 +13,26 @@ env:
- MODULE=ng2-components - MODULE=ng2-components
- MODULE=ng2-demo-shell - 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: script:
- if ([ "$MODULE" == "ng2-components" ]); then - if ([ "$MODULE" == "ng2-components" ]); then
if ([ "$TRAVIS_BRANCH" = "master" ]); then (./scripts/npm-build-all.sh -si -sb -t || exit 1;);
(./scripts/npm-build-all.sh -t || exit 1;); fi
else - if ([ "$MODULE" == "ng2-demo-shell" ]); then
(./scripts/npm-build-all.sh -t -gitjsapi development|| exit 1;); if ([ "$TRAVIS_BRANCH" = "master" ]); then
fi (./scripts/start.sh -t -ss || exit 1;);
fi else
- if ([ "$MODULE" == "ng2-demo-shell" ]); then (./scripts/start.sh -dev -t -ss -gitjsapi development || exit 1;);
(cd demo-shell-ng2 && npm install && npm run test || exit 1;); fi
fi fi
# Send coverage data to Coveralls # Send coverage data to Coveralls
after_success: after_success:

View File

@@ -23,7 +23,12 @@ install:
else else
(cd scripts && sh npm-build-all.sh -t -gitjsapi development|| exit 1) (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. # Don't actually build.
build: off build: off

View File

@@ -1,8 +1,11 @@
typings/ typings/
node_modules/ node_modules/
bower_components/ bower_components/
ng2-components/
app/**/*.js app/**/*.js
app/**/*.js.map app/**/*.js.map
app/**/*.d.ts
!app/js/Polyline.js !app/js/Polyline.js
.idea .idea
versions.json versions.json

View File

@@ -72,10 +72,10 @@
</activiti-task-details> </activiti-task-details>
<hr> <hr>
<h5>Attachments</h5> <h5>Attachments</h5>
<adf-task-attachment-list *ngIf="currentTaskId" <!--<adf-task-attachment-list *ngIf="currentTaskId"-->
[taskId]="currentTaskId" <!--[taskId]="currentTaskId"-->
(attachmentClick)="onAttachmentClick($event)"> <!--(attachmentClick)="onAttachmentClick($event)">-->
</adf-task-attachment-list> <!--</adf-task-attachment-list>-->
</div> </div>
</div> </div>
</div> </div>

View File

@@ -7,6 +7,8 @@ module.exports = function (config) {
frameworks: ['jasmine'], frameworks: ['jasmine'],
files: [ files: [
'./node_modules/hammerjs/hammer.js',
{ pattern: './config/karma-test-shim.js', watched: false } { pattern: './config/karma-test-shim.js', watched: false }
], ],

View File

@@ -63,7 +63,7 @@ module.exports = {
}, },
{ {
test: /\.ts$/, test: /\.ts$/,
include: [helpers.root('app')], include: [helpers.root('app'), helpers.root('../ng2-components')],
loader: [ loader: [
'ts-loader', 'ts-loader',
'angular2-template-loader' 'angular2-template-loader'
@@ -77,7 +77,7 @@ module.exports = {
}, },
{ {
test: /\.css$/, test: /\.css$/,
exclude: helpers.root('app'), exclude: [helpers.root('app'), helpers.root('../ng2-components')],
loader: ExtractTextPlugin.extract({ loader: ExtractTextPlugin.extract({
fallback: 'style-loader', fallback: 'style-loader',
use: 'css-loader?sourceMap' use: 'css-loader?sourceMap'
@@ -85,7 +85,7 @@ module.exports = {
}, },
{ {
test: /\.css$/, test: /\.css$/,
include: helpers.root('app'), include: [helpers.root('app'), helpers.root('../ng2-components')],
loader: 'raw-loader' 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: { node: {
fs: 'empty' fs: 'empty'
} }

View File

@@ -1,15 +1,13 @@
const webpack = require('webpack');
const webpackMerge = require('webpack-merge'); const webpackMerge = require('webpack-merge');
const ExtractTextPlugin = require('extract-text-webpack-plugin'); const ExtractTextPlugin = require('extract-text-webpack-plugin');
const commonConfig = require('./webpack.common.js'); const commonConfig = require('./webpack.common.js');
const helpers = require('./helpers'); const helpers = require('./helpers');
const path = require('path');
module.exports = webpackMerge(commonConfig, { module.exports = webpackMerge(commonConfig, {
devtool: 'cheap-module-eval-source-map',
resolve: { devtool: 'cheap-module-eval-source-map',
extensions: ['.ts', '.js'],
modules: [helpers.root('../ng2-components'), helpers.root('node_modules')]
},
output: { output: {
path: helpers.root('dist'), path: helpers.root('dist'),
@@ -17,16 +15,38 @@ module.exports = webpackMerge(commonConfig, {
chunkFilename: '[id].chunk.js' chunkFilename: '[id].chunk.js'
}, },
plugins: [ resolve: {
new ExtractTextPlugin('[name].css') 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: { plugins: [
contentBase: helpers.root('dist'), new webpack.NoEmitOnErrorsPlugin(),
compress: true, new ExtractTextPlugin('[name].[hash].css'),
port: 3000, new webpack.LoaderOptionsPlugin({
historyApiFallback: true, htmlLoader: {
host: '0.0.0.0', minimize: false // workaround for ng2
inline: true }
} })
]
}); });

View File

@@ -7,6 +7,7 @@ const helpers = require('./helpers');
const ENV = process.env.NODE_ENV = process.env.ENV = 'production'; const ENV = process.env.NODE_ENV = process.env.ENV = 'production';
module.exports = webpackMerge(commonConfig, { module.exports = webpackMerge(commonConfig, {
devtool: 'source-map', devtool: 'source-map',
output: { output: {
@@ -21,6 +22,19 @@ module.exports = webpackMerge(commonConfig, {
modules: [helpers.root('node_modules')] modules: [helpers.root('node_modules')]
}, },
module: {
rules: [
{
test: /\.ts$/,
loader: [
'ts-loader',
'angular2-template-loader'
],
exclude: [ /node_modules/, /public/, /resources/, /dist/]
}
]
},
plugins: [ plugins: [
new webpack.NoEmitOnErrorsPlugin(), new webpack.NoEmitOnErrorsPlugin(),
new webpack.optimize.UglifyJsPlugin({ // https://github.com/angular/angular/issues/10618 new webpack.optimize.UglifyJsPlugin({ // https://github.com/angular/angular/issues/10618

View File

@@ -2,6 +2,7 @@ const webpack = require('webpack');
const helpers = require('./helpers'); const helpers = require('./helpers');
module.exports = { module.exports = {
devtool: 'inline-source-map', devtool: 'inline-source-map',
resolve: { resolve: {

View File

@@ -4,16 +4,17 @@
"version": "1.4.0", "version": "1.4.0",
"author": "Alfresco Software, Ltd.", "author": "Alfresco Software, Ltd.",
"scripts": { "scripts": {
"build": "rimraf dist && webpack --config config/webpack.prod.js --progress --profile --bail", "build": "rimraf dist && npm run webpack -- --config config/webpack.prod.js --progress --profile --bail",
"build:dev": "rimraf dist && webpack --config config/webpack.dev.js --progress --profile --bail", "build:dev": "rimraf dist && npm run webpack -- --config config/webpack.dev.js --progress --profile --bail",
"start:dist": "wsrv -s dist/ -p 3000 -a 0.0.0.0", "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 --progress -config config/webpack.prod.js --content-base ./", "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 --progress -config config/webpack.dev.js --content-base ./", "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", "test": "rimraf coverage && karma start --single-run",
"clean": "npm run clean-build && rimraf dist node_modules typings dist", "clean": "npm run clean-build && rimraf dist node_modules typings dist",
"clean-build": "rimraf 'app/{,**/}**.js' 'app/{,**/}**.js.map' 'app/{,**/}**.d.ts'", "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", "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-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" "aws": "node app.js"
}, },
"repository": { "repository": {
@@ -63,13 +64,11 @@
"@angular/platform-browser-dynamic": "~4.0.0", "@angular/platform-browser-dynamic": "~4.0.0",
"@angular/router": "~4.0.0", "@angular/router": "~4.0.0",
"@angular/compiler-cli": "~4.0.0", "@angular/compiler-cli": "~4.0.0",
"@angular/material": "2.0.0-beta.1", "@angular/material": "2.0.0-beta.1",
"core-js": "2.4.1", "core-js": "2.4.1",
"reflect-metadata": "0.1.9", "reflect-metadata": "0.1.9",
"rxjs": "5.1.0", "rxjs": "5.1.0",
"zone.js": "0.8.4", "zone.js": "0.8.4",
"dialog-polyfill": "^0.4.7", "dialog-polyfill": "^0.4.7",
"material-design-icons": "2.2.3", "material-design-icons": "2.2.3",
"material-design-lite": "1.2.1", "material-design-lite": "1.2.1",
@@ -83,7 +82,6 @@
"md-date-time-picker": "2.2.0", "md-date-time-picker": "2.2.0",
"element.scrollintoviewifneeded-polyfill": "^1.0.1", "element.scrollintoviewifneeded-polyfill": "^1.0.1",
"ng2-3d-editor": "0.0.15", "ng2-3d-editor": "0.0.15",
"alfresco-js-api": "~1.4.0", "alfresco-js-api": "~1.4.0",
"ng2-activiti-analytics": "1.4.0", "ng2-activiti-analytics": "1.4.0",
"ng2-activiti-diagrams": "1.4.0", "ng2-activiti-diagrams": "1.4.0",
@@ -103,8 +101,9 @@
"ng2-alfresco-webscript": "1.4.0" "ng2-alfresco-webscript": "1.4.0"
}, },
"devDependencies": { "devDependencies": {
"@types/jasmine": "2.5.41", "@types/hammerjs": "^2.0.34",
"@types/node": "^7.0.5", "@types/jasmine": "2.5.35",
"@types/node": "6.0.45",
"angular2-template-loader": "^0.6.2", "angular2-template-loader": "^0.6.2",
"copy-webpack-plugin": "^4.0.1", "copy-webpack-plugin": "^4.0.1",
"css-loader": "0.26.1", "css-loader": "0.26.1",
@@ -114,8 +113,8 @@
"html-webpack-plugin": "^2.28.0", "html-webpack-plugin": "^2.28.0",
"jasmine-core": "^2.5.2", "jasmine-core": "^2.5.2",
"karma": "^1.4.1", "karma": "^1.4.1",
"karma-coverage": "^1.1.1",
"karma-chrome-launcher": "2.0.0", "karma-chrome-launcher": "2.0.0",
"karma-coverage": "^1.1.1",
"karma-jasmine": "^1.1.0", "karma-jasmine": "^1.1.0",
"karma-jasmine-ajax": "0.1.13", "karma-jasmine-ajax": "0.1.13",
"karma-jasmine-html-reporter": "0.2.0", "karma-jasmine-html-reporter": "0.2.0",
@@ -124,13 +123,13 @@
"karma-sourcemap-loader": "^0.3.7", "karma-sourcemap-loader": "^0.3.7",
"karma-webpack": "^2.0.2", "karma-webpack": "^2.0.2",
"null-loader": "^0.1.1", "null-loader": "^0.1.1",
"to-string-loader": "^1.1.4",
"raw-loader": "^0.5.1", "raw-loader": "^0.5.1",
"rimraf": "^2.5.4", "rimraf": "^2.5.4",
"script-loader": "0.7.0", "script-loader": "0.7.0",
"source-map-loader": "^0.1.6", "source-map-loader": "^0.1.6",
"sourcemap-istanbul-instrumenter-loader": "^0.2.0", "sourcemap-istanbul-instrumenter-loader": "^0.2.0",
"style-loader": "0.13.1", "style-loader": "0.13.1",
"to-string-loader": "^1.1.4",
"ts-loader": "^2.0.0", "ts-loader": "^2.0.0",
"tslint": "^4.4.2", "tslint": "^4.4.2",
"tslint-loader": "^3.3.0", "tslint-loader": "^3.3.0",

View File

@@ -6,15 +6,33 @@
"sourceMap": true, "sourceMap": true,
"emitDecoratorMetadata": true, "emitDecoratorMetadata": true,
"experimentalDecorators": true, "experimentalDecorators": true,
"lib": [ "es2015", "dom" ],
"noImplicitAny": false,
"suppressImplicitAnyIndexErrors": true,
"skipLibCheck": 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": [ "exclude": [
"demo",
"node_modules", "node_modules",
"dist", "dist"
"demo" ],
] "angularCompilerOptions": {
"strictMetadataEmit": false,
"skipTemplateCodegen": true
}
} }

View File

@@ -5,6 +5,8 @@ const path = require('path');
module.exports = { module.exports = {
devtool: 'cheap-module-source-map',
resolveLoader: { resolveLoader: {
alias: { alias: {
"file-multi-loader": path.resolve(__dirname, "./custom-loaders/file-loader-multi"), "file-multi-loader": path.resolve(__dirname, "./custom-loaders/file-loader-multi"),
@@ -55,7 +57,12 @@ module.exports = {
}, },
{ {
test: /\.ts$/, 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/] exclude: [/node_modules/, /bundles/, /dist/, /demo/]
}, },
{ {
@@ -67,7 +74,7 @@ module.exports = {
test: /\.css$/, test: /\.css$/,
loader: ['to-string-loader', 'css-loader'], loader: ['to-string-loader', 'css-loader'],
exclude: [/node_modules/, /bundles/, /dist/, /demo/] exclude: [/node_modules/, /bundles/, /dist/, /demo/]
},{ }, {
enforce: 'pre', enforce: 'pre',
test: /\.ts$/, test: /\.ts$/,
loader: 'license-check', loader: 'license-check',
@@ -75,7 +82,7 @@ module.exports = {
emitErrors: true, emitErrors: true,
licenseFile: path.resolve(__dirname, './assets/license_header.txt') 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)$/, test: /\.(png|jpe?g|gif|svg|woff|woff2|ttf|eot|ico)$/,
@@ -96,11 +103,26 @@ module.exports = {
}, },
resolve: { 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'], extensions: ['.ts', '.js'],
symlinks: false, modules: [helpers.root('node_modules')]
modules: [
'../ng2-components', 'node_modules'
]
}, },
plugins: [ plugins: [
@@ -115,8 +137,6 @@ module.exports = {
) )
], ],
devtool: 'cheap-module-source-map',
node: { node: {
fs: 'empty', fs: 'empty',
module: false module: false

View File

@@ -7,12 +7,6 @@ module.exports = {
devtool: 'inline-source-map', devtool: 'inline-source-map',
resolve: {
extensions: ['.ts', '.js'],
symlinks: false,
modules: [helpers.root('../ng2-components'), helpers.root('node_modules')]
},
module: { module: {
rules: [ rules: [
{ {
@@ -58,6 +52,12 @@ module.exports = {
] ]
}, },
resolve: {
extensions: ['.ts', '.js'],
symlinks: false,
modules: [helpers.root('../ng2-components'), helpers.root('node_modules')]
},
plugins: [ plugins: [
new webpack.NoEmitOnErrorsPlugin(), new webpack.NoEmitOnErrorsPlugin(),

View File

@@ -24,8 +24,6 @@ module.exports = function (config) {
{pattern: 'karma-test-shim.js', watched: false}, {pattern: 'karma-test-shim.js', watched: false},
{pattern: './src/assets/**/*.*', included: false, served: true, watched: false}, {pattern: './src/assets/**/*.*', included: false, served: true, watched: false},
{pattern: './src/i18n/**/*.*', 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} {pattern: './src/**/*.ts', included: false, served: true, watched: false}
], ],

View File

@@ -17,12 +17,32 @@
"removeComments": true, "removeComments": true,
"declaration": true, "declaration": true,
"outDir": "./dist", "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": [ "lib": [
"es2015", "es2015",
"dom" "dom"
], ],
"typeRoots": [ "typeRoots": [
"../node_modules/@types" "./node_modules/@types"
], ],
"suppressImplicitAnyIndexErrors": true "suppressImplicitAnyIndexErrors": true
}, },

View File

@@ -24,8 +24,6 @@ module.exports = function (config) {
{pattern: 'karma-test-shim.js', watched: false}, {pattern: 'karma-test-shim.js', watched: false},
{pattern: './src/assets/**/*.*', included: false, served: true, watched: false}, {pattern: './src/assets/**/*.*', included: false, served: true, watched: false},
{pattern: './src/i18n/**/*.*', 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} {pattern: './src/**/*.ts', included: false, served: true, watched: false}
], ],

View File

@@ -17,12 +17,32 @@
"removeComments": true, "removeComments": true,
"declaration": true, "declaration": true,
"outDir": "./dist", "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": [ "lib": [
"es2015", "es2015",
"dom" "dom"
], ],
"typeRoots": [ "typeRoots": [
"../node_modules/@types" "./node_modules/@types"
], ],
"suppressImplicitAnyIndexErrors": true "suppressImplicitAnyIndexErrors": true
}, },

View File

@@ -24,8 +24,6 @@ module.exports = function (config) {
{pattern: 'karma-test-shim.js', watched: false}, {pattern: 'karma-test-shim.js', watched: false},
{pattern: './src/assets/**/*.*', included: false, served: true, watched: false}, {pattern: './src/assets/**/*.*', included: false, served: true, watched: false},
{pattern: './src/i18n/**/*.*', 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} {pattern: './src/**/*.ts', included: false, served: true, watched: false}
], ],

View File

@@ -17,12 +17,32 @@
"removeComments": true, "removeComments": true,
"declaration": true, "declaration": true,
"outDir": "./dist", "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": [ "lib": [
"es2015", "es2015",
"dom" "dom"
], ],
"typeRoots": [ "typeRoots": [
"../node_modules/@types" "./node_modules/@types"
], ],
"suppressImplicitAnyIndexErrors": true "suppressImplicitAnyIndexErrors": true
}, },

View File

@@ -24,8 +24,6 @@ module.exports = function (config) {
{pattern: 'karma-test-shim.js', watched: false}, {pattern: 'karma-test-shim.js', watched: false},
{pattern: './src/assets/**/*.*', included: false, served: true, watched: false}, {pattern: './src/assets/**/*.*', included: false, served: true, watched: false},
{pattern: './src/i18n/**/*.*', 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} {pattern: './src/**/*.ts', included: false, served: true, watched: false}
], ],

View File

@@ -17,12 +17,32 @@
"removeComments": true, "removeComments": true,
"declaration": true, "declaration": true,
"outDir": "./dist", "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": [ "lib": [
"es2015", "es2015",
"dom" "dom"
], ],
"typeRoots": [ "typeRoots": [
"../node_modules/@types" "./node_modules/@types"
], ],
"suppressImplicitAnyIndexErrors": true "suppressImplicitAnyIndexErrors": true
}, },

View File

@@ -24,8 +24,6 @@ module.exports = function (config) {
{pattern: 'karma-test-shim.js', watched: false}, {pattern: 'karma-test-shim.js', watched: false},
{pattern: './src/assets/**/*.*', included: false, served: true, watched: false}, {pattern: './src/assets/**/*.*', included: false, served: true, watched: false},
{pattern: './src/i18n/**/*.*', 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} {pattern: './src/**/*.ts', included: false, served: true, watched: false}
], ],

View File

@@ -17,12 +17,32 @@
"removeComments": true, "removeComments": true,
"declaration": true, "declaration": true,
"outDir": "./dist", "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": [ "lib": [
"es2015", "es2015",
"dom" "dom"
], ],
"typeRoots": [ "typeRoots": [
"../node_modules/@types" "./node_modules/@types"
], ],
"suppressImplicitAnyIndexErrors": true "suppressImplicitAnyIndexErrors": true
}, },

View File

@@ -24,8 +24,6 @@ module.exports = function (config) {
{pattern: 'karma-test-shim.js', watched: false}, {pattern: 'karma-test-shim.js', watched: false},
{pattern: './src/assets/**/*.*', included: false, served: true, watched: false}, {pattern: './src/assets/**/*.*', included: false, served: true, watched: false},
{pattern: './src/i18n/**/*.*', 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} {pattern: './src/**/*.ts', included: false, served: true, watched: false}
], ],

View File

@@ -5,6 +5,7 @@
"author": "Alfresco Software, Ltd.", "author": "Alfresco Software, Ltd.",
"scripts": { "scripts": {
"clean": "rimraf dist node_modules typings bundles coverage .npmrc", "clean": "rimraf dist node_modules typings bundles coverage .npmrc",
"rimraf": "rimraf",
"build": "webpack --config webpack.build.js --progress --profile --bail", "build": "webpack --config webpack.build.js --progress --profile --bail",
"test": "karma start karma.conf.js --reporters mocha,coverage --single-run --component", "test": "karma start karma.conf.js --reporters mocha,coverage --single-run --component",
"test-browser": "karma start karma.conf.js --reporters kjhtml --component", "test-browser": "karma start karma.conf.js --reporters kjhtml --component",

View File

@@ -17,12 +17,32 @@
"removeComments": true, "removeComments": true,
"declaration": true, "declaration": true,
"outDir": "./dist", "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": [ "lib": [
"es2015", "es2015",
"dom" "dom"
], ],
"typeRoots": [ "typeRoots": [
"../node_modules/@types" "./node_modules/@types"
], ],
"suppressImplicitAnyIndexErrors": true "suppressImplicitAnyIndexErrors": true
}, },

View File

@@ -24,8 +24,6 @@ module.exports = function (config) {
{pattern: 'karma-test-shim.js', watched: false}, {pattern: 'karma-test-shim.js', watched: false},
{pattern: './src/assets/**/*.*', included: false, served: true, watched: false}, {pattern: './src/assets/**/*.*', included: false, served: true, watched: false},
{pattern: './src/i18n/**/*.*', 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} {pattern: './src/**/*.ts', included: false, served: true, watched: false}
], ],

View File

@@ -17,12 +17,32 @@
"removeComments": true, "removeComments": true,
"declaration": true, "declaration": true,
"outDir": "./dist", "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": [ "lib": [
"es2015", "es2015",
"dom" "dom"
], ],
"typeRoots": [ "typeRoots": [
"../node_modules/@types" "./node_modules/@types"
], ],
"suppressImplicitAnyIndexErrors": true "suppressImplicitAnyIndexErrors": true
}, },

View File

@@ -24,8 +24,6 @@ module.exports = function (config) {
{pattern: 'karma-test-shim.js', watched: false}, {pattern: 'karma-test-shim.js', watched: false},
{pattern: './src/assets/**/*.*', included: false, served: true, watched: false}, {pattern: './src/assets/**/*.*', included: false, served: true, watched: false},
{pattern: './src/i18n/**/*.*', 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} {pattern: './src/**/*.ts', included: false, served: true, watched: false}
], ],

View File

@@ -17,12 +17,32 @@
"removeComments": true, "removeComments": true,
"declaration": true, "declaration": true,
"outDir": "./dist", "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": [ "lib": [
"es2015", "es2015",
"dom" "dom"
], ],
"typeRoots": [ "typeRoots": [
"../node_modules/@types" "./node_modules/@types"
], ],
"suppressImplicitAnyIndexErrors": true "suppressImplicitAnyIndexErrors": true
}, },

View File

@@ -24,8 +24,6 @@ module.exports = function (config) {
{pattern: 'karma-test-shim.js', watched: false}, {pattern: 'karma-test-shim.js', watched: false},
{pattern: './src/assets/**/*.*', included: false, served: true, watched: false}, {pattern: './src/assets/**/*.*', included: false, served: true, watched: false},
{pattern: './src/i18n/**/*.*', 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} {pattern: './src/**/*.ts', included: false, served: true, watched: false}
], ],

View File

@@ -17,12 +17,32 @@
"removeComments": true, "removeComments": true,
"declaration": true, "declaration": true,
"outDir": "./dist", "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": [ "lib": [
"es2015", "es2015",
"dom" "dom"
], ],
"typeRoots": [ "typeRoots": [
"../node_modules/@types" "./node_modules/@types"
], ],
"suppressImplicitAnyIndexErrors": true "suppressImplicitAnyIndexErrors": true
}, },

View File

@@ -24,8 +24,6 @@ module.exports = function (config) {
{pattern: 'karma-test-shim.js', watched: false}, {pattern: 'karma-test-shim.js', watched: false},
{pattern: './src/assets/**/*.*', included: false, served: true, watched: false}, {pattern: './src/assets/**/*.*', included: false, served: true, watched: false},
{pattern: './src/i18n/**/*.*', 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} {pattern: './src/**/*.ts', included: false, served: true, watched: false}
], ],

View File

@@ -17,12 +17,32 @@
"removeComments": true, "removeComments": true,
"declaration": true, "declaration": true,
"outDir": "./dist", "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": [ "lib": [
"es2015", "es2015",
"dom" "dom"
], ],
"typeRoots": [ "typeRoots": [
"../node_modules/@types" "./node_modules/@types"
], ],
"suppressImplicitAnyIndexErrors": true "suppressImplicitAnyIndexErrors": true
}, },

View File

@@ -24,8 +24,6 @@ module.exports = function (config) {
{pattern: 'karma-test-shim.js', watched: false}, {pattern: 'karma-test-shim.js', watched: false},
{pattern: './src/assets/**/*.*', included: false, served: true, watched: false}, {pattern: './src/assets/**/*.*', included: false, served: true, watched: false},
{pattern: './src/i18n/**/*.*', 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} {pattern: './src/**/*.ts', included: false, served: true, watched: false}
], ],

View File

@@ -17,12 +17,32 @@
"removeComments": true, "removeComments": true,
"declaration": true, "declaration": true,
"outDir": "./dist", "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": [ "lib": [
"es2015", "es2015",
"dom" "dom"
], ],
"typeRoots": [ "typeRoots": [
"../node_modules/@types" "./node_modules/@types"
], ],
"suppressImplicitAnyIndexErrors": true "suppressImplicitAnyIndexErrors": true
}, },

View File

@@ -24,8 +24,6 @@ module.exports = function (config) {
{pattern: 'karma-test-shim.js', watched: false}, {pattern: 'karma-test-shim.js', watched: false},
{pattern: './src/assets/**/*.*', included: false, served: true, watched: false}, {pattern: './src/assets/**/*.*', included: false, served: true, watched: false},
{pattern: './src/i18n/**/*.*', 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} {pattern: './src/**/*.ts', included: false, served: true, watched: false}
], ],

View File

@@ -17,12 +17,32 @@
"removeComments": true, "removeComments": true,
"declaration": true, "declaration": true,
"outDir": "./dist", "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": [ "lib": [
"es2015", "es2015",
"dom" "dom"
], ],
"typeRoots": [ "typeRoots": [
"../node_modules/@types" "./node_modules/@types"
], ],
"suppressImplicitAnyIndexErrors": true "suppressImplicitAnyIndexErrors": true
}, },

View File

@@ -24,8 +24,6 @@ module.exports = function (config) {
{pattern: 'karma-test-shim.js', watched: false}, {pattern: 'karma-test-shim.js', watched: false},
{pattern: './src/assets/**/*.*', included: false, served: true, watched: false}, {pattern: './src/assets/**/*.*', included: false, served: true, watched: false},
{pattern: './src/i18n/**/*.*', 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} {pattern: './src/**/*.ts', included: false, served: true, watched: false}
], ],

View File

@@ -17,12 +17,32 @@
"removeComments": true, "removeComments": true,
"declaration": true, "declaration": true,
"outDir": "./dist", "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": [ "lib": [
"es2015", "es2015",
"dom" "dom"
], ],
"typeRoots": [ "typeRoots": [
"../node_modules/@types" "./node_modules/@types"
], ],
"suppressImplicitAnyIndexErrors": true "suppressImplicitAnyIndexErrors": true
}, },

View File

@@ -24,8 +24,6 @@ module.exports = function (config) {
{pattern: 'karma-test-shim.js', watched: false}, {pattern: 'karma-test-shim.js', watched: false},
{pattern: './src/assets/**/*.*', included: false, served: true, watched: false}, {pattern: './src/assets/**/*.*', included: false, served: true, watched: false},
{pattern: './src/i18n/**/*.*', 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} {pattern: './src/**/*.ts', included: false, served: true, watched: false}
], ],

View File

@@ -17,12 +17,32 @@
"removeComments": true, "removeComments": true,
"declaration": true, "declaration": true,
"outDir": "./dist", "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": [ "lib": [
"es2015", "es2015",
"dom" "dom"
], ],
"typeRoots": [ "typeRoots": [
"../node_modules/@types" "./node_modules/@types"
], ],
"suppressImplicitAnyIndexErrors": true "suppressImplicitAnyIndexErrors": true
}, },

View File

@@ -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/md-date-time-picker/**/*.js', included: false, served: true, watched: false},
{pattern: './node_modules/moment/**/*.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: 'karma-test-shim.js', watched: false},
{pattern: './dist/**/*.*', included: false, served: true, watched: false},
{pattern: './src/**/*.*', included: false, served: true, watched: false} {pattern: './src/**/*.*', included: false, served: true, watched: false}
], ],
webpack: webpackConfig, webpack: webpackConfig,

View File

@@ -185,19 +185,25 @@ describe('Test ng2-alfresco-viewer PdfViewer component', () => {
it('Total number of pages should be loaded', (done) => { it('Total number of pages should be loaded', (done) => {
component.ngOnChanges(null).then(() => { component.ngOnChanges(null).then(() => {
fixture.detectChanges(); fixture.detectChanges();
expect(component.totalPages).toEqual(6); fixture.whenStable().then(() => {
done();
expect(component.totalPages).toEqual(6);
done();
});
}); });
}, 5000); }, 5000);
it('right arrow should move to the next page', (done) => { it('right arrow should move to the next page', (done) => {
component.ngOnChanges(null).then(() => { component.ngOnChanges(null).then(() => {
fixture.detectChanges(); fixture.detectChanges();
expect(component.displayPage).toBe(1); fixture.whenStable().then(() => {
EventMock.keyDown(39); expect(component.displayPage).toBe(1);
fixture.detectChanges(); EventMock.keyDown(39);
expect(component.displayPage).toBe(2); fixture.detectChanges();
done(); expect(component.displayPage).toBe(2);
done();
});
}); });
}, 5000); }, 5000);
@@ -206,24 +212,30 @@ describe('Test ng2-alfresco-viewer PdfViewer component', () => {
component.ngOnChanges(null).then(() => { component.ngOnChanges(null).then(() => {
fixture.detectChanges(); fixture.detectChanges();
expect(component.displayPage).toBe(1); fixture.whenStable().then(() => {
nextPageButton.click();
fixture.detectChanges(); expect(component.displayPage).toBe(1);
expect(component.displayPage).toBe(2); nextPageButton.click();
done(); fixture.detectChanges();
expect(component.displayPage).toBe(2);
done();
});
}); });
}); });
it('left arrow should move to the previous page', (done) => { it('left arrow should move to the previous page', (done) => {
component.ngOnChanges(null).then(() => { component.ngOnChanges(null).then(() => {
fixture.detectChanges(); fixture.detectChanges();
expect(component.displayPage).toBe(1); fixture.whenStable().then(() => {
EventMock.keyDown(39);
EventMock.keyDown(39); expect(component.displayPage).toBe(1);
EventMock.keyDown(37); EventMock.keyDown(39);
fixture.detectChanges(); EventMock.keyDown(39);
expect(component.displayPage).toBe(2); EventMock.keyDown(37);
done(); fixture.detectChanges();
expect(component.displayPage).toBe(2);
done();
});
}); });
}); });
@@ -233,35 +245,44 @@ describe('Test ng2-alfresco-viewer PdfViewer component', () => {
component.ngOnChanges(null).then(() => { component.ngOnChanges(null).then(() => {
fixture.detectChanges(); fixture.detectChanges();
expect(component.displayPage).toBe(1); fixture.whenStable().then(() => {
nextPageButton.click();
nextPageButton.click(); expect(component.displayPage).toBe(1);
previousPageButton.click(); nextPageButton.click();
fixture.detectChanges(); nextPageButton.click();
expect(component.displayPage).toBe(2); previousPageButton.click();
done(); fixture.detectChanges();
expect(component.displayPage).toBe(2);
done();
});
}); });
}); });
it('previous page should not move to the previous page if is page 1', (done) => { it('previous page should not move to the previous page if is page 1', (done) => {
component.ngOnChanges(null).then(() => { component.ngOnChanges(null).then(() => {
fixture.detectChanges(); fixture.detectChanges();
expect(component.displayPage).toBe(1); fixture.whenStable().then(() => {
component.previousPage();
fixture.detectChanges(); expect(component.displayPage).toBe(1);
expect(component.displayPage).toBe(1); component.previousPage();
done(); fixture.detectChanges();
expect(component.displayPage).toBe(1);
done();
});
}); });
}); });
it('Input page should move to the inserted page', (done) => { it('Input page should move to the inserted page', (done) => {
component.ngOnChanges(null).then(() => { component.ngOnChanges(null).then(() => {
fixture.detectChanges(); fixture.detectChanges();
expect(component.displayPage).toBe(1); fixture.whenStable().then(() => {
component.inputPage('2');
fixture.detectChanges(); expect(component.displayPage).toBe(1);
expect(component.displayPage).toBe(2); component.inputPage('2');
done(); fixture.detectChanges();
expect(component.displayPage).toBe(2);
done();
});
}); });
}); });
@@ -314,39 +335,50 @@ describe('Test ng2-alfresco-viewer PdfViewer component', () => {
}); });
describe('Resize interaction', () => { describe('Resize interaction', () => {
beforeEach(() => { beforeEach(() => {
component.urlFile = require('../assets/fake-test-file.pdf'); component.urlFile = require('../assets/fake-test-file.pdf');
fixture.detectChanges();
component.inputPage('1'); component.inputPage('1');
}); });
it('resize event should trigger setScaleUpdatePages', (done) => { it('resize event should trigger setScaleUpdatePages', (done) => {
component.ngOnChanges(null).then(() => { component.ngOnChanges(null).then(() => {
fixture.detectChanges(); fixture.detectChanges();
spyOn(component, 'onResize'); fixture.whenStable().then(() => {
EventMock.resizeMobileView();
expect(component.onResize).toHaveBeenCalled(); spyOn(component, 'onResize');
done(); EventMock.resizeMobileView();
expect(component.onResize).toHaveBeenCalled();
done();
});
}); });
}); });
}); });
describe('scroll interaction', () => { describe('scroll interaction', () => {
beforeEach(() => { beforeEach(() => {
component.urlFile = require('../assets/fake-test-file.pdf'); component.urlFile = require('../assets/fake-test-file.pdf');
fixture.detectChanges(); fixture.detectChanges();
}); });
it('scroll page should return the current page', (done) => { it('scroll page should return the current page', (done) => {
component.ngOnChanges(null).then(() => { component.ngOnChanges(null).then(() => {
fixture.detectChanges(); fixture.detectChanges();
expect(component.displayPage).toBe(1); fixture.whenStable().then(() => {
component.inputPage('2');
fixture.detectChanges(); expect(component.displayPage).toBe(1);
expect(component.displayPage).toBe(2); component.inputPage('2');
let documentContainer = element.querySelector('#viewer-pdf-container'); fixture.detectChanges();
documentContainer.scrollTop = 100000; expect(component.displayPage).toBe(2);
component.watchScroll(documentContainer); let documentContainer = element.querySelector('#viewer-pdf-container');
fixture.detectChanges(); documentContainer.scrollTop = 100000;
expect(component.displayPage).toBe(6); component.watchScroll(documentContainer);
done(); fixture.detectChanges();
expect(component.displayPage).toBe(6);
done();
});
}); });
}); });
}); });

View File

@@ -17,12 +17,32 @@
"removeComments": true, "removeComments": true,
"declaration": true, "declaration": true,
"outDir": "./dist", "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": [ "lib": [
"es2015", "es2015",
"dom" "dom"
], ],
"typeRoots": [ "typeRoots": [
"../node_modules/@types" "./node_modules/@types"
], ],
"suppressImplicitAnyIndexErrors": true "suppressImplicitAnyIndexErrors": true
}, },

View File

@@ -24,8 +24,6 @@ module.exports = function (config) {
{pattern: 'karma-test-shim.js', watched: false}, {pattern: 'karma-test-shim.js', watched: false},
{pattern: './src/assets/**/*.*', included: false, served: true, watched: false}, {pattern: './src/assets/**/*.*', included: false, served: true, watched: false},
{pattern: './src/i18n/**/*.*', 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} {pattern: './src/**/*.ts', included: false, served: true, watched: false}
], ],

View File

@@ -22,7 +22,7 @@
"dom" "dom"
], ],
"typeRoots": [ "typeRoots": [
"../node_modules/@types" "./node_modules/@types"
], ],
"suppressImplicitAnyIndexErrors": true "suppressImplicitAnyIndexErrors": true
}, },

View File

@@ -7,8 +7,8 @@
"clean": "rimraf node_modules", "clean": "rimraf node_modules",
"build": "webpack --config config/webpack.build.js --progress --profile --bail", "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", "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": "node node_modules/karma/bin/karma start --reporters mocha,coverage --single-run --component .",
"test-browser": "karma start karma.conf.js --reporters kjhtml", "test-browser": "node node_modules/karma/bin/karma start karma.conf.js --reporters kjhtml",
"tslint": "", "tslint": "",
"prepublish": "", "prepublish": "",
"tsc": "", "tsc": "",

View File

@@ -5,12 +5,12 @@
"author": "Alfresco Software, Ltd.", "author": "Alfresco Software, Ltd.",
"scripts": { "scripts": {
"clean": "rimraf node_modules", "clean": "rimraf node_modules",
"rimraf": "rimraf",
"build": "webpack --config config/webpack.build.js --progress --profile --bail", "build": "webpack --config config/webpack.build.js --progress --profile --bail",
"test": "karma start --reporters mocha,coverage --single-run", "test": "node node_modules/karma/bin/karma start --reporters mocha,coverage --single-run --component .",
"test-browser": "karma start karma.conf.js --reporters kjhtml", "test-browser": "node node_modules/karma/bin/karma start karma.conf.js --reporters kjhtml",
"coverage": "", "coverage": "",
"prepublish": "", "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", "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": "", "tslint": "",
"tsc": "", "tsc": "",

View File

@@ -1,5 +1,12 @@
## Running a demo project ## 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 The Alfresco application development framework comes with a demo project that you can run to get a
feel for what's available. feel for what's available.
@@ -10,13 +17,54 @@ feel for what's available.
cd scripts 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 ```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
./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 ```sh
./start.sh ./start.sh
@@ -25,7 +73,7 @@ feel for what's available.
* Start the demo, install all the dependencies, and remove the previous version of the npm packages (*Note. do this only after big changes*): * Start the demo, install all the dependencies, and remove the previous version of the npm packages (*Note. do this only after big changes*):
```sh ```sh
./start.sh -c -i ./start.sh -c
``` ```
* Start the demo using an alternative npm registry * Start the demo using an alternative npm registry
@@ -40,7 +88,7 @@ feel for what's available.
./start.sh -update or -u ./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 ```sh
./start.sh -version or -v COMPONENTS_VERSION ./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 * 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 ```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 ```sh
./start.sh -dist ./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: * If you want to build all your local component:
```sh ```sh
./npm-buid-all.sh ./npm-build-all.sh
``` ```
* If you want to build all your local component and run the test: * If you want to build all your local component and run the test:
```sh ```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 * If you want clean the ng2-components folder node_modules before to build
```sh ```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 * If you want build to build all the components against a commit-ish version of the JS-API
```sh ```sh
./npm-buid-all.sh -gitjsapi commit-ish ./npm-build-all.sh -gitjsapi commit-ish
./npm-build-all.sh -gitjsapi development ./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 * If you want avoid initial build and run only all the test
```sh ```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 ```sh
./npm-buid-all.sh -ft //test and build ./npm-build-all.sh -si
./npm-buid-all.sh -s -ft //only test
``` ```
* If you want clean all your local component and the demo shell: * 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). 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 |

View File

@@ -5,6 +5,7 @@ eval RUN_TEST=false
eval EXEC_FAST_TEST=false eval EXEC_FAST_TEST=false
eval EXEC_CLEAN=false eval EXEC_CLEAN=false
eval EXEC_BUILD=true eval EXEC_BUILD=true
eval EXEC_INSTALL=true
eval EXEC_GIT_NPM_INSTALL_JSAPI=false eval EXEC_GIT_NPM_INSTALL_JSAPI=false
eval GIT_ISH="" eval GIT_ISH=""
@@ -29,10 +30,11 @@ eval projects=( "ng2-alfresco-core"
show_help() { show_help() {
echo "Usage: npm-build-all.sh" echo "Usage: npm-build-all.sh"
echo "" 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 "-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 "-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" 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_BUILD=false
} }
exec_install(){
EXEC_INSTALL=false
}
while [[ $1 == -* ]]; do while [[ $1 == -* ]]; do
case "$1" in case "$1" in
-h|--help|-\?) show_help; exit 0;; -h|--help|-\?) show_help; exit 0;;
-t|--test) enable_test; shift;; -t|--test) enable_test; shift;;
-ft|--fasttest) enable_fast_test; shift;; -ft|--fasttest) enable_fast_test; shift;;
-gitjsapi) enable_js_api_git_link $2; shift 2;; -gitjsapi) enable_js_api_git_link $2; shift 2;;
-v|--version) install_version_pacakge $2; shift 2;;
-c|--clean) clean; shift;; -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;; -*) echo "invalid option: $1" 1>&2; show_help; exit 1;;
esac esac
done done
@@ -87,8 +93,10 @@ echo "====== Regenerate global ng2-components package.json ====="
npm install package-json-merge npm install package-json-merge
npm run pkg-build npm run pkg-build
echo "====== Install ng2-components dependencies =====" if $EXEC_INSTALL == true; then
npm install echo "====== Install ng2-components dependencies ====="
npm install
fi
if $EXEC_GIT_NPM_INSTALL_JSAPI == true; then if $EXEC_GIT_NPM_INSTALL_JSAPI == true; then
echo "====== Use the alfresco JS-API '$GIT_ISH'=====" echo "====== Use the alfresco JS-API '$GIT_ISH'====="

View File

@@ -2,6 +2,14 @@
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 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" eval projects=( "ng2-activiti-diagrams"
"ng2-activiti-analytics" "ng2-activiti-analytics"
"ng2-activiti-form" "ng2-activiti-form"
@@ -20,25 +28,42 @@ eval projects=( "ng2-activiti-diagrams"
"ng2-alfresco-webscript" "ng2-alfresco-webscript"
"ng2-alfresco-userinfo" ) "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[@]} for PACKAGE in ${projects[@]}
do do
echo "====== clean component: ${PACKAGE} =====" echo "====== clean component: ${PACKAGE} ====="
cd "$DIR/../ng2-components/${PACKAGE}" cd "$DIR/../ng2-components/${PACKAGE}"
npm run clean npm install rimraf
if [ -d "$DIR/../ng2-components/${PACKAGE}/demo" ]; then
echo "====== clean component demo: ${PACKAGE} ====="
cd "$DIR/../ng2-components/${PACKAGE}/demo"
npm run clean 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 done
cd "$DIR/../demo-shell-ng2" cd "$DIR/../demo-shell-ng2"
npm install rimraf
npm run clean npm run clean
cd "$DIR/../ng2-components" cd "$DIR/../ng2-components"
npm install rimraf
npm run clean npm run clean
cd ${DIR} cd ${DIR}

View File

@@ -7,6 +7,8 @@ eval EXEC_CHANGE_REGISTRY=false
eval NPM_REGISTRY=false eval NPM_REGISTRY=false
eval TOKEN_REGISTRY="" eval TOKEN_REGISTRY=""
eval OPTIONS="" eval OPTIONS=""
eval EXEC_GIT_NPM_INSTALL_JSAPI=false
eval GIT_ISH=""
cd "$DIR/../demo-shell-ng2" 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 "-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 "-token auth token for publish in the npm registry"
echo "-t or -tag to add a tag when publish a package" 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(){ enable_force(){
@@ -38,6 +41,11 @@ get_token_registry(){
fi 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(){ add_tag(){
eval TAG=$1 eval TAG=$1
@@ -72,6 +80,7 @@ while [[ $1 == -* ]]; do
-f|--force) enable_force; shift;; -f|--force) enable_force; shift;;
-token) get_token_registry $2; shift 2;; -token) get_token_registry $2; shift 2;;
-r|--registry) enable_change_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;; -*) echo "invalid option: $1" 1>&2; show_help; exit 0;;
esac esac
done done
@@ -102,6 +111,14 @@ do
npm run clean npm run clean
npm install 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 if $EXEC_CHANGE_REGISTRY == true; then
change_registry change_registry
fi fi

View File

@@ -2,14 +2,16 @@
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
eval EXEC_INSTALL=false eval EXEC_INSTALL=true
eval EXEC_UPDATE=false eval EXEC_UPDATE=false
eval EXEC_CLEAN=false eval EXEC_CLEAN=false
eval EXEC_DEVELOP=false eval EXEC_DEVELOP=false
eval EXEC_VERSION=false eval EXEC_VERSION=false
eval ENABLE_DIST=false eval EXEC_DIST=false
eval EXEC_GIT_NPM_INSTALL_JSAPI=false eval EXEC_GIT_NPM_INSTALL_JSAPI=false
eval EXEC_VERSION_JSAPI=false eval EXEC_VERSION_JSAPI=false
eval EXEC_START=true
eval EXEC_TEST=false
eval JSAPI_VERSION="" eval JSAPI_VERSION=""
eval NG2_COMPONENTS_VERSION="" eval NG2_COMPONENTS_VERSION=""
eval GIT_ISH="" eval GIT_ISH=""
@@ -35,19 +37,21 @@ eval projects=( "ng2-alfresco-core"
show_help() { show_help() {
echo "Usage: start.sh" echo "Usage: start.sh"
echo "" echo ""
echo "-d or -develop start the demo shell using the relative ng2-components folder to link the components" echo "-ss or -skipstart build only the demo shell without start"
echo "-dist start the demo shell in dist mode" echo "-si or -skipinstall start the demo shell and skip the install the dependencies"
echo "-i or -install start the demo shell and 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 "-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 "-c or -clean clean the demo shell and reinstall the dependencies"
echo "-r or -registry to download the packages from an alternative npm registry example -registry 'http://npm.local.me:8080/' " echo "-r or -registry to download the packages from an alternative npm registry example -registry 'http://npm.local.me:8080/' "
echo "-v or -version install different version of ng2_components from npm defined in the package.json this option is not compatible with -d"
echo "-gitjsapi to build all the components against a commit-ish version of the JS-API" echo "-gitjsapi to build all the components against a commit-ish version of the JS-API"
echo "-vjsapi install different version from npm of JS-API defined in the package.json" echo "-vjsapi install different version from npm of JS-API defined in the package.json"
} }
install() { install() {
EXEC_INSTALL=true EXEC_INSTALL=false
} }
update() { update() {
@@ -59,7 +63,15 @@ develop() {
} }
enable_dist() { enable_dist() {
ENABLE_DIST=true EXEC_DIST=true
}
disable_start() {
EXEC_START=false
}
enable_test() {
EXEC_TEST=false
} }
enable_js_api_git_link() { enable_js_api_git_link() {
@@ -112,12 +124,14 @@ clean() {
while [[ $1 == -* ]]; do while [[ $1 == -* ]]; do
case "$1" in case "$1" in
-h|--help|-\?) show_help; exit 0;; -h|--help|-\?) show_help; exit 0;;
-i|--install) install; shift;;
-u|--update) update; shift;; -u|--update) update; shift;;
-c|--clean) clean; shift;; -c|--clean) clean; shift;;
-d|--develop) develop; shift;; -t|--test) enable_test; shift;;
-r|--registry) change_registry $2; shift 2;; -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;; -dist) enable_dist; shift;;
-gitjsapi) enable_js_api_git_link $2; shift 2;; -gitjsapi) enable_js_api_git_link $2; shift 2;;
-vjsapi) version_js_api $2; shift 2;; -vjsapi) version_js_api $2; shift 2;;
@@ -125,34 +139,28 @@ while [[ $1 == -* ]]; do
esac esac
done done
cd "$DIR/../demo-shell-ng2"
if $EXEC_CLEAN == true; then if $EXEC_CLEAN == true; then
echo "====== Clean Demo shell =====" echo "====== Clean Demo shell ====="
cd "$DIR/../demo-shell-ng2"
npm install rimraf npm install rimraf
npm run clean npm run clean
fi fi
if $EXEC_INSTALL == true; then
echo "====== Install Demo shell ====="
npm install
fi
if $EXEC_DEVELOP == true; then if $EXEC_DEVELOP == true; then
echo "====== Build ng2-components folder=====" echo "====== Install node_modules ng2-components ====="
cd "$DIR/../scripts" cd "$DIR/../ng2-components"
sh npm-build-all.sh npm install
fi cd "$DIR/../demo-shell-ng2"
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
fi fi
if $EXEC_VERSION == true; then if $EXEC_VERSION == true; then
echo "====== Install version "${NG2_COMPONENTS_VERSION}" of ng2-components =====" echo "====== Install version "${NG2_COMPONENTS_VERSION}" of ng2-components ====="
cd "$DIR/../demo-shell-ng2"
if [[ "${EXEC_DEVELOP}" == "" ]] if [[ "${EXEC_DEVELOP}" == "" ]]
then then
@@ -169,46 +177,52 @@ fi
if $EXEC_GIT_NPM_INSTALL_JSAPI == true; then if $EXEC_GIT_NPM_INSTALL_JSAPI == true; then
echo "====== Use the alfresco JS-API '$GIT_ISH'=====" echo "====== Use the alfresco JS-API '$GIT_ISH'====="
npm install $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
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"
npm install 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 fi
if $EXEC_VERSION_JSAPI == true; then if $EXEC_VERSION_JSAPI == true; then
echo "====== Use the alfresco JS-API '$JSAPI_VERSION'=====" echo "====== Use the alfresco JS-API '$JSAPI_VERSION'====="
cd "$DIR/../demo-shell-ng2"
npm install alfresco-js-api@${JSAPI_VERSION} 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 fi
if $EXEC_DEVELOP == true; then if $EXEC_TEST == true; then
cd "$DIR/../demo-shell-ng2" echo "====== Demo shell Test====="
if $ENABLE_DIST == true; then npm run test
echo "====== Build and start dist Demo shell =====" fi
npm run build:dev
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 npm run start:dist
else else
echo "====== Start Demo shell =====" echo "====== Start Demo shell ====="
npm run start:dev npm run start
fi fi
else else
cd "$DIR/../demo-shell-ng2" if $EXEC_DEVELOP == true; then
echo "====== Build Demo shell dev mode ====="
if $ENABLE_DIST == true; then npm run build:dev
echo "====== Build and start dist Demo shell =====" else
npm run build echo "====== Build Demo shell ====="
npm run start:dist npm run build
else fi
echo "====== Start Demo shell dev mode====="
npm run start
fi
fi fi