From 4120bb6063d277179a86a1b9cea6caae3aa676ba Mon Sep 17 00:00:00 2001 From: Anike Arni Date: Wed, 28 Dec 2016 15:10:46 -0200 Subject: Bundles local files that were previously in script tags with webpack for optimization --- web-ui/app/index.html | 2 -- web-ui/app/js/index.js | 5 ++++- web-ui/config/package.sh | 2 -- web-ui/webpack.config.js | 4 +++- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/web-ui/app/index.html b/web-ui/app/index.html index 941d3a21..b1b77b3a 100644 --- a/web-ui/app/index.html +++ b/web-ui/app/index.html @@ -98,13 +98,11 @@ - - diff --git a/web-ui/app/js/index.js b/web-ui/app/js/index.js index 690c086b..8ec2eeab 100644 --- a/web-ui/app/js/index.js +++ b/web-ui/app/js/index.js @@ -1,3 +1,7 @@ +import 'js/foundation/initialize_foundation'; +import 'js/lib/highlightRegex'; +import 'js/monkey_patching/all'; + import compose from 'flight/lib/compose'; import registry from 'flight/lib/registry'; import advice from 'flight/lib/advice'; @@ -5,7 +9,6 @@ import withLogging from 'flight/lib/logger'; import debug from 'flight/lib/debug'; import events from 'page/events'; import initializeDefault from 'page/default'; -import 'js/monkey_patching/all'; window.Pixelated = window.Pixelated || {}; window.Pixelated.events = events; diff --git a/web-ui/config/package.sh b/web-ui/config/package.sh index 165eeff3..ad4a3895 100644 --- a/web-ui/config/package.sh +++ b/web-ui/config/package.sh @@ -52,13 +52,11 @@ app/bower_components/lodash/dist/lodash.js \ app/bower_components/jquery/dist/jquery.js \ app/bower_components/jquery-ui/jquery-ui.js \ app/bower_components/jquery-file-upload/js/jquery.fileupload.js \ -app/js/lib/highlightRegex.js \ app/bower_components/handlebars/handlebars.js \ app/bower_components/typeahead.js/dist/typeahead.bundle.js \ app/bower_components/foundation/js/foundation.js \ app/bower_components/foundation/js/foundation/foundation.reveal.js \ app/bower_components/foundation/js/foundation/foundation.offcanvas.js \ -app/js/foundation/initialize_foundation.js \ app/bower_components/iframe-resizer/js/iframeResizer.js \ .tmp/app.concatenated.js > dist/app.js node_modules/.bin/minify dist/app.js > dist/app.min.js diff --git a/web-ui/webpack.config.js b/web-ui/webpack.config.js index e03f453a..7bacee4a 100644 --- a/web-ui/webpack.config.js +++ b/web-ui/webpack.config.js @@ -1,10 +1,12 @@ var path = require('path'); +var webpack = require('webpack'); var CopyWebpackPlugin = require('copy-webpack-plugin'); module.exports = { entry: './app/js/index.js', + node: { fs: 'empty' }, output: { - path: path.join(__dirname, '/dist/js/'), + path: path.join(__dirname, '/app/js/'), filename: 'bundle.js', publicPath: '/assets/js/' }, -- cgit v1.2.3