This document outlines the standards and practices for packaging and distributing the MileIQ Chrome extension internally.
The packaging script creates a distributable zip file that contains only the necessary files for the Chrome extension, excluding development artifacts and dependencies.
- File Validation: Ensures all required extension files are present before packaging
- Smart Exclusions: Excludes development files, dependencies, and system files
- Error Handling: Provides clear feedback on success/failure
- Content Verification: Shows package contents for verification
The script validates that these essential files are present:
manifest.json- Extension configurationbackground.js- Service workercontent.js- Content scriptpopup.html- Popup interfacepopup.js- Popup functionalitypopup.css- Popup stylingside-panel.html- Side panel interfaceimages/- Extension iconsREADME.md- Installation and usage instructions
The script automatically excludes:
node_modules/- NPM dependencies.idea/- IDE configuration.git/- Version control*.zip- Existing packages.DS_Store- macOS system filespackage*.json- NPM configurationpackage-extension.sh- The script itself.gitignore- Git configuration*.log,*.tmp- Temporary files
MileIQ_CreateUser.zip
├── manifest.json
├── background.js
├── content.js
├── popup.html
├── popup.js
├── popup.css
├── side-panel.html
├── images/
│ ├── favicon-16x16.png
│ ├── favicon-32x32.png
│ ├── android-chrome-192x192.png
│ └── ...
└── README.md
- Make changes to the extension files
- Run
./package-extension.shto create a new distribution package - Test the package by loading it in Chrome's developer mode
- Distribute the
MileIQ_CreateUser.zipfile
- Download and extract the zip file
- Load the extension in Chrome using "Load unpacked"
- Follow the README.md instructions for usage
- All required files are present and valid
- Extension loads without errors in Chrome
- All functionality works as expected
- README.md contains accurate instructions
- Package size is reasonable (< 1MB for this extension)
The script automatically:
- Validates file presence
- Shows package size
- Lists package contents
- Provides success/failure feedback
- Update version in
manifest.jsonwhen making changes - Consider using semantic versioning (e.g., 1.0.1, 1.1.0)
- Document changes in README.md or a separate CHANGELOG.md
- Only include necessary files in the distribution
- Exclude any sensitive configuration files
- Ensure no API keys or secrets are included
- Validate that only MileIQ domains are targeted
Consider adding:
- Automated testing before packaging
- Version number validation
- Checksum generation for integrity
- Automated deployment to internal repositories
- Integration with CI/CD pipelines