wodax-umi-block-convertor

A cli tool to convert your umi page to a umi block.

Usage no npm install needed!

<script type="module">
  import wodaxUmiBlockConvertor from 'https://cdn.skypack.dev/wodax-umi-block-convertor';
</script>

README

umi-block-convertor

A cli tool to convert your umi page to a umi block.

Usage

$ umi-block-convertor [block source entry js] [block target folder]
$ umi-block-convertor --config [path to config.json]

Config

A config demo:

// all path relative to process.cwd()
{
  "source": "./src/pages/test/Hello.js",
  "target": "../block/hello",
  "extFiles": [
    ["./src/pages/test/model.js", "src/model.js"],
    ["./src/pages/test/locals", "src/locals"]
  ]
}