Skip to content

Add extension packaging script with debug content filtering#1

Merged
bastiensoret merged 2 commits intomainfrom
claude/publish-extension-ejiiG
Mar 19, 2026
Merged

Add extension packaging script with debug content filtering#1
bastiensoret merged 2 commits intomainfrom
claude/publish-extension-ejiiG

Conversation

@bastiensoret
Copy link
Copy Markdown
Owner

Summary

This PR adds a packaging workflow for the browser extension that creates a production-ready ZIP file while automatically filtering out debug content scripts from the manifest.

Key Changes

  • Added --package flag support to the build script that:
    • Builds the extension in production mode
    • Removes debug.js from content scripts in the manifest
    • Creates a versioned ZIP file of the dist directory
  • Modified manifest.json handling to parse and conditionally filter content scripts based on build mode
  • Added npm run package script for easy extension packaging
  • Debug script is now only copied to dist during development builds, not production builds

Implementation Details

  • The build script now parses manifest.json as JSON to allow dynamic modification of content scripts
  • In package mode, content scripts are filtered to exclude any referencing debug.js
  • In development mode, the debug script is copied as before for local testing
  • The packageExtension() function reads the version from the built manifest and creates a ZIP file named cesar-v{version}.zip
  • Uses execSync to run the zip command from the dist directory

https://claude.ai/code/session_01NTwC9wd4hoTixpwU6SzPmP

claude added 2 commits March 19, 2026 13:18
Adds `npm run package` that builds a production zip (cesar-v*.zip) with
debug.js stripped from the manifest and dist. The --package flag triggers
production mode in build.js.

https://claude.ai/code/session_01NTwC9wd4hoTixpwU6SzPmP
@bastiensoret bastiensoret merged commit b61c14a into main Mar 19, 2026
1 check passed
@bastiensoret bastiensoret deleted the claude/publish-extension-ejiiG branch March 19, 2026 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants