rename production to release directory, rebuild assets
|
@ -11,7 +11,6 @@ site/
|
|||
**/access.log
|
||||
vendor/**/*.js
|
||||
vendor/**/*.json
|
||||
release
|
||||
.DS_Store
|
||||
*.syso
|
||||
coverage.txt
|
||||
|
|
|
@ -12,7 +12,6 @@ site/
|
|||
build
|
||||
vendor/**/*.js
|
||||
vendor/**/*.json
|
||||
release
|
||||
.DS_Store
|
||||
*.syso
|
||||
coverage.txt
|
||||
|
|
|
@ -19,11 +19,13 @@ npm install
|
|||
|
||||
## 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
|
||||
npm run release
|
||||
```
|
||||
|
||||
This generates `production` in the current directory.
|
||||
This generates `release` in the current directory.
|
||||
|
||||
|
||||
## 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.
|
||||
|
||||
|
|
|
@ -17,6 +17,17 @@
|
|||
* 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)
|
||||
|
||||
export default hideLoader
|
||||
|
|
|
@ -2,7 +2,7 @@ package browser
|
|||
|
||||
import "embed"
|
||||
|
||||
//go:embed production/*
|
||||
//go:embed release/*
|
||||
var fs embed.FS
|
||||
|
||||
// GetStaticAssets returns assets
|
||||
|
|
|
@ -39,7 +39,7 @@ rmDir = function(dirPath) {
|
|||
|
||||
async.waterfall([
|
||||
function(cb) {
|
||||
rmDir('production');
|
||||
rmDir('release');
|
||||
rmDir('dev');
|
||||
var cmd = 'webpack -p --config webpack.production.config.js'
|
||||
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 = {
|
||||
context: __dirname,
|
||||
mode: 'production',
|
||||
mode: 'release',
|
||||
entry: [
|
||||
path.resolve(__dirname, 'app/index.js')
|
||||
],
|
||||
output: {
|
||||
path: path.resolve(__dirname, 'production'),
|
||||
path: path.resolve(__dirname, 'release'),
|
||||
filename: 'index_bundle.js'
|
||||
},
|
||||
module: {
|
||||
|
|
|
@ -47,7 +47,7 @@ func (h indexHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
|||
h.handler.ServeHTTP(w, r)
|
||||
}
|
||||
|
||||
const assetPrefix = "production"
|
||||
const assetPrefix = "release"
|
||||
|
||||
// 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"
|
||||
|
|