The standalone extension creation engine from Extension.js. It provides an intuitive API for programmatically creating browser extensions with support for multiple frameworks and templates.
Install the package using your preferred package manager:
npm install extension-create
# or
pnpm add extension-create
# or
yarn add extension-create
Create a new extension with a single function call:
import {extensionCreate} from 'extension-create'
// Create a basic extension
await extensionCreate('my-extension', {
template: 'init'
})
// Create a React extension and install its dependencies
await extensionCreate('my-react-extension', {
template: 'react',
install: true
})
Creates a new extension project with the specified configuration.
projectName
(string, required) - The name of your extension projectoptions
(object) - Configuration optionstemplate
(string, optional) - Template name or URL. Defaults to'init'
install
(boolean, optional) - Whether to install dependencies. Defaults totrue
cliVersion
(string, optional) - CLI version for package.json
Templates are sourced from the public Examples repository. See the catalog at https://github.com/extension-js/examples
and reference templates by name, e.g. content
, content-react
, content-vue
, etc.
MIT (c) Cezar Augusto.