GithubHelp home page GithubHelp logo

auto-create-file's Introduction

自动文件创建工具

使用说明

使用前提:基于 umi2.0 的目录结构,遵守路由文件在 src/config/app.config.ts 的时候才会自动写入路由,否则会有问题。

  • 先执行 npm link

  • acr init

    • 选择是需要在哪个工具中创建(appName),即 fe/app 下你项目的工具文件名称。
    • 选择需要创建的类型,需要创建新的组件还是新的页面。
    • 输入要创建的文件夹或者文件名称。具体可以看注意事项。

注意事项

输入要创建的名称,工具会默认将其看作是文件夹名称,如果需要创建文件,需要自己带上文件类型,也就说如果你输入的名字是 newFile,那么将创建对应的页面或组件,最终创建的结果类似于 src/pages(components)/newFile/index.tsx。如果你要创建带后缀的文件 newFile.tsx,则工具会帮你创建 src/pages(components)/newFile.tsx 文件。其中单层和多层文件目录同样也适用此规则。

支持两级文件夹的创建,最多层级为 a/b/c.tsx

auto-create-file's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.