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 00beff23cc..073c2a29f7 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 require('script!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 2f6e28adb0..72748499ed 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: { @@ -106,8 +106,116 @@ module.exports = { plugins: [ + new webpack.WatchIgnorePlugin([ + ...alfrescoLibsModules, + ...alfrescoLibsSources + ]), + 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 @@