From 0aefed70c877db39aa740f05abd96a0e181e8c32 Mon Sep 17 00:00:00 2001 From: Gunther Brunner Date: Fri, 27 Jun 2014 19:34:17 +0900 Subject: [PATCH] Moved some multiple-entry shimmings to web_modules, because Bower specs about main are still not finished, and webpack doesn't support multiple entry-aliases neither yet. Also making custom css/overriding them becomes easier. --- bower.json | 6 ++++-- res/app/app.js | 5 +++-- res/app/components/stf/common-ui/notifications/index.js | 3 +-- res/web_modules/angular-growl/index.js | 3 +++ res/web_modules/angular-hotkeys/index.js | 2 ++ res/web_modules/ng-file-upload/index.js | 2 ++ webpack.config.js | 6 +----- 7 files changed, 16 insertions(+), 11 deletions(-) create mode 100644 res/web_modules/angular-growl/index.js create mode 100644 res/web_modules/angular-hotkeys/index.js create mode 100644 res/web_modules/ng-file-upload/index.js diff --git a/bower.json b/bower.json index 0f29e77f..6d311428 100644 --- a/bower.json +++ b/bower.json @@ -40,12 +40,14 @@ "angular-elastic": "~2.3.4", "quick-ng-repeat": "~0.0.1", "angular-vs-repeat": "~1.0.0-rc2", - "checklist-model": "~0.1.3" + "checklist-model": "~0.1.3", + "angular-hotkeys": "chieffancypants/angular-hotkeys#~1.3.1" }, "private": true, "resolutions": { "angular": "~1.3.0-beta.13", "angular-sanitize": "~1.3.0-beta.13", - "angular-touch": "~1.3.0-beta.13" + "angular-touch": "~1.3.0-beta.13", + "angular-hotkeys": "~1.3.1" } } diff --git a/res/app/app.js b/res/app/app.js index 7e9cb754..40804912 100644 --- a/res/app/app.js +++ b/res/app/app.js @@ -3,14 +3,15 @@ require('angular-route') require('angular-touch') require('angular-gettext') -require('ng-file-upload-shim5') -require('ng-file-upload-main') +require('ng-file-upload') +require('angular-hotkeys') angular.module('app', [ 'ngRoute', 'ngTouch', 'gettext', 'angularFileUpload', + 'cfp.hotkeys', require('./layout').name, require('./device-list').name, require('./control-panes').name, diff --git a/res/app/components/stf/common-ui/notifications/index.js b/res/app/components/stf/common-ui/notifications/index.js index 0bcd62b8..cf2328b2 100644 --- a/res/app/components/stf/common-ui/notifications/index.js +++ b/res/app/components/stf/common-ui/notifications/index.js @@ -1,7 +1,6 @@ require('angular-animate') -//require('angular-growl-v2/build/angular-growl.min.css') require('./growl.css') -require('angular-growl-v2/build/angular-growl.js') +require('angular-growl') module.exports = angular.module('stf/common-ui/notifications', [ 'ngAnimate', diff --git a/res/web_modules/angular-growl/index.js b/res/web_modules/angular-growl/index.js new file mode 100644 index 00000000..e4ad176b --- /dev/null +++ b/res/web_modules/angular-growl/index.js @@ -0,0 +1,3 @@ +require('angular-growl-v2/build/angular-growl.js') +// Using custom CSS +//require('angular-growl-v2/build/angular-growl.min.css') diff --git a/res/web_modules/angular-hotkeys/index.js b/res/web_modules/angular-hotkeys/index.js new file mode 100644 index 00000000..afc6f44d --- /dev/null +++ b/res/web_modules/angular-hotkeys/index.js @@ -0,0 +1,2 @@ +require('angular-hotkeys/build/hotkeys.css') +require('angular-hotkeys/build/hotkeys.js') diff --git a/res/web_modules/ng-file-upload/index.js b/res/web_modules/ng-file-upload/index.js new file mode 100644 index 00000000..cd252ef3 --- /dev/null +++ b/res/web_modules/ng-file-upload/index.js @@ -0,0 +1,2 @@ +require('ng-file-upload/angular-file-upload-html5-shim') +require('ng-file-upload/angular-file-upload') diff --git a/webpack.config.js b/webpack.config.js index ecb099a7..115ee968 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -16,18 +16,14 @@ module.exports = { modulesDirectories: [ pathutil.resource('bower_components') , pathutil.resource('app/components') - , 'web_modules' + , pathutil.resource('web_modules') , './node_modules' ] , alias: { 'angular-bootstrap': 'angular-bootstrap/ui-bootstrap-tpls' - , 'angular-growl': 'angular-growl-v2/build/angular-growl.js' - , 'angular-growl-css': 'angular-growl-v2/build/angular-growl.min.css' , 'localforage': 'localforage/dist/localforage.js' , 'socket.io': 'socket.io-client/socket.io.js' , 'oboe': 'oboe/dist/oboe-browser' - , 'ng-file-upload-shim5': 'ng-file-upload/angular-file-upload-html5-shim' - , 'ng-file-upload-main': 'ng-file-upload/angular-file-upload' , 'bluebird': 'bluebird/js/browser/bluebird' } }