mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
fix issues with standalone build
This commit is contained in:
parent
fa5e1feaab
commit
3958548b1f
3 changed files with 13 additions and 13 deletions
|
@ -23,8 +23,8 @@ jobs:
|
||||||
matrix:
|
matrix:
|
||||||
Development:
|
Development:
|
||||||
BuildConfiguration: development
|
BuildConfiguration: development
|
||||||
Bundle:
|
Production:
|
||||||
BuildConfiguration: bundle
|
BuildConfiguration: production
|
||||||
Standalone:
|
Standalone:
|
||||||
BuildConfiguration: standalone
|
BuildConfiguration: standalone
|
||||||
maxParallel: 3
|
maxParallel: 3
|
||||||
|
@ -50,9 +50,9 @@ jobs:
|
||||||
displayName: 'Build Development'
|
displayName: 'Build Development'
|
||||||
condition: eq(variables['BuildConfiguration'], 'development')
|
condition: eq(variables['BuildConfiguration'], 'development')
|
||||||
|
|
||||||
- script: 'yarn build:bundle'
|
- script: 'yarn build:production'
|
||||||
displayName: 'Build Bundle'
|
displayName: 'Build Bundle'
|
||||||
condition: eq(variables['BuildConfiguration'], 'bundle')
|
condition: eq(variables['BuildConfiguration'], 'production')
|
||||||
|
|
||||||
- script: 'yarn build:standalone'
|
- script: 'yarn build:standalone'
|
||||||
displayName: 'Build Standalone'
|
displayName: 'Build Standalone'
|
||||||
|
|
12
gulpfile.js
12
gulpfile.js
|
@ -10,7 +10,7 @@ const htmlmin = require('gulp-htmlmin');
|
||||||
const imagemin = require('gulp-imagemin');
|
const imagemin = require('gulp-imagemin');
|
||||||
const sourcemaps = require('gulp-sourcemaps');
|
const sourcemaps = require('gulp-sourcemaps');
|
||||||
const mode = require('gulp-mode')({
|
const mode = require('gulp-mode')({
|
||||||
modes: ["development", "bundle", "standalone"],
|
modes: ["development", "production"],
|
||||||
default: "development",
|
default: "development",
|
||||||
verbose: false
|
verbose: false
|
||||||
});
|
});
|
||||||
|
@ -22,7 +22,7 @@ const sass = require('gulp-sass');
|
||||||
sass.compiler = require('node-sass')
|
sass.compiler = require('node-sass')
|
||||||
|
|
||||||
|
|
||||||
if (mode.bundle() || mode.standalone()) {
|
if (mode.production()) {
|
||||||
var config = require('./webpack.prod.js');
|
var config = require('./webpack.prod.js');
|
||||||
} else {
|
} else {
|
||||||
var config = require('./webpack.dev.js');
|
var config = require('./webpack.dev.js');
|
||||||
|
@ -91,15 +91,14 @@ function css() {
|
||||||
|
|
||||||
function html() {
|
function html() {
|
||||||
return src(['src/**/*.html', '!src/index.html'], { base: './src/' })
|
return src(['src/**/*.html', '!src/index.html'], { base: './src/' })
|
||||||
.pipe(mode.bundle(htmlmin({ collapseWhitespace: true })))
|
.pipe(mode.production(htmlmin({ collapseWhitespace: true })))
|
||||||
.pipe(mode.standalone(htmlmin({ collapseWhitespace: true })))
|
|
||||||
.pipe(dest('dist/'))
|
.pipe(dest('dist/'))
|
||||||
.pipe(browserSync.stream());
|
.pipe(browserSync.stream());
|
||||||
}
|
}
|
||||||
|
|
||||||
function images() {
|
function images() {
|
||||||
return src(['src/**/*.png', 'src/**/*.jpg', 'src/**/*.gif', 'src/**/*.svg'], { base: './src/' })
|
return src(['src/**/*.png', 'src/**/*.jpg', 'src/**/*.gif', 'src/**/*.svg'], { base: './src/' })
|
||||||
.pipe(imagemin())
|
.pipe(mode.production(imagemin()))
|
||||||
.pipe(dest('dist/'))
|
.pipe(dest('dist/'))
|
||||||
.pipe(browserSync.stream());
|
.pipe(browserSync.stream());
|
||||||
}
|
}
|
||||||
|
@ -120,4 +119,5 @@ function injectBundle() {
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.default = series(clean, parallel(javascript, webpack, css, html, images, copy), injectBundle)
|
exports.default = series(clean, parallel(javascript, webpack, css, html, images, copy), injectBundle)
|
||||||
exports.serve = series(exports.default, standalone, serve)
|
exports.standalone = series(exports.default, standalone)
|
||||||
|
exports.serve = series(exports.standalone, serve)
|
||||||
|
|
|
@ -90,10 +90,10 @@
|
||||||
],
|
],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"serve": "gulp serve",
|
"serve": "gulp serve",
|
||||||
"prepare": "gulp --bundle",
|
"prepare": "gulp --production",
|
||||||
"build:development": "gulp --development",
|
"build:development": "gulp --development",
|
||||||
"build:bundle": "gulp --bundle",
|
"build:production": "gulp --production",
|
||||||
"build:standalone": "gulp --standalone",
|
"build:standalone": "gulp standalone --development",
|
||||||
"lint": "eslint \"src\"",
|
"lint": "eslint \"src\"",
|
||||||
"stylelint": "stylelint \"src/**/*.css\""
|
"stylelint": "stylelint \"src/**/*.css\""
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue