From 8130c29db9c0c085c0122a6056b769a2f1e5bb58 Mon Sep 17 00:00:00 2001 From: Denys Vuika Date: Fri, 16 Dec 2016 12:59:51 +0000 Subject: [PATCH 1/3] exclude various folders from live reload --- demo-shell-ng2/config/webpack.common.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/demo-shell-ng2/config/webpack.common.js b/demo-shell-ng2/config/webpack.common.js index d2d3be3135..d781afd66c 100644 --- a/demo-shell-ng2/config/webpack.common.js +++ b/demo-shell-ng2/config/webpack.common.js @@ -18,8 +18,8 @@ let options = { let alfrescoLibs = glob.sync(pattern, options); // console.dir(alfrescoLibs); -// Uncomment if you need all node_modules folders for Alfresco components -// let alfrescoLibsModules = alfrescoLibs.map(p => path.join(p, 'node_modules')); +let alfrescoLibsModules = alfrescoLibs.map(p => path.join(p, 'node_modules')); +let alfrescoLibsSources = alfrescoLibs.map(p => path.join(p, 'src')); module.exports = { entry: { @@ -110,6 +110,11 @@ module.exports = { 'dialogPolyfill': 'dialog-polyfill/dialog-polyfill' }), + new webpack.WatchIgnorePlugin([ + ...alfrescoLibsModules, + ...alfrescoLibsSources + ]), + new CopyWebpackPlugin([ { from: 'versions.json' } ]), From 8dd6dd38d5f13d5961a38cedce3dd73265cfecac Mon Sep 17 00:00:00 2001 From: Denys Vuika Date: Fri, 16 Dec 2016 13:27:58 +0000 Subject: [PATCH 2/3] remove duplicate entries in package.json --- demo-shell-ng2/package.json | 4 ---- 1 file changed, 4 deletions(-) diff --git a/demo-shell-ng2/package.json b/demo-shell-ng2/package.json index 149c1503d5..0977eaf002 100644 --- a/demo-shell-ng2/package.json +++ b/demo-shell-ng2/package.json @@ -127,10 +127,6 @@ "webpack": "^1.13.0", "webpack-dev-server": "^1.14.1", "webpack-merge": "^0.14.0", - "source-map-loader": "^0.1.5", - "script-loader": "^0.7.0", - "copy-webpack-plugin": "^4.0.1", - "glob": "^7.1.1", "wsrv": "^0.1.6" }, "license-check-config": { From 1b13e6b4dede50f3a12658a29926323561624232 Mon Sep 17 00:00:00 2001 From: Eugenio Romano Date: Fri, 16 Dec 2016 14:14:19 +0000 Subject: [PATCH 3/3] ie-polyfills fix --- demo-shell-ng2/app/polyfills.ts | 2 - demo-shell-ng2/app/vendor.ts | 47 +- demo-shell-ng2/config/webpack.common.js | 105 +- demo-shell-ng2/index.html | 46 +- demo-shell-ng2/package.json | 13 +- .../public/fonts/material-icons.woff2 | 0 demo-shell-ng2/public/js/Blob.js | 211 ++++ demo-shell-ng2/public/js/Polyline.js | 372 ------ demo-shell-ng2/public/js/formdata.js | 37 + demo-shell-ng2/public/js/promisePolyfill.js | 3 + demo-shell-ng2/public/js/typedarray.js | 1048 +++++++++++++++++ .../src/components/user-info.component.css | 13 +- 12 files changed, 1468 insertions(+), 429 deletions(-) delete mode 100644 demo-shell-ng2/public/fonts/material-icons.woff2 create mode 100644 demo-shell-ng2/public/js/Blob.js delete mode 100644 demo-shell-ng2/public/js/Polyline.js create mode 100644 demo-shell-ng2/public/js/formdata.js create mode 100644 demo-shell-ng2/public/js/promisePolyfill.js create mode 100644 demo-shell-ng2/public/js/typedarray.js diff --git a/demo-shell-ng2/app/polyfills.ts b/demo-shell-ng2/app/polyfills.ts index c279c6f18f..d5be0fad92 100644 --- a/demo-shell-ng2/app/polyfills.ts +++ b/demo-shell-ng2/app/polyfills.ts @@ -2,8 +2,6 @@ import 'core-js/es6'; import 'core-js/es7/reflect'; // IE 8-11 -require('script!element.scrollintoviewifneeded-polyfill/index.js'); - require('zone.js/dist/zone'); if (process.env.ENV === 'production') { diff --git a/demo-shell-ng2/app/vendor.ts b/demo-shell-ng2/app/vendor.ts index 038e3284c7..4bb3c9218f 100644 --- a/demo-shell-ng2/app/vendor.ts +++ b/demo-shell-ng2/app/vendor.ts @@ -10,45 +10,32 @@ import '@angular/router'; import 'rxjs'; //Alfresco -import 'ng2-alfresco-core' -import 'ng2-alfresco-datatable' -import 'ng2-activiti-diagrams' -import 'ng2-activiti-analytics' -import 'ng2-activiti-form' -import 'ng2-activiti-processlist' -import 'ng2-activiti-tasklist' -import 'ng2-alfresco-documentlist' -import 'ng2-alfresco-login' -import 'ng2-alfresco-search' -import 'ng2-alfresco-tag' -import 'ng2-alfresco-upload' -import 'ng2-alfresco-viewer' -import 'ng2-alfresco-webscript' -import 'ng2-alfresco-userinfo' - -// Other vendors for example jQuery, Lodash or Bootstrap -// You can import js, ts, css, sass, ... - -// Google Material Design Lite -import '../public/css/material.orange-blue.min.css'; -import 'material-design-lite/material.min'; -import 'material-design-icons/iconfont/material-icons.css'; - -// Flags -import 'flag-icon-css/css/flag-icon.min.css'; +import 'ng2-alfresco-core'; +import 'ng2-alfresco-datatable'; +import 'ng2-activiti-diagrams'; +import 'ng2-activiti-analytics'; +import 'ng2-activiti-form'; +import 'ng2-activiti-processlist'; +import 'ng2-activiti-tasklist'; +import 'ng2-alfresco-documentlist'; +import 'ng2-alfresco-login'; +import 'ng2-alfresco-search'; +import 'ng2-alfresco-tag'; +import 'ng2-alfresco-upload'; +import 'ng2-alfresco-viewer'; +import 'ng2-alfresco-webscript'; +import 'ng2-alfresco-userinfo'; // Polyfill(s) for dialogs import 'dialog-polyfill/dialog-polyfill'; import 'dialog-polyfill/dialog-polyfill.css'; -// app content -import '../public/css/app.css'; -import '../public/css/muli-font.css'; +// Flags +import 'flag-icon-css/css/flag-icon.min.css'; import 'ng2-activiti-form/stencils/runtime.ng1'; import 'ng2-activiti-form/stencils/runtime.adf'; -require('script!../public/js/Polyline.js'); import 'chart.js'; require('script!raphael/raphael.min.js'); diff --git a/demo-shell-ng2/config/webpack.common.js b/demo-shell-ng2/config/webpack.common.js index d2d3be3135..513f6e09f7 100644 --- a/demo-shell-ng2/config/webpack.common.js +++ b/demo-shell-ng2/config/webpack.common.js @@ -111,7 +111,110 @@ module.exports = { }), new CopyWebpackPlugin([ - { from: 'versions.json' } + { + from: 'versions.json' + },{ + context: 'node_modules', + from: 'element.scrollintoviewifneeded-polyfill/index.js', + to: 'js/element.scrollintoviewifneeded-polyfill.js', + flatten: true + },{ + context: 'node_modules', + from: 'classlist-polyfill/src/index.js', + to: 'js/classlist-polyfill.js', + flatten: true + }, { + context: 'node_modules', + from: 'intl/dist/Intl.min.js', + to: 'js/Intl.min.js', + flatten: true + }, { + context: 'node_modules', + from: 'web-animations-js/web-animations.min.js', + to: 'js/web-animations.min.js', + flatten: true + }, { + context: 'node_modules', + from: 'core-js/client/shim.min.js', + to: 'js/shim.min.js', + flatten: true + }, { + context: 'node_modules', + from: 'es6-shim/es6-shim.min.js', + to: 'js/es6-shim.min.js', + flatten: true + }, { + context: 'node_modules', + from: 'es5-shim/es5-shim.min.js', + to: 'js/es5-shim.min.js', + flatten: true + }, { + context: 'node_modules', + from: 'systemjs/dist/system-polyfills.js', + to: 'js/system-polyfills.js', + flatten: true + }, { + context: 'node_modules', + from: 'material-design-lite/material.min.js', + to: 'js/material.min.js', + flatten: true + }, { + context: 'node_modules', + from: 'material-design-lite/material.min.js', + to: 'js/material.min.js', + flatten: true + }, { + context: 'public', + from: 'css/app.css', + to: 'css/app.css', + flatten: true + }, { + context: 'public', + from: 'css/material.orange-blue.min.css', + to: 'css/material.orange-blue.min.css', + flatten: true + }, { + context: 'node_modules', + from: 'material-design-icons/iconfont/', + to: 'css/iconfont/', + flatten: true + }, { + context: 'node_modules', + from: 'flag-icon-css/css/flag-icon.min.css', + to: 'css/flag-icon.min.css', + flatten: true + }, { + context: 'public', + from: 'fonts', + to: 'css', + flatten: true + }, { + context: 'public', + from: 'js/typedarray.js', + to: 'js/typedarray.js', + flatten: true + }, { + context: 'public', + from: 'js/Blob.js', + to: 'js/Blob.js', + flatten: true + }, { + context: 'public', + from: 'js/formdata.js', + to: 'js/formdata.js', + flatten: true + }, { + context: 'public', + from: 'js/promisePolyfill.js', + to: 'js/promisePolyfill.js', + flatten: true + }, { + context: 'public', + from: 'css/muli-font.css', + to: 'css/muli-font.css', + flatten: true + } + ]), new webpack.optimize.CommonsChunkPlugin({ diff --git a/demo-shell-ng2/index.html b/demo-shell-ng2/index.html index 984baef300..cc047ded14 100644 --- a/demo-shell-ng2/index.html +++ b/demo-shell-ng2/index.html @@ -5,15 +5,36 @@ Demo Application - Angular 2 + - - + + + + + + + + - -