Skip to content

Latest commit

 

History

History
108 lines (88 loc) · 3.33 KB

File metadata and controls

108 lines (88 loc) · 3.33 KB

Packaging Standards for MileIQ Chrome Extension

This document outlines the standards and practices for packaging and distributing the MileIQ Chrome extension internally.

Packaging Script (package-extension.sh)

Purpose

The packaging script creates a distributable zip file that contains only the necessary files for the Chrome extension, excluding development artifacts and dependencies.

Key Features

  • 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

Required Files

The script validates that these essential files are present:

  • manifest.json - Extension configuration
  • background.js - Service worker
  • content.js - Content script
  • popup.html - Popup interface
  • popup.js - Popup functionality
  • popup.css - Popup styling
  • side-panel.html - Side panel interface
  • images/ - Extension icons
  • README.md - Installation and usage instructions

Excluded Files

The script automatically excludes:

  • node_modules/ - NPM dependencies
  • .idea/ - IDE configuration
  • .git/ - Version control
  • *.zip - Existing packages
  • .DS_Store - macOS system files
  • package*.json - NPM configuration
  • package-extension.sh - The script itself
  • .gitignore - Git configuration
  • *.log, *.tmp - Temporary files

Distribution Package Structure

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

Usage Instructions

For Developers

  1. Make changes to the extension files
  2. Run ./package-extension.sh to create a new distribution package
  3. Test the package by loading it in Chrome's developer mode
  4. Distribute the MileIQ_CreateUser.zip file

For End Users

  1. Download and extract the zip file
  2. Load the extension in Chrome using "Load unpacked"
  3. Follow the README.md instructions for usage

Quality Assurance

Before Distribution

  • 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)

Package Validation

The script automatically:

  • Validates file presence
  • Shows package size
  • Lists package contents
  • Provides success/failure feedback

Version Management

  • Update version in manifest.json when making changes
  • Consider using semantic versioning (e.g., 1.0.1, 1.1.0)
  • Document changes in README.md or a separate CHANGELOG.md

Security Considerations

  • 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

Future Improvements

Consider adding:

  • Automated testing before packaging
  • Version number validation
  • Checksum generation for integrity
  • Automated deployment to internal repositories
  • Integration with CI/CD pipelines