https://github.com/MobileFirstLLC/extension-cli
Command line tool for building extensions/add-ons for chromium based browsers.
https://github.com/MobileFirstLLC/extension-cli
addons browser-extension browser-extensions chrome-extension cli command-line-tool developer-tools edge-extension extensions firefox-addon opera-extension web-extensions
Last synced: 2 months ago
JSON representation
Command line tool for building extensions/add-ons for chromium based browsers.
- Host: GitHub
- URL: https://github.com/MobileFirstLLC/extension-cli
- Owner: MobileFirstLLC
- License: mit
- Created: 2019-12-16T04:39:37.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2024-10-30T01:42:32.000Z (7 months ago)
- Last Synced: 2024-10-30T03:59:18.314Z (7 months ago)
- Topics: addons, browser-extension, browser-extensions, chrome-extension, cli, command-line-tool, developer-tools, edge-extension, extensions, firefox-addon, opera-extension, web-extensions
- Language: JavaScript
- Homepage: https://oss.mobilefirst.me/extension-cli
- Size: 13.3 MB
- Stars: 174
- Watchers: 1
- Forks: 25
- Open Issues: 35
-
Metadata Files:
- Readme: README.md
- Contributing: .github/contributing.md
- License: LICENSE
- Code of conduct: .github/code_of_conduct.md
Awesome Lists containing this project
- jimsghstars - MobileFirstLLC/extension-cli - Command line tool for building extensions/add-ons for chromium based browsers. (JavaScript)
README
# Extension CLI
[](https://www.npmjs.com/package/extension-cli)
[](https://travis-ci.com/github/MobileFirstLLC/extension-cli)
[](https://codeclimate.com/github/MobileFirstLLC/extension-cli/maintainability)
[](https://github.com/MobileFirstLLC/extension-cli/commits/master)
[](https://www.npmjs.com/package/extension-cli)**Extension CLI is a command-line application that facilitates chromium∗-based web extension development by providing
a systematic way to build, test and document extension projects. It handles the project setup and builds and lets you focus
on the extension you are creating.*** * *
## Features
- 🖥️ **Javascript Bundling** — Compiles, bundles and minifies javascript files
- 🎨 **CSS Bundling** — Compiles, bundles, and minifies CSS and [SASS](https://sass-lang.com/guide) files
- 💄 **Linting** — lint JavaScript using [ESLint](https://eslint.org/)
- 📦 **ZIP Generation** — Generates a `.zip` file for publishing
- 📝 **Document Source Code** — Generates code documentation using [JSDoc](https://jsdoc.app/about-getting-started.html)
- ⚗️ **Unit Testing** — Provides a unit test environment preloaded with [mocha](https://mochajs.org), [chai](https://www.chaijs.com/) and [sinon-chrome](https://github.com/acvetkov/sinon-chrome)
- ⚔️ **Cross-Browser Compatibility** - develop extensions for Chrome, Edge, Firefox, Opera and Brave.

## Getting Started
**Note:** Using this CLI assumes you have Node.js installed. If you do not, you can [install it here](https://nodejs.org/en/download/).
##### Create new extension project
```text
npx extension-cli
```##### Add to an existing project
```text
npm install extension-cli
```### Commands Reference
Command | Description
--- | ---
**xt-build** | Run builds; env flags: `-e prod` and `-e dev`
**xt-test**| Run unit tests
**xt-docs**| Generate docs
**xt-sync**| Update project config files to match the latest defaults supplied by this CLI
**xt-clean** | Remove automatically generated files* * *
## Read the Docs
### CLI Developer Guide
If you are interested in extending this project or forking **[see this guide →](https://oss.mobilefirst.me/extension-cli/13-cli-development/)**
* * *
## Motivation
After developing multiple browser extensions, it became clear that there are several steps in the development process that stay the same between every project.
Instead of setting up these tasks individually for each project, it made more sense to combine everything in a utility tool that could be shared between projects.
This approach helps with creating a common, consistent development approach between multiple projects, reduces time to get started, and makes it easier to update build tools and scripts across multiple projects as many npm packages inevitably need to be updated (frequently!).
* * *
**Issues & Feature Requests:** [Submit on Github](https://github.com/MobileFirstLLC/extension-cli/issues/new/choose)
**Maker:** made by developers behind several popular extensions!
**License:** [MIT](https://github.com/MobileFirstLLC/extension-cli/blob/master/LICENSE)