Skip to content

Commit

Permalink
docs(project): improve docs
Browse files Browse the repository at this point in the history
  • Loading branch information
janryWang committed Jul 19, 2021
1 parent 79ab341 commit 3c36b34
Show file tree
Hide file tree
Showing 9 changed files with 46 additions and 27 deletions.
10 changes: 5 additions & 5 deletions packages/antd/docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@ hero:
title: FORMILY ANTD
desc: An elegant and easy-to-use Formily 2.x component system based on Ant Design encapsulation
actions:
- text: main site document
- text: Home Site
link: //v2.formilyjs.org
- text: component documentation
- text: Document
link: /components
features:
- icon: https://img.alicdn.com/imgextra/i2/O1CN016i72sH1c5wh1kyy9U_!!6000000003550-55-tps-800-800.svg
title: easier to use
title: Easier To Use
desc: Out of the box, rich cases
- icon: https://img.alicdn.com/imgextra/i1/O1CN01bHdrZJ1rEOESvXEi5_!!6000000005599-55-tps-800-800.svg
title: more efficient
title: More Efficient
desc: Stupid writing, super high performance
- icon: https://img.alicdn.com/imgextra/i3/O1CN01xlETZk1G0WSQT6Xii_!!6000000000560-55-tps-800-800.svg
title: More professional
title: More Professional
desc: complete, flexible, elegant
footer: Open-source MIT Licensed | Copyright © 2019-present<br />Powered by self
---
Expand Down
2 changes: 1 addition & 1 deletion packages/core/docs/guide/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Introduction

## UI has nothing to do
## Pure Core,No UI

Because @formily/core exists as an independent package, its core meaning is to separate the domain model from the UI framework, and at the same time, it can bring the following two intuitive benefits to developers:

Expand Down
6 changes: 3 additions & 3 deletions packages/core/docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ hero:
title: FORMILY CORE
desc: Alibaba unified front-end form solution
actions:
- text: main site document
- text: Home Site
link: //v2.formilyjs.org
- text: kernel documentation
- text: Document
link: /guide
features:
- icon: https://img.alicdn.com/imgextra/i1/O1CN01bHdrZJ1rEOESvXEi5_!!6000000005599-55-tps-800-800.svg
Expand All @@ -21,7 +21,7 @@ features:
desc: flexible, complete, elegant
- icon: https://img.alicdn.com/imgextra/i2/O1CN01YqmcpN1tDalwgyHBH_!!6000000005868-55-tps-800-800.svg
title: Complete domain model
desc: Cross-terminal, cross-frame, UI has nothing to do
desc: Cross-terminal, cross-frame, Pure Core,No UI
- icon: https://img.alicdn.com/imgextra/i4/O1CN018vDmpl2186xdLu6KI_!!6000000006939-55-tps-800-800.svg
title: Friendly debugging experience
desc: Natural docking with Formily DevTools
Expand Down
10 changes: 5 additions & 5 deletions packages/next/docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@ hero:
title: FORMILY NEXT
desc: Elegant and easy-to-use Formily 2.x component system based on Alibaba Fusion package
actions:
- text: main site document
- text: Home Site
link: //v2.formilyjs.org
- text: component documentation
- text: Document
link: /components
features:
- icon: https://img.alicdn.com/imgextra/i2/O1CN016i72sH1c5wh1kyy9U_!!6000000003550-55-tps-800-800.svg
title: easier to use
title: Easier To Use
desc: Out of the box, rich cases
- icon: https://img.alicdn.com/imgextra/i1/O1CN01bHdrZJ1rEOESvXEi5_!!6000000005599-55-tps-800-800.svg
title: more efficient
title: More Efficient
desc: Stupid writing, super high performance
- icon: https://img.alicdn.com/imgextra/i3/O1CN01xlETZk1G0WSQT6Xii_!!6000000000560-55-tps-800-800.svg
title: More professional
title: More Professional
desc: complete, flexible, elegant
footer: Open-source MIT Licensed | Copyright © 2019-present<br />Powered by self
---
Expand Down
2 changes: 1 addition & 1 deletion packages/react/docs/guide/concept.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ To understand model binding, you need to understand what [MVVM](//core.formilyjs

In Formily, @formily/core is ViewModel, Component and Decorator are View, @formily/react is the glue layer that binds ViewModel and View, and the binding of ViewModel and View is called model binding, which implements model binding. The main methods are [useField](/api/hooks/use-field), and [connect](/api/shared/connect) and [mapProps](/api/shared/map-props) can also be used. Note that Component only needs to support the value/onChange property to automatically realize the two-way binding of the data layer.

## Protocol driver
## JSON Schema Driver

Protocol-driven rendering is the most expensive part of @formily/react, but after learning it, the benefits it brings to the business are also very high. A total of 4 core concepts need to be understood:

Expand Down
4 changes: 2 additions & 2 deletions packages/react/docs/guide/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ With the responsive model of [@formily/core](//core.formilyjs.org), @formily/rea

@formily/react provides a series of React components, such as Field/ArrayField/ObjectField/VoidField. When using it, users only need to pass the component property to the Field component (supporting two-way binding conventions such as value/onChange). Quick access to @formily/react, the access cost is extremely low.

## Protocol driver
## JSON Schema Driver

@formily/react provides protocol-driven components such as SchemaField. It is also driven by the standard JSON-Schema, so that form development can become more dynamic and configurable. What's more, we can achieve a protocol that allows multiple terminals Render the form.

## Scene reuse
## Scene Reuse

With the help of protocol-driven capabilities, we can abstract a protocol fragment carrying business logic into a scene component to help users develop efficiently in certain scenes, such as scene components such as FormTab and FormStep.

Expand Down
12 changes: 6 additions & 6 deletions packages/react/docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ hero:
title: FORMILY REACT
desc: Alibaba unified front-end form solution
actions:
- text: main site document
- text: Home Site
link: //v2.formilyjs.org
- text: Development Guide
link: /guide
Expand All @@ -14,19 +14,19 @@ features:
title: Ultra High Performance
desc: Dependency tracking, efficient update, on-demand rendering
- icon: https://img.alicdn.com/imgextra/i2/O1CN016i72sH1c5wh1kyy9U_!!6000000003550-55-tps-800-800.svg
title: out of the box
title: Out Of The Box
desc: The component status is automatically bound, and the access cost is extremely low
- icon: https://img.alicdn.com/imgextra/i3/O1CN01JHzg8U1FZV5Mvt012_!!6000000000501-55-tps-800-800.svg
title: Protocol driver
title: JSON Schema Driver
desc: Standard JSON-Schema
- icon: https://img.alicdn.com/imgextra/i3/O1CN0194OqFF1ui6mMT4g7O_!!6000000006070-55-tps-800-800.svg
title: Scene reuse
title: Scene Reuse
desc: Based on protocol-driven, abstract scene components
- icon: https://img.alicdn.com/imgextra/i4/O1CN018vDmpl2186xdLu6KI_!!6000000006939-55-tps-800-800.svg
title: Debugging friendly
title: Debugging Friendly
desc: Natural docking with Formily DevTools
- icon: https://img.alicdn.com/imgextra/i4/O1CN01u6jHgs1ZMwXpjAYnh_!!6000000003181-55-tps-800-800.svg
title: Smart reminder
title: Smart Tips
desc: Embrace Typescript
footer: Open-source MIT Licensed | Copyright © 2019-present<br />Powered by self
---
Expand Down
8 changes: 4 additions & 4 deletions packages/reactive/docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ hero:
title: FORMILY REACTIVE
desc: DDD-oriented responsive state management solution
actions:
- text: main site document
- text: Home Site
link: //v2.formilyjs.org
- text: Development Guide
link: /guide
Expand All @@ -14,10 +14,10 @@ features:
title: Ultra High Performance
desc: Dependency tracking, efficient update, on-demand rendering
- icon: https://img.alicdn.com/imgextra/i2/O1CN01YqmcpN1tDalwgyHBH_!!6000000005868-55-tps-800-800.svg
title: cross terminal, cross frame
desc: UI has nothing to do, framework has nothing to do
title: Cross Device,Cross Framework
desc: Zero Dependencies
- icon: https://img.alicdn.com/imgextra/i4/O1CN01u6jHgs1ZMwXpjAYnh_!!6000000003181-55-tps-800-800.svg
title: Smart reminder
title: Smart Tips
desc: Embrace Typescript
footer: Open-source MIT Licensed | Copyright © 2019-present<br />Powered by self
---
Expand Down
19 changes: 19 additions & 0 deletions scripts/translate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,25 @@ const fixContents = (contents: string) => {
.replace(/overflow\s*description/g, 'overflow"\ndescription')
.replace(/\s*>\s*\(\(\)\s*=>\s*\(/g, `>{() => (`)
.replace(/\/zh\-CN\//g, '/')
.replace('main site document', 'Home Site')
.replace('kernel documentation', 'Document')
.replace('kernel document', 'Document')
.replace('component documentation', 'Document')
.replace('Smart reminder', 'Smart Tips')
.replace('cross terminal, cross frame', 'Cross Device,Cross Framework')
.replace('easier to use', 'Easier To Use')
.replace('easier to use', 'Easier To Use')
.replace('out of the box', 'Out Of The Box')
.replace('Protocol driver', 'JSON Schema Driver')
.replace('Scene reuse', 'Scene Reuse')
.replace('more efficient', 'More Efficient')
.replace('More professional', 'More Professional')
.replace('Debugging friendly', 'Debugging Friendly')
.replace(
'UI has nothing to do, framework has nothing to do',
'Zero Dependencies'
)
.replace('UI has nothing to do', 'Pure Core,No UI')
}

glob('packages/*/docs/**/*.md', async (err, files) => {
Expand Down

0 comments on commit 3c36b34

Please sign in to comment.