rename production to release directory, rebuild assets
|
@ -11,7 +11,6 @@ site/
|
||||||
**/access.log
|
**/access.log
|
||||||
vendor/**/*.js
|
vendor/**/*.js
|
||||||
vendor/**/*.json
|
vendor/**/*.json
|
||||||
release
|
|
||||||
.DS_Store
|
.DS_Store
|
||||||
*.syso
|
*.syso
|
||||||
coverage.txt
|
coverage.txt
|
||||||
|
|
|
@ -12,7 +12,6 @@ site/
|
||||||
build
|
build
|
||||||
vendor/**/*.js
|
vendor/**/*.js
|
||||||
vendor/**/*.json
|
vendor/**/*.json
|
||||||
release
|
|
||||||
.DS_Store
|
.DS_Store
|
||||||
*.syso
|
*.syso
|
||||||
coverage.txt
|
coverage.txt
|
||||||
|
|
|
@ -19,11 +19,13 @@ npm install
|
||||||
|
|
||||||
## Generating Assets
|
## Generating Assets
|
||||||
|
|
||||||
|
> NOTE: if you are not part of MinIO organization please do not run this yourself and submit in a PR. Static assets in PRs are allowed only for authorized users.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
npm run release
|
npm run release
|
||||||
```
|
```
|
||||||
|
|
||||||
This generates `production` in the current directory.
|
This generates `release` in the current directory.
|
||||||
|
|
||||||
|
|
||||||
## Run MinIO Browser with live reload
|
## Run MinIO Browser with live reload
|
||||||
|
@ -166,4 +168,3 @@ npm run dev
|
||||||
```
|
```
|
||||||
|
|
||||||
Open [http://IP:8080/minio/](http://IP:8080/minio/) in your browser to play with the application.
|
Open [http://IP:8080/minio/](http://IP:8080/minio/) in your browser to play with the application.
|
||||||
|
|
||||||
|
|
|
@ -17,6 +17,17 @@
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
let delay = [0, 400]
|
||||||
|
|
||||||
|
function handleLoader(i) {
|
||||||
|
if (i < 2) {
|
||||||
|
setTimeout(function() {
|
||||||
|
document.querySelector(".page-load").classList.add("pl-" + i)
|
||||||
|
handleLoader(i + 1)
|
||||||
|
}, delay[i])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const hideLoader = () => handleLoader(0)
|
const hideLoader = () => handleLoader(0)
|
||||||
|
|
||||||
export default hideLoader
|
export default hideLoader
|
||||||
|
|
|
@ -2,7 +2,7 @@ package browser
|
||||||
|
|
||||||
import "embed"
|
import "embed"
|
||||||
|
|
||||||
//go:embed production/*
|
//go:embed release/*
|
||||||
var fs embed.FS
|
var fs embed.FS
|
||||||
|
|
||||||
// GetStaticAssets returns assets
|
// GetStaticAssets returns assets
|
||||||
|
|
|
@ -39,7 +39,7 @@ rmDir = function(dirPath) {
|
||||||
|
|
||||||
async.waterfall([
|
async.waterfall([
|
||||||
function(cb) {
|
function(cb) {
|
||||||
rmDir('production');
|
rmDir('release');
|
||||||
rmDir('dev');
|
rmDir('dev');
|
||||||
var cmd = 'webpack -p --config webpack.production.config.js'
|
var cmd = 'webpack -p --config webpack.production.config.js'
|
||||||
if (!isProduction) {
|
if (!isProduction) {
|
||||||
|
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.6 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 4.7 KiB |
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.9 KiB |
|
@ -25,12 +25,12 @@ var PurgecssPlugin = require('purgecss-webpack-plugin')
|
||||||
|
|
||||||
var exports = {
|
var exports = {
|
||||||
context: __dirname,
|
context: __dirname,
|
||||||
mode: 'production',
|
mode: 'release',
|
||||||
entry: [
|
entry: [
|
||||||
path.resolve(__dirname, 'app/index.js')
|
path.resolve(__dirname, 'app/index.js')
|
||||||
],
|
],
|
||||||
output: {
|
output: {
|
||||||
path: path.resolve(__dirname, 'production'),
|
path: path.resolve(__dirname, 'release'),
|
||||||
filename: 'index_bundle.js'
|
filename: 'index_bundle.js'
|
||||||
},
|
},
|
||||||
module: {
|
module: {
|
||||||
|
|
|
@ -47,7 +47,7 @@ func (h indexHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||||
h.handler.ServeHTTP(w, r)
|
h.handler.ServeHTTP(w, r)
|
||||||
}
|
}
|
||||||
|
|
||||||
const assetPrefix = "production"
|
const assetPrefix = "release"
|
||||||
|
|
||||||
// specialAssets are files which are unique files not embedded inside index_bundle.js.
|
// specialAssets are files which are unique files not embedded inside index_bundle.js.
|
||||||
const specialAssets = "index_bundle.*.js|loader.css|logo.svg|firefox.png|safari.png|chrome.png|favicon-16x16.png|favicon-32x32.png|favicon-96x96.png"
|
const specialAssets = "index_bundle.*.js|loader.css|logo.svg|firefox.png|safari.png|chrome.png|favicon-16x16.png|favicon-32x32.png|favicon-96x96.png"
|
||||||
|
|