@gdjiami/cli
CLI for build front end project.
Last updated 5 days ago by carney520 .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @gdjiami/cli 
SYNC missed versions from official npm registry.

CLI

Getting Started

CLI for build Typescript & React App jm-cli 是 mygzb 前端团队使用的项目运行和构建工具。提供了高性能, 强团队编码规范, 约定大于配置的构建环境. 可以让开发者更专注于业务的开发, 增强项目的可维护性.

安装

yarn global add @gdjiami/cli
# or
npm i -g @gdjiami/cli

jm help

jm-cli 支持在全局模式调用,也支持作为项目的依赖调用。我们推荐后者,因为他和项目是绑定版本的,不会应该版本不兼容而无法运行。

创建项目

jm create my-app

上面的命令将创建一个默认的项目。 项目结构如下:

my-app
├── README.md
├── node_modules
├── package.json
├── yarn.lock
├── global.d.ts
├── tsconfig.json
├── tslint.json
├── .gitignore
├── .env
├── .env.production
├── .env.development
├── public
└── src
    ├── layouts
    |   └── layout.pug
    ├── css
    |   └── ...
    ├── components
    |   └── ...
    ├── containers
    |   └── ...
    ├── admin.pug
    ├── admin.tsx
    ├── index.pug
    └── index.tsx

jm-cli 天然支持多页应用,这里的 admin.pug 和 index.pug 就是两个应用入口。jm-cli 会搜索与它们同名的 Typescript 入口文件。 项目结构的具体详情将在 Folder Structure 中说明。现在可以打开项目目录运行:

cd my-app

NPM Scripts

新创建的项目会内置以下命令

start

在开发服务器中运行,默认运行在 8080 端口,在启动成功后会自动开发默认浏览器.

build

编译生产环境包,资源将输出到 dist 目录

serve

运行生产环境包。这个命令会采用和 start 一样的配置(例如端口和代理配置)来运行服务器,方便测试生产环境包.

analyze

对 webpack 的生产环境包构建进行分析,方便开发者对应用进行拆包优化.

License

jm-cli is open source software licensed as MIT.

Current Tags

  • 0.4.22                                ...           latest (5 days ago)
  • 0.4.0                                ...           next (5 months ago)

49 Versions

  • 0.4.22                                ...           5 days ago
  • 0.4.21                                ...           5 days ago
  • 0.4.20                                ...           5 days ago
  • 0.4.19                                ...           12 days ago
  • 0.4.18                                ...           23 days ago
  • 0.4.16                                ...           2 months ago
  • 0.4.15                                ...           2 months ago
  • 0.4.14                                ...           2 months ago
  • 0.4.13                                ...           2 months ago
  • 0.4.12                                ...           3 months ago
  • 0.4.11                                ...           3 months ago
  • 0.4.10                                ...           5 months ago
  • 0.4.9                                ...           5 months ago
  • 0.4.8                                ...           5 months ago
  • 0.4.6                                ...           5 months ago
  • 0.4.3                                ...           5 months ago
  • 0.4.2                                ...           5 months ago
  • 0.4.1                                ...           5 months ago
  • 0.4.0                                ...           5 months ago
  • 0.3.0                                ...           5 months ago
  • 0.2.3                                ...           5 months ago
  • 0.2.1                                ...           5 months ago
  • 0.1.37                                ...           5 months ago
  • 0.1.36                                ...           6 months ago
  • 0.1.35                                ...           6 months ago
  • 0.1.34                                ...           6 months ago
  • 0.1.33                                ...           8 months ago
  • 0.1.32                                ...           8 months ago
  • 0.1.31                                ...           8 months ago
  • 0.1.30                                ...           8 months ago
  • 0.1.27                                ...           8 months ago
  • 0.1.26                                ...           8 months ago
  • 0.1.25                                ...           8 months ago
  • 0.2.0                                ...           8 months ago
  • 0.1.24                                ...           9 months ago
  • 0.1.23                                ...           9 months ago
  • 0.1.22                                ...           9 months ago
  • 0.1.21                                ...           9 months ago
  • 0.1.20                                ...           9 months ago
  • 0.1.16                                ...           9 months ago
  • 0.1.15                                ...           9 months ago
  • 0.1.14                                ...           9 months ago
  • 0.1.13                                ...           9 months ago
  • 0.1.12                                ...           9 months ago
  • 0.1.11                                ...           9 months ago
  • 0.1.9                                ...           9 months ago
  • 0.1.8                                ...           9 months ago
  • 0.1.6                                ...           9 months ago
  • 0.1.0                                ...           9 months ago
Maintainers (2)
Downloads
Today 0
This Week 61
This Month 85
Last Day 0
Last Week 18
Last Month 109
Dependencies (75)
Dev Dependencies (22)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |