extension-create
v2.2.1
Published
The standalone extension creation engine for Extension.js
Downloads
3,639
Maintainers
Readme
extension-create
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.
Installation
Install the package using your preferred package manager:
npm install extension-create
# or
pnpm add extension-create
# or
yarn add extension-createQuick Start
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
})API Reference
extensionCreate(projectName, options)
Creates a new extension project with the specified configuration.
Parameters
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 totruecliVersion(string, optional) - CLI version for package.json
Templates
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.
License
MIT (c) Cezar Augusto.
