Skip to content

Commit

Permalink
feat(docs): init docs
Browse files Browse the repository at this point in the history
  • Loading branch information
lenconda committed Jun 29, 2021
1 parent bf596a3 commit d42a5ba
Show file tree
Hide file tree
Showing 17 changed files with 608 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ test.ts
lib
.npmrc
checksum.txt
.umi
4 changes: 2 additions & 2 deletions .umirc.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { defineConfig } from 'dumi';

export default defineConfig({
title: 'Dollie',
title: 'Dollie.js',
outputPath: 'docs/dist',
mode: 'site',
publicPath: '/',
Expand Down Expand Up @@ -34,7 +34,7 @@ export default defineConfig({
'.__dumi-default-navbar nav > span > a.active::after { display: none !important; }',
'.__dumi-default-locale-select:hover { background-color: transparent !important; }',
'.__dumi-default-menu[data-mode=\'site\'] .__dumi-default-menu-list > li > a::after { display: none !important; }',
'.__dumi-default-menu[data-mode=\'site\'] .__dumi-default-menu-list > li > a.active { background: rgba(69, 123, 157, .3) !important; }',
'.__dumi-default-menu[data-mode=\'site\'] .__dumi-default-menu-list > li > a.active { background: rgb(132, 77, 40, 0.3) !important; }',
'.__dumi-default-menu-inner ul li a::before, .__dumi-default-menu-inner ul li > span::before { display: none !important; }',
'.__dumi-default-layout-hero button { border-radius: 4px !important; }',
'.__dumi-default-menu[data-mode=\'site\'] { background: white !important; }',
Expand Down
62 changes: 62 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
---
title: Dollie.js
hero:
title: Dollie.js
desc: Accelerate the process of project creation and initialization with such set of utilities
actions:
- text: Documentation
link: /guide
footer:
Open-Source Licensed By MIT
<br />Copyright © 2021 to today, Dollie.js and its contributors
<br />Powered by [dumi](https://d.umijs.org)
---

<div style="height: 20px;"></div>

# Installation

```bash
$ npm i @dollie/cli -g
```

# Usage

## Use CLI

In the shell, run

```bash
$ dollie
```

or

```bash
$ dollie compose ./config.yml
```

## Use API

Install the NPM dependency which contains the Dollie APIs in your project

```bash
$ npm i @dollie/core -S
```

import dependency, and invoke appropriate API to run the core functionality of Dollie

```js
const dollie = require('@dollie/core');

async function app() {
try {
await dollie.interactive();
} catch (e) {
dollie.log(e.toString());
process.exit(1);
}
}

app();
```
62 changes: 62 additions & 0 deletions docs/README.zh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
---
title: Dollie.js
hero:
title: Dollie.js
desc: Dollie 是一款初始化工程代码的工具链,它可以帮助你构建成熟的工程化方案
actions:
- text: 用户文档
link: /zh/guide
footer:
遵循 MIT 开源协议
<br />版权所有 © 2021 至今,Dollie.js 及其贡献者
<br />由 [dumi](https://d.umijs.org) 提供支持
---

<div style="height: 20px;"></div>

# 安装

```bash
$ npm i @dollie/cli -g
```

# 使用

## 使用 CLI

在 Shell 中执行

```bash
$ dollie
```


```bash
$ dollie compose ./config.yml
```

## 使用 API

在项目中安装包含 Dollie API 的 NPM 依赖

```bash
$ npm i @dollie/core -S
```

引入依赖,并调用合适的 API 来运行 Dollie 的核心功能

```js
const dollie = require('@dollie/core');

async function app() {
try {
await dollie.interactive();
} catch (e) {
dollie.log(e.toString());
process.exit(1);
}
}

app();
```
18 changes: 18 additions & 0 deletions docs/api/README.zh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
order: 1
toc: 'menu'
title: 'API'
nav:
title: 'API'
order: 1
---

# API

## 类型与接口

## 实用工具函数

## Web API

目前版本暂未支持
45 changes: 45 additions & 0 deletions docs/guide/README.zh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
order: 0
toc: 'menu'
title: '指南'
nav:
title: '用户文档'
order: 0
---

# 指南

## 什么是 Dollie

Dollie(国际标准音标:*[dɒli]*)是工程项目效率工具套件,基于 [Yeoman](https://yeoman.io/) 封装,旨在降低脚手架编写与维护的时间成本和开发成本,以提高项目起步、复用的效率。但与 Yeoman 不同,Dollie 将生成器逻辑和脚手架模板分离,从而极大程度地降低上手成本。

## 特性

- 脚手架云端化,即用即取,时刻保持脚手架版本一致性
- 编写极少代码甚至无需编写代码即可快速制作脚手架
- 支持脚手架增量覆盖,轻松生成多技术栈工程
- 同时支持交互式命令行和一键式配置化生成项目
- 支持传入配置、提供大量 API 以支持二次开发和定制

## 快速上手

### 环境配置

Dollie 依赖 [Node.js](https://nodejs.org/en/download/),并且要求其版本在 v10.0.0 以上:

```bash
$ node -v
v10.18.0
```

### 生成项目工程

在 Shell 中执行

```bash
$ dollie
```

根据提示回答完所有交互问题即可:

![dollie_guide_quickstart.gif](https://i.loli.net/2021/02/23/6C1gY32NwkZ45d9.gif)
Loading

0 comments on commit d42a5ba

Please sign in to comment.