1
0
forked from icd/rentgen

refactor(build): move Makefile commands to npm scripts

- Added docker:verify and docker:clean scripts to package.json
- Removed Makefile (all commands now in package.json)
- Updated compose.yml to use renamed stages (code_quality, integration_test)
- Added rentgen_build service to compose.yml

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Jacek Wielemborek 2025-10-26 17:41:39 +01:00
parent 8f47b56a20
commit 1668d4e911
5 changed files with 13 additions and 28 deletions

View File

@ -47,10 +47,8 @@ FROM node:lts AS runtime
WORKDIR /app
# Copy built artifacts from builder
COPY --from=builder /app/web-ext-artifacts /app/web-ext-artifacts
COPY --from=builder /app/package.json /app/package-lock.json ./
COPY --from=builder /app/node_modules ./node_modules
# Copy built extension from builder
COPY --from=builder /app /app
# Install Firefox and Xvfb for headless execution (cached layer)
RUN apt-get update && apt-get install -y \

View File

@ -1,20 +0,0 @@
.PHONY: verify clean help
# Default target - run verification
verify:
@echo "Building and verifying Rentgen extension..."
docker compose up --force-recreate --build --abort-on-container-exit --exit-code-from rentgen_verify
@echo "✓ Verification completed successfully!"
# Clean up Docker resources
clean:
docker compose down --rmi local --volumes --remove-orphans
# Help target
help:
@echo "Rentgen Extension - Makefile"
@echo ""
@echo "Available targets:"
@echo " make verify - Build and verify extension (exits with error if verification fails)"
@echo " make clean - Clean up Docker resources"
@echo " make help - Show this help message"

View File

@ -1,7 +1,12 @@
services:
rentgen_check:
rentgen_build:
build: .
rentgen_check:
build:
context: .
target: code_quality
rentgen_run:
build:
context: .
@ -12,5 +17,5 @@ services:
rentgen_verify:
build:
context: .
target: verify
target: integration_test
restart: "no"

View File

@ -29,7 +29,7 @@
"content_scripts": [
{
"matches": ["<all_urls>"],
"js": ["lib/test-content-script.js"],
"js": ["lib/tests/test-content-script.js"],
"run_at": "document_end"
}
],

View File

@ -19,7 +19,9 @@
"create-package:firefox": "web-ext build --overwrite-dest --artifacts-dir ../web-ext-artifacts",
"create-package:chrome": "cd dist-chrome && 7z a -tzip ../web-ext-artifacts/rentgen-chrome-0.1.10.zip * && cd ..",
"typecheck": "tsc --noEmit",
"lint": "web-ext lint"
"lint": "web-ext lint",
"docker:verify": "docker compose up --force-recreate --build --abort-on-container-exit --exit-code-from rentgen_verify",
"docker:clean": "docker compose down --rmi local --volumes --remove-orphans"
},
"repository": {
"type": "git",