This package has been deprecated

Author message:

已迁移到 @hammal/cli

generator-hamal

1.2.5 • Public • Published

Generator Hamal

NZ 的前端脚手架生成器

该脚手架工具已不再维护! 如果你希望继续使用,请转移到 hamal

安装

  1. 安装 yeoman

    npm install -g yo
  2. 安装 hamal

    npm install -g generator-hamal

使用

yo hamal

脚手架类型

中小型项目的脚手架

  • jQuery 多页应用(Tools-FE 内部使用)
  • React 多页应用(Tools-FE 内部使用)
  • React 单页应用(Tools-FE 内部使用)
  • React + Redux 单页应用(Tools-FE 内部使用)

src/ 源码目录规范

.
├── apiService // 后端 API 请求层,封装后端 API 数据处理
├── components // 通用组件层
├── config // 为 webpack 使用的异步 chunk 的 public path 相关的配置
├── constants // 通用常量
├── containers // 页面容器层,多页模式下各子目录会作为 entry 
├── index.html // 单页模式 entry HTML 模板
├── index.js // 单页模式 entry
├── modules // 通用业务模块
├── styles // global 样式
└── utils // 通用 utils,理论上可以足够抽象,足够稳定后可以用来发布 NPM 包

NPM 库脚手架

  • NPM Library

Readme

Keywords

Package Sidebar

Install

npm i generator-hamal

Weekly Downloads

1

Version

1.2.5

License

MIT

Unpacked Size

1.13 MB

Total Files

138

Last publish

Collaborators

  • nicolaszhao