React Directory Structure

Multiple Applications

- Lerna
    - core
    - app1
    - app2

Single Application

- dist
- public
- src
    - models(小写单数,根据不同的状态机有不同的目录结构处理但均放入此目录)
        - global.ts
        - {Resource}.ts
    - services(小写单数)
        - {Resource}.ts
    - components(对应UI规范的视图组件,组件都大写字母开头)
        - common
            - Button(文件夹)
                - index.tsx/Index.tsx (?入口文件大写or小写)
                - index.less
                - AaaaBbbbButton(如果需求)
            - Input
            - Modal
            - Panel
            - Auth
            - ..
        - layouts
            - BasicLayout.tsx
            - BlankLayout.tsx
            - {RoleName}Layout.tsx
            - Footer.tsx

        - TalentCard.tsx(业务组件暂时没想到好的文件夹名字,散放在components中)

    - assets
        - font
        - style
        - images
            - icons
    - routes?
    - locales
    - pages/views?
        - 业务命名
        - {block_name}
            - services
            - models
            - ...
    - utils
        - auth.ts
        - http/request.ts
        - tools
            xxxx
        - 
    - e2e
    - theme.ts
    - global.tsx
    - global.css/less/sass
    - typings.d.ts
- config
- mock
- sh
- .gitignore
- .xxxxConfig
- .env
- README.md
    - xxx

results matching ""

    No results matching ""