mirror of
https://github.com/EmulatorJS/EmulatorJS.git
synced 2026-02-06 11:17:36 +00:00
Update Project Scripts
This commit is contained in:
parent
e150dc0491
commit
6161d7f140
@ -13,3 +13,4 @@ data/cores/*
|
||||
minify/
|
||||
.npmignore
|
||||
.gitignore
|
||||
roms/
|
||||
|
||||
@ -12,6 +12,30 @@ Donate to: [EmulatorJS](https://www.patreon.com/EmulatorJS)
|
||||
|
||||
Donate to: [libretro](https://retroarch.com/index.php?page=donate)
|
||||
|
||||
## Project Scripts
|
||||
|
||||
The project has several scripts that can be used to help with updating and deploying the project.
|
||||
|
||||
### Build Script
|
||||
|
||||
Runs the build script, which will compresses the project in 7z and zip output in dist/ folder. Note: Make sure you have the compiled cores in the `data/cores` folder before running this script.
|
||||
|
||||
```bash
|
||||
npm run build
|
||||
```
|
||||
|
||||
### Update Script
|
||||
|
||||
Runs the update script, which updates dependencies and can change version number of project. It also will update the list of contributors.
|
||||
|
||||
```bash
|
||||
npm run update # Just updates contributors list
|
||||
npm run update -- --ejs_v=4.3.1 # Updates contributors list and sets version to 4.3.1
|
||||
npm run update -- --deps=true # Updates contributors list and updates dependencies
|
||||
npm run update -- --dev=true # Updates contributors list and enables dev mode
|
||||
npm run update -- --dev=false # Updates contributors list and disables dev mode
|
||||
```
|
||||
|
||||
## Attention Visual Studio Code Users
|
||||
|
||||
By default Visual Studio Code will apply formatting that is not consistent with the standard formatting used by this project.
|
||||
|
||||
@ -5,6 +5,7 @@ import fetch from 'node-fetch';
|
||||
const args = process.argv.slice(2);
|
||||
const versionArg = args.find(arg => arg.startsWith('--ejs_v='));
|
||||
const devArg = args.find(arg => arg.startsWith('--dev='));
|
||||
const depsArg = args.find(arg => arg.startsWith('--deps='));
|
||||
const update_version = versionArg ? versionArg.split('=')[1] : process.env.ejs_v;
|
||||
const dev = devArg ? devArg.split('=')[1] : null;
|
||||
let version;
|
||||
@ -117,7 +118,9 @@ if (!update_version) {
|
||||
}
|
||||
|
||||
console.log("Updating EmulatorJS dependencies...");
|
||||
if (depsArg) {
|
||||
await updateDependencies();
|
||||
}
|
||||
if (update_version || dev === "false" || dev === "true") {
|
||||
console.log("Updating EmulatorJS version...");
|
||||
await updateVersion(update_version || version);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user