Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add inject-bundle-id command to CLI #135

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

eskirk
Copy link
Collaborator

@eskirk eskirk commented Mar 21, 2025

For applications that don't use Webpack or Rollup, or in cases where you need to add the bundle ID to already built JavaScript files, you can use the inject-bundle-id command:

npx faro-cli inject-bundle-id \
  --bundle-id "your-bundle-id" \
  --app-name "your-app-name" \
  --files "dist/**/*.js" \
  --verbose

This command will:

  1. Locate all JavaScript files matching the specified glob patterns
  2. Check if each file already has a bundle ID snippet
  3. Prepend the bundle ID snippet to files that don't have it
  4. Export the bundle ID to an environment variable for potential later use with other commands

@eskirk eskirk linked an issue Mar 21, 2025 that may be closed by this pull request
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.

Missing Angular Documentation
1 participant