@fougere/adapter-file
Rows as files — one JSON or YAML file per row, in a directory per entity.
Use it
npm install @fougere/adapter-file
pnpm add @fougere/adapter-file
bun add @fougere/adapter-file
yarn add @fougere/adapter-file
// fougere.config.ts
import '@fougere/adapter-file';
export default defineFougere({
sources: { main: { type: 'file', path: '…' } },
});
The import is what makes the word exist: without it, the editor and the boot both refuse it.
Every key each one admits: sources.
What it extends
The interfaces of Fougere this package adds its words to, with declare module — see Interfaces to extend.
| interface | adds |
|---|---|
FougereSources | file |
Entries: @fougere/adapter-file
What you import
| name | |
|---|---|
createFileSource |
Types
TypeScript types only — they do not run. Import them with import type to type your own code: a variable, a parameter, an option object.
| name | |
|---|---|
FileSourceOptions |