Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bertdeblock/gember
Generate components, helpers, modifiers and services in v2 addons.
https://github.com/bertdeblock/gember
ember generator scaffdog
Last synced: 23 days ago
JSON representation
Generate components, helpers, modifiers and services in v2 addons.
- Host: GitHub
- URL: https://github.com/bertdeblock/gember
- Owner: bertdeblock
- License: mit
- Created: 2024-03-08T11:56:23.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-07-22T19:11:34.000Z (4 months ago)
- Last Synced: 2024-10-01T08:41:41.894Z (about 1 month ago)
- Topics: ember, generator, scaffdog
- Language: TypeScript
- Homepage:
- Size: 86.9 KB
- Stars: 7
- Watchers: 1
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# 🫚 gember
[![CI](https://github.com/bertdeblock/gember/workflows/CI/badge.svg)](https://github.com/bertdeblock/gember/actions?query=workflow%3ACI)
[![NPM Version](https://badge.fury.io/js/%40bertdeblock%2Fgember.svg)](https://badge.fury.io/js/%40bertdeblock%2Fgember)Generate components, helpers, modifiers and services in v2 addons.
Uses [scaffdog](https://scaff.dog/) underneath.
> [!NOTE]
>
> - Only supports `.gjs` (default) and `.gts` files for components## Installation
npm
```shell
npm install -D @bertdeblock/gember
```bun
```shell
bun add -D @bertdeblock/gember
```pnpm
```shell
pnpm add -D @bertdeblock/gember
```yarn
```shell
yarn add -D @bertdeblock/gember
```## Usage
Generating components
```shell
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`
```Generating helpers
```shell
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`
```Generating modifiers
```shell
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`
```Generating services
```shell
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.
```js
// gember.config.jsimport { execa } from "execa";
export default {
hooks: {
postGenerate: async ({ files }) => {
await execa("npx", [
"prettier",
"--write",
...files.map((file) => file.path),
]);
},
},
};
```