From 28ec0e1b954ab7d65bcaea7a5918017b38d3b00a Mon Sep 17 00:00:00 2001 From: soralee Date: Thu, 12 Jan 2017 17:54:58 +0900 Subject: [PATCH 1/4] change zeppelin log path --- zeppelin-web/src/app/home/home.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zeppelin-web/src/app/home/home.css b/zeppelin-web/src/app/home/home.css index a0e4a6d32ce..bf88e559aa6 100644 --- a/zeppelin-web/src/app/home/home.css +++ b/zeppelin-web/src/app/home/home.css @@ -381,13 +381,13 @@ a.navbar-brand:hover { } .zeppelin { - background: url('../assets/images/zepLogo.png') no-repeat right; + background: url('/assets/images/zepLogo.png') no-repeat right; height: 380px; opacity: 0.2; } .zeppelin2 { - background: url('../assets/images/zepLogo.png') no-repeat right; + background: url('/assets/images/zepLogo.png') no-repeat right; background-position-y: 12px; height: 380px; opacity: 0.2; From a09b8fedd58efae563f397029d482fae01b534ef Mon Sep 17 00:00:00 2001 From: soralee Date: Wed, 18 Jan 2017 16:43:50 +0900 Subject: [PATCH 2/4] web dev mode enable context path --- zeppelin-web/src/app/home/home.css | 4 ++-- zeppelin-web/webpack.config.js | 13 +++++++++---- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/zeppelin-web/src/app/home/home.css b/zeppelin-web/src/app/home/home.css index bf88e559aa6..a0e4a6d32ce 100644 --- a/zeppelin-web/src/app/home/home.css +++ b/zeppelin-web/src/app/home/home.css @@ -381,13 +381,13 @@ a.navbar-brand:hover { } .zeppelin { - background: url('/assets/images/zepLogo.png') no-repeat right; + background: url('../assets/images/zepLogo.png') no-repeat right; height: 380px; opacity: 0.2; } .zeppelin2 { - background: url('/assets/images/zepLogo.png') no-repeat right; + background: url('../assets/images/zepLogo.png') no-repeat right; background-position-y: 12px; height: 380px; opacity: 0.2; diff --git a/zeppelin-web/webpack.config.js b/zeppelin-web/webpack.config.js index 8198b5530aa..7d8ef2ec70c 100644 --- a/zeppelin-web/webpack.config.js +++ b/zeppelin-web/webpack.config.js @@ -163,7 +163,8 @@ module.exports = function makeWebpackConfig () { // Pass along the updated reference to your code // You can add here any file extension you want to get copied to your output test: /\.(png|jpg|jpeg|gif|svg|woff|woff2|ttf|eot)$/, - loader: 'file' + //loader: 'file' + loader: 'file-loader?name=[name].[ext]&outputPath=styles/images/' }, { // HTML LOADER // Reference: https://github.com/webpack/raw-loader @@ -267,9 +268,13 @@ module.exports = function makeWebpackConfig () { progress: true, contentBase: './src', setup: function(app) { - app.use( - '/bower_components/', - require('express').static(path.join(__dirname, './bower_components/'))); + app.use('**/bower_components/', + require('express').static(path.resolve(__dirname, './bower_components/'))); + app.use('**/app/', require('express').static(path.resolve(__dirname, './src/app/'))); + app.use('**/assets/', require('express').static(path.resolve(__dirname, './src/assets/'))); + app.use('**/fonts/', require('express').static(path.resolve(__dirname, './src/fonts/'))); + app.use('**/components/', + require('express').static(path.resolve(__dirname, './src/components/'))); }, stats: 'minimal', }; From 41b4be6f41a376db8e86115a953f20dfac941ee8 Mon Sep 17 00:00:00 2001 From: soralee Date: Wed, 18 Jan 2017 17:41:44 +0900 Subject: [PATCH 3/4] web dev mode enable context path --- zeppelin-web/webpack.config.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/zeppelin-web/webpack.config.js b/zeppelin-web/webpack.config.js index 7d8ef2ec70c..b41c6e89142 100644 --- a/zeppelin-web/webpack.config.js +++ b/zeppelin-web/webpack.config.js @@ -163,8 +163,7 @@ module.exports = function makeWebpackConfig () { // Pass along the updated reference to your code // You can add here any file extension you want to get copied to your output test: /\.(png|jpg|jpeg|gif|svg|woff|woff2|ttf|eot)$/, - //loader: 'file' - loader: 'file-loader?name=[name].[ext]&outputPath=styles/images/' + loader: 'file' }, { // HTML LOADER // Reference: https://github.com/webpack/raw-loader From 78198710b42332fa0d5f5005a98536c5956e3aba Mon Sep 17 00:00:00 2001 From: soralee Date: Thu, 2 Feb 2017 16:47:38 +0900 Subject: [PATCH 4/4] extract variable express --- zeppelin-web/webpack.config.js | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/zeppelin-web/webpack.config.js b/zeppelin-web/webpack.config.js index b41c6e89142..f9aa0ed0e33 100644 --- a/zeppelin-web/webpack.config.js +++ b/zeppelin-web/webpack.config.js @@ -28,6 +28,7 @@ var InsertLiveReloadPlugin = function InsertLiveReloadPlugin(options) { this.port = this.options.port || 35729; this.hostname = this.options.hostname || 'localhost'; } +var express = require('express'); InsertLiveReloadPlugin.prototype.autoloadJs = function autoloadJs() { return @@ -267,13 +268,11 @@ module.exports = function makeWebpackConfig () { progress: true, contentBase: './src', setup: function(app) { - app.use('**/bower_components/', - require('express').static(path.resolve(__dirname, './bower_components/'))); - app.use('**/app/', require('express').static(path.resolve(__dirname, './src/app/'))); - app.use('**/assets/', require('express').static(path.resolve(__dirname, './src/assets/'))); - app.use('**/fonts/', require('express').static(path.resolve(__dirname, './src/fonts/'))); - app.use('**/components/', - require('express').static(path.resolve(__dirname, './src/components/'))); + app.use('**/bower_components/', express.static(path.resolve(__dirname, './bower_components/'))); + app.use('**/app/', express.static(path.resolve(__dirname, './src/app/'))); + app.use('**/assets/', express.static(path.resolve(__dirname, './src/assets/'))); + app.use('**/fonts/', express.static(path.resolve(__dirname, './src/fonts/'))); + app.use('**/components/', express.static(path.resolve(__dirname, './src/components/'))); }, stats: 'minimal', };