V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
yilin12
V2EX  ›  Node.js

流畅地开发一个 react 组件

  •  
  •   yilin12 · 2018-01-29 14:49:05 +08:00 · 3845 次点击
    这是一个创建于 2272 天前的主题,其中的信息可能已经有所发展或是发生改变。

    Create a react component like a pro 🎉

    不知道你有没有用过 vue-land/create-vue-component,这是一个通过命令行初始化 vue 组件的工具,项目结构简洁,无需配置文件。使用 Poi 构建,可以打包你写的组件,构建 demo,内置 jest 测试... 总之用来写 vue 组件非常好用,我已经离不开它了。

    最近在写 react,在我想用 react 写点简单的组件骗点 star 的时候也想有这么流程的开发体验啊 (╯°A°)╯ 所以克隆了这个项目,魔改了一版,现在也能通过命令行初始化一个 react 组件了,基本上是体力活...比较适合我这种笨人...

    项目名字叫 create-react-component-with-no-config 嗯... 我在 npm 上已经找不到可以用的简洁的名字了 😂

    create-vue-component 有的功能都有,就是这么好( no )用( face )

    项目地址: https://github.com/luyilin/create-react-component-with-no-config

    用法:

    Install

    yarn global add create-react-component-with-no-config
    

    Usage

    create-react-component-with-no-config react-xxx
    # or
    create-react-component react-xxx
    # or type less
    crc react-xxx
    
    # you can also create component in place
    mkdir react-xxx && cd react-xxx
    crc
    

    项目结构预览:

    preview

    用例: https://github.com/luyilin/react-multipane

    Enjoy!

    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1093 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 23:20 · PVG 07:20 · LAX 16:20 · JFK 19:20
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.