@bertdeblock/gember
v0.4.0
Published
Generate components, helpers, modifiers and services in v2 addons.
Downloads
325
Readme
🫚 gember
Generate components, helpers, modifiers and services in v2 addons.
Uses scaffdog underneath.
[!NOTE]
- Only supports
.gjs
(default) and.gts
files for components
Installation
npm install -D @bertdeblock/gember
bun add -D @bertdeblock/gember
pnpm add -D @bertdeblock/gember
yarn add -D @bertdeblock/gember
Usage
pnpm gember component foo
pnpm gember component foo --class-based # or `--class`
pnpm gember component foo --path="src/-private"
pnpm gember component foo --typescript # or `--ts`
pnpm gember helper foo
pnpm gember helper foo --class-based # or `--class`
pnpm gember helper foo --path="src/-private"
pnpm gember helper foo --typescript # or `--ts`
pnpm gember modifier foo
pnpm gember modifier foo --class-based # or `--class`
pnpm gember modifier foo --path="src/-private"
pnpm gember modifier foo --typescript # or `--ts`
pnpm gember service foo
pnpm gember service foo --path="src/-private"
pnpm gember service foo --typescript # or `--ts`
Configuration
gember supports the following config files:
gember.config.js
gember.config.cjs
gember.config.mjs
A gember config file must export a gember config object, or a sync/async function that returns a gember config object.
Configuration Options
hooks.postGenerate
A hook that will be executed post generating a document.
// gember.config.js
import { execa } from "execa";
export default {
hooks: {
postGenerate: async ({ files }) => {
await execa("npx", [
"prettier",
"--write",
...files.map((file) => file.path),
]);
},
},
};