cleaning up code

This commit is contained in:
Jason House
2020-10-01 16:10:56 +09:00
parent f627849b99
commit 8295f070ab
9 changed files with 13 additions and 89 deletions
+2 -1
View File
@@ -19,6 +19,7 @@
{
"js": "always"
}
]
],
"prefer-rest-params": 0
}
}
+2 -2
View File
@@ -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/*
-51
View File
@@ -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"
-28
View File
@@ -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
-2
View File
@@ -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 .
+3
View File
@@ -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
+2 -3
View File
@@ -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"
+2 -2
View File
@@ -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);
};
}
+2
View File
@@ -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