diff --git a/app/helpers.php b/app/helpers.php index a7d9e0ac..7293465c 100644 --- a/app/helpers.php +++ b/app/helpers.php @@ -57,7 +57,7 @@ if (! function_exists('webpack_assets')) { if (app()->environment('development')) { return "http://127.0.0.1:8080/public/$relativeUri"; } else { - return url("public/$relativeUri"); + return url("app/$relativeUri"); } } } diff --git a/config/options.php b/config/options.php index 544deaad..83031f1e 100644 --- a/config/options.php +++ b/config/options.php @@ -12,7 +12,7 @@ return [ 'api_type' => 'false', 'announcement' => 'Welcome to Blessing Skin {version}!', 'color_scheme' => 'skin-blue', - 'home_pic_url' => './public/bg.jpg', + 'home_pic_url' => './app/bg.jpg', 'custom_css' => '', 'custom_js' => '', 'player_name_rule' => 'official', @@ -42,5 +42,5 @@ return [ 'plugins_enabled' => '', 'copyright_prefer' => '0', 'score_per_closet_item' => '0', - 'favicon_url' => 'public/favicon.ico' + 'favicon_url' => 'app/favicon.ico' ]; diff --git a/package.json b/package.json index 2c0a9131..ffed284b 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "private": true, "scripts": { "dev": "webpack-serve", - "build": "rimraf public && node scripts/build", + "build": "rimraf public/app && node scripts/build", "lint": "eslint --ext=.js,.vue -f=beauty .", "test": "jest", "codecov": "codecov -F js", diff --git a/resources/assets/src/js/public-path.js b/resources/assets/src/js/public-path.js index a8fe193c..67899254 100644 --- a/resources/assets/src/js/public-path.js +++ b/resources/assets/src/js/public-path.js @@ -1,4 +1,4 @@ // eslint-disable-next-line no-undef __webpack_public_path__ = process.env.NODE_ENV === 'development' - ? 'http://127.0.0.1:8080/public/' - : blessing.base_url + '/public/'; + ? 'http://127.0.0.1:8080/' + : blessing.base_url + '/app/'; diff --git a/resources/views/common/dependencies/script.blade.php b/resources/views/common/dependencies/script.blade.php index b763ebf9..d6b4c999 100644 --- a/resources/views/common/dependencies/script.blade.php +++ b/resources/views/common/dependencies/script.blade.php @@ -1,10 +1,10 @@ -@if (file_exists(public_path($path = 'langs/'.config('app.locale').'.js'))) - +@if (file_exists(public_path($path = 'app/langs/'.config('app.locale').'.js'))) + @if (file_exists(resource_path($path = 'lang/overrides/'.config('app.locale').'/locale.js'))) @endif @else - + @if (file_exists(resource_path($path = 'lang/overrides/'.config('app.fallback_locale').'/locale.js'))) @endif diff --git a/webpack.config.js b/webpack.config.js index 8c75ef52..0c095114 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -29,7 +29,7 @@ const config = { 'langs/zh_CN': './resources/lang/zh_CN/front-end.js', }, output: { - path: __dirname + '/public', + path: __dirname + '/public/app', filename: '[name].js', chunkFilename: devMode ? '[id].js'