diff --git a/.npmignore b/.npmignore index 020a846..470e291 100644 --- a/.npmignore +++ b/.npmignore @@ -13,3 +13,4 @@ data/cores/* minify/ .npmignore .gitignore +roms/ diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f16d6e8..3f3e59a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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. diff --git a/update.js b/update.js index f949e7a..02ee1a7 100644 --- a/update.js +++ b/update.js @@ -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..."); -await updateDependencies(); +if (depsArg) { + await updateDependencies(); +} if (update_version || dev === "false" || dev === "true") { console.log("Updating EmulatorJS version..."); await updateVersion(update_version || version);