@croffle/bakery
v0.0.25
Published
CLI for croffle
Downloads
118
Readme
Install
$ npm install croffle @croffle/bakery
@croffle/bakery
is a Croffle CLI module.
Setup croffle.config.js
- If your file name is in the format
{dir}/{name}{ext}
, then the default dist App path is./{type}/{name}/App{ext}
based on the path your file is in. - Your sub files (components) are
{dir}/{name}{ext}
based on your App path.
If there is no return value of waffle, no file is created.
Multiple outputs are possible with one input.
// @ts-check
import {
ReactCroissant,
VueWaffle,
} from "croffle";
/**
* @type {import("@croffle/bakery").CroffleConfig[]}
*/
const config = [
{
targets: "src/apps/**.tsx",
croissant: ReactCroissant,
waffle: [
VueWaffle,
new VueWaffle(),
() => new VueWaffle({ useVue2: true }),
(defrosted, target) => {
const waffle = new VueWaffle();
return {
dist: `./{type}/{base}/App{ext}`,
waffle,
};
},
],
},
];
module.exports = config;
Run Scripts
$ bake
$ npx @croffle/bakery bake