reg-t

0.0.1 • Public • Published

reg-t

文件生成器

使用

项目根目录下创建 reg-t.config.jsreg-t.config.json 配置文件

{
  "template": {
    "default": {
      "path": "templates",
      "output": "src/component"
    }
  }
}

创建模板文件 templates/__name__.js

import React from 'react'

const __name__ = () => <h1>__name__ template</h1>

使用cli

npx reg-t MyInput

会在 src/component 下创建 MyInput/MyInput.js文件

import React from 'react'

const MyInput = () => <h1>MyInput template</h1>

Readme

Keywords

Package Sidebar

Install

npm i reg-t

Weekly Downloads

1

Version

0.0.1

License

MIT

Unpacked Size

6.97 kB

Total Files

11

Last publish

Collaborators

  • drremain