The standalone extension creation engine for Extension.js. Use it to scaffold a new extension project from a template.
npm install extension-createCreate 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
})Creates a new extension project with the specified configuration.
-
projectName(string, required) - The name of your extension project -
options(object) - Configuration options-
template(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 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).
MIT (c) Cezar Augusto.