mirror of
https://github.com/Poniverse/Pony.fm.git
synced 2024-11-24 22:18:00 +01:00
Merge branch 'feature-remote-dev' of https://github.com/Poniverse/Pony.fm
merged: simple config changes to enable a remote development install
This commit is contained in:
commit
1a77341ce2
3 changed files with 10 additions and 5 deletions
|
@ -33,14 +33,14 @@ class Assets
|
|||
|
||||
foreach ($scripts as $filename) {
|
||||
if (Config::get('app.debug') && $filename !== 'templates.js') {
|
||||
$scriptTags .= "<script src='http://localhost:61999/build/scripts/{$filename}'></script>";
|
||||
$scriptTags .= "<script src='" . env('APP_URL') . ":61999/build/scripts/{$filename}'></script>";
|
||||
} else {
|
||||
$scriptTags .= "<script src='/build/scripts/{$filename}?" . filemtime(public_path("build/scripts/{$filename}")) . "'></script>";
|
||||
}
|
||||
}
|
||||
|
||||
if (Config::get('app.debug')) {
|
||||
$scriptTags .= '<script src="http://localhost:61999/webpack-dev-server.js"></script>';
|
||||
$scriptTags .= '<script src="' . env('APP_URL') . ':61999/webpack-dev-server.js"></script>';
|
||||
}
|
||||
|
||||
return $scriptTags;
|
||||
|
|
|
@ -69,12 +69,12 @@ gulp.task("webpack-dev-server", function () {
|
|||
|
||||
new WebpackDevServer(compiler, {
|
||||
// server and middleware options, currently blank
|
||||
}).listen(61999, "localhost", function (err) {
|
||||
}).listen(webpackDevConfig.devPort, webpackDevConfig.devHost, function (err) {
|
||||
if (err)
|
||||
throw new gutil.PluginError("webpack-dev-server", err);
|
||||
|
||||
// Server listening
|
||||
gutil.log("[webpack-dev-server]", "http://localhost:61999/webpack-dev-server/index.html");
|
||||
gutil.log("[webpack-dev-server]", webpackDevConfig.devUrl + "/webpack-dev-server/index.html");
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -6,7 +6,12 @@ var webpackBaseConfig = require('./webpack.base.config.js');
|
|||
var config = _.clone(webpackBaseConfig);
|
||||
|
||||
config.devtool = 'eval-source-map';
|
||||
config.output.publicPath = 'http://localhost:61999/build/';
|
||||
|
||||
config.devHost = 'localhost';
|
||||
config.devPort = '6199';
|
||||
config.devUrl = 'http://' + config.devHost + ':' + (config.devPort == '80' ? '' : config.devPort);
|
||||
|
||||
config.output.publicPath = config.devUrl + '/build/';
|
||||
|
||||
|
||||
module.exports = config;
|
||||
|
|
Loading…
Reference in a new issue