## ## stx -- Simple Task Execution ## Copyright (c) 2025 Dr. Ralf S. Engelschall ## Licensed under MIT ## # static code analysis (linting) lint eslint --config etc/eslint.mjs src/*.ts && \ markdownlint-cli2 --config etc/.markdownlint.yaml src/**/*.md # static code analysis (linting) with file watching lint-watch nodemon --exec "npm start lint" --watch src --ext ts # code compilation/transpiling (building) build-watch nodemon --exec "npm start build" --watch src --ext ts # build entire project build : lint build-cmd build-man # build command program build-cmd vite --config etc/vite.mts build --mode production # build manual page build-man remark --quiet --use remark-man --output dst-stage2/stx.1 src/stx.md # build packaging (self-contained executables) -- fallback build-pkg [hostname=!en4*] echo "(packaging skipped)" # build packaging (self-contained executables) build-pkg [hostname=en4*] shx mkdir -p dst-stage2/@rse dst-stage3 cd dst-stage2 rm -f @rse/stx-* targets="node24-linux-x64,node24-linux-arm64" targets="$targets,node24-win-x64,node24-win-arm64" targets="$targets,node24-macos-x64,node24-macos-arm64" pkg --sea --public -c ../package.json -t "$targets" stx.js shx mv @rse/stx-linux-x64 ../dst-stage3/stx-lnx-x64 && \ shx mv @rse/stx-linux-arm64 ../dst-stage3/stx-lnx-a64 && \ shx mv @rse/stx-win-x64.exe ../dst-stage3/stx-win-x64.exe && \ shx mv @rse/stx-win-arm64.exe ../dst-stage3/stx-win-a64.exe && \ shx mv @rse/stx-macos-x64 ../dst-stage3/stx-mac-x64 && \ shx mv @rse/stx-macos-arm64 ../dst-stage3/stx-mac-a64 # remove regularly built files clean shx rm -rf dst-stage1 dst-stage2 dst-stage3 # remove all built files clean-dist : clean shx rm -f package-lock.json shx rm -rf node_modules