mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-16 02:18:16 -07:00
Merge pull request #2242 from thornbill/fix-prepare-script-windows
Replace bash prepare script with node version
This commit is contained in:
commit
898704d9b0
@ -101,7 +101,7 @@
|
||||
"scripts": {
|
||||
"start": "yarn serve",
|
||||
"serve": "webpack serve --config webpack.dev.js",
|
||||
"prepare": "./scripts/prepare.sh",
|
||||
"prepare": "node ./scripts/prepare.js",
|
||||
"build:development": "webpack --config webpack.dev.js",
|
||||
"build:production": "webpack --config webpack.prod.js",
|
||||
"lint": "eslint \"src/\"",
|
||||
|
12
scripts/prepare.js
Executable file
12
scripts/prepare.js
Executable file
@ -0,0 +1,12 @@
|
||||
const { execSync } = require('child_process');
|
||||
|
||||
/**
|
||||
* The npm `prepare` script needs to run a build to support installing
|
||||
* a package from git repositories (this is dumb but a limitation of how
|
||||
* npm behaves). We don't want to run these in CI though because
|
||||
* building is slow so this script will skip the build when the
|
||||
* `SKIP_PREPARE` environment variable has been set.
|
||||
*/
|
||||
if (!process.env.SKIP_PREPARE) {
|
||||
execSync('webpack --config webpack.prod.js', { stdio: 'inherit' });
|
||||
}
|
@ -1,5 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if [ -z "${SKIP_PREPARE}" ]; then
|
||||
webpack --config webpack.prod.js
|
||||
fi
|
Loading…
Reference in New Issue
Block a user