diff --git a/compile.bat b/compile.bat index 85a69b8..7d9cc0f 100644 --- a/compile.bat +++ b/compile.bat @@ -13,9 +13,8 @@ if %errorlevel% neq 0 ( xcopy /y mikupad.html project >NUL -pushd . cd project call npm install call npm start build copy /y .\dist\mikupad.html ..\mikupad_compiled.html -popd \ No newline at end of file +cd .. \ No newline at end of file diff --git a/compile.sh b/compile.sh new file mode 100644 index 0000000..a5666da --- /dev/null +++ b/compile.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +if ! command -v node > /dev/null 2>&1; then + echo "Node.js is not installed." + exit 1 +fi + +if ! command -v npm > /dev/null 2>&1; then + echo "npm is not installed." + exit 1 +fi + +cp -f mikupad.html project + +cd project +npm install +npm run build +cp -f ./dist/mikupad.html ../mikupad_compiled.html +cd .. \ No newline at end of file