@croffle/bakery
TypeScript icon, indicating that this package has built-in type declarations

0.0.25 • Public • Published

Croffle Bakery

Convert your code to other framework code by Croffle CLI

Install

$ npm install croffle @croffle/bakery

@croffle/bakery is a Croffle CLI module.

Setup croffle.config.js

  1. 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.
  2. 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

Readme

Keywords

none

Package Sidebar

Install

npm i @croffle/bakery

Weekly Downloads

8

Version

0.0.25

License

MIT

Unpacked Size

45.8 kB

Total Files

16

Last publish

Collaborators

  • younkue