extension-create
v3.16.1
Published
The standalone extension creation engine for Extension.js
Maintainers
Readme
extension-create
The standalone extension creation engine for Extension.js. Use it to scaffold a new extension project from a template.
Install
npm install extension-createUsage
Create a new extension with a single function call:
import {extensionCreate} from 'extension-create'
// Create a basic extension (default template: javascript)
await extensionCreate('my-extension', {})
// Create a React extension and install its dependencies
// (dependency install is opt-in — users normally run their own
// `npm install` so output is what they expect)
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'javascript'(initis an alias)install(boolean, optional) - Whether to install dependencies after scaffolding. Defaults tofalseso project creation is fast and users see the familiarnpm installoutput on their own.cliVersion(string, optional) - CLI version for package.json
Templates
Templates are sourced from the public examples repository. Browse the catalog in the Extension.js examples and reference templates by name (for example, content, content-react, content-vue).
License
MIT (c) Cezar Augusto.
