diff --git a/.eslintrc.json b/.eslintrc.json index a699550..b3ca88f 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -19,6 +19,7 @@ { "js": "always" } - ] + ], + "prefer-rest-params": 0 } } diff --git a/.gitignore b/.gitignore index c91d5e9..4f9dc3d 100755 --- a/.gitignore +++ b/.gitignore @@ -49,7 +49,7 @@ cypress/videos ### Ignore everything in Gaps on Windows except startup GapsOnWindows/* -!GapsOnWindows/start.bat -!GapsOnWindows/gaps.nsi +!GapsAsJar/start.bat +!GapsAsJar/gaps.nsi GapsAsJar/* diff --git a/GapsOnWindows/gaps.nsi b/GapsOnWindows/gaps.nsi deleted file mode 100644 index 6439b00..0000000 --- a/GapsOnWindows/gaps.nsi +++ /dev/null @@ -1,51 +0,0 @@ -;NSIS Gaps Installer -;Written by Jason House - -NAME "Gaps" -Caption "Gaps Installer" -Icon "..\GapsWeb\src\main\resources\static\images\gaps.ico" - -# define installer name -OutFile "installer.exe" - -# set desktop as install directory -InstallDir $PROGRAMFILES\Gaps - -RequestExecutionLevel admin - -# default section start -Section - -# define output path -SetOutPath $INSTDIR - -# specify file to go in output path -File gaps.jar -File start.bat - -# define uninstaller name -WriteUninstaller $INSTDIR\uninstaller.exe - -# default section end -SectionEnd - -Section -CreateDirectory $INSTDIR\data -SetOutPath $INSTDIR\data -File ..\movieIds.json -SectionEnd - -# create a section to define what the uninstaller does. -# the section will always be named "Uninstall" -Section "Uninstall" - -# Always delete uninstaller first -Delete $INSTDIR\uninstaller.exe - -# Delete the directory -RMDIR /r $INSTDIR\data -RMDIR /r $INSTDIR -SectionEnd - -# name the installer -OutFile "gaps-0.8.2-installer.exe" \ No newline at end of file diff --git a/GapsOnWindows/start.bat b/GapsOnWindows/start.bat deleted file mode 100644 index 9744cf5..0000000 --- a/GapsOnWindows/start.bat +++ /dev/null @@ -1,28 +0,0 @@ -@echo off - -:: BatchGotAdmin -:------------------------------------- -REM --> Check for permissions ->nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system" - -REM --> If error flag set, we do not have admin. -if '%errorlevel%' NEQ '0' ( - echo Requesting administrative privileges... - goto UACPrompt -) else ( goto gotAdmin ) - -:UACPrompt - echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs" - set params = %*:"="" - echo UAC.ShellExecute "cmd.exe", "/c %~s0 %params%", "", "runas", 1 >> "%temp%\getadmin.vbs" - - "%temp%\getadmin.vbs" - del "%temp%\getadmin.vbs" - exit /B - -:gotAdmin - pushd "%CD%" - CD /D "%~dp0" -:-------------------------------------- - -java -jar -Dspring.profiles.active=windows gaps.jar \ No newline at end of file diff --git a/build b/build index 7a4094b..45ce685 100755 --- a/build +++ b/build @@ -4,8 +4,6 @@ VERSION=0.8.2 JAR_VERSION="GapsWeb/target/GapsWeb-$VERSION.jar" ZIP_VERSION="GapsAsJar-$VERSION.zip" npm ci -eslint cypress/integration -eslint GapsWeb/src/main/resources/static/js ./minify mvn clean install docker buildx build --platform linux/s390x,linux/amd64,linux/s390x -t housewrecker/gaps:latest -f Dockerfile --push . diff --git a/build.bat b/build.bat index 38a31ee..181d59f 100644 --- a/build.bat +++ b/build.bat @@ -1,3 +1,6 @@ +call npm ci +call eslint cypress/integration +call eslint GapsWeb/src/main/resources/static/js call npm run minify-input-css call npm run uglifyjs-modules call npm run uglifyjs-pages diff --git a/buildAlpha b/buildAlpha index 9260476..ebf1e41 100755 --- a/buildAlpha +++ b/buildAlpha @@ -1,7 +1,6 @@ #!/bin/bash set -e -eslint cypress/integration -eslint GapsWeb/src/main/resources/static/js -./minify && mvn clean install +./minify +mvn clean install docker build -f Dockerfile -t "housewrecker/gaps:alpha" . docker push "housewrecker/gaps:alpha" \ No newline at end of file diff --git a/cypress/integration/common.js b/cypress/integration/common.js index a7313b4..cb83c6b 100755 --- a/cypress/integration/common.js +++ b/cypress/integration/common.js @@ -18,7 +18,7 @@ export const CYPRESS_VALUES = { beVisible: 'be.visible', }; -export function spyOnAddEventListener(win, ...args) { +export function spyOnAddEventListener(win) { const winObject = Object.assign(win); // win = window object in our application const addListener = winObject.EventTarget.prototype.addEventListener; @@ -27,7 +27,7 @@ export function spyOnAddEventListener(win, ...args) { // restore the original event listener winObject.EventTarget.prototype.addEventListener = addListener; } - return addListener.apply(this, args); + return addListener.apply(this, arguments); }; } diff --git a/minify b/minify index f7a678e..c985802 100755 --- a/minify +++ b/minify @@ -1,5 +1,7 @@ #!/bin/bash set -e +eslint cypress/integration +eslint GapsWeb/src/main/resources/static/js npm run minify-input-css npm run uglifyjs-modules npm run uglifyjs-pages \ No newline at end of file