Skip to content

Commit 313d76d

Browse files
committed
新增dart-json支持
1 parent b48b843 commit 313d76d

File tree

10 files changed

+26
-17
lines changed

10 files changed

+26
-17
lines changed

docs/manual/codestyle.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ Luban中可以控制以下几个位置的命名风格:
4444
|typescript|pascal|pascal|camel|camel|camel|none|
4545
|c++|snake|pascal|pascal|pascal|camel|none|
4646
|python|snake|pascal|snake|snake|snake|none|
47+
|dart|pascal|pascal|camel|camel|camel|none|
4748

4849
如果不在这些语言列表,则取none代码风格,即使用原样名字。
4950

docs/manual/commandtools.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ Luban.SchemaCollector.Builtin项目实现了DefaultSchemaCollector,它支持
102102
|rust-bin|生成rust代码,读取bin格式文件|
103103
|rust-json|生成rust代码,读取json格式文件|
104104
|php-json|php,读取json格式文件|
105+
|dart-json|生成dart代码,读取json格式文件|
105106
|protobuf2| 生成proto2语法的schema文件|
106107
|protobuf3| 生成proto3语法的schema文件|
107108
|flatbuffers| 生成flatbuffers的schema文件|
@@ -160,7 +161,7 @@ Luban.Core中实现一个默认管线DefaultPipeline,名为default。使用者
160161
|-|-|-|-|
161162
|{codeTarget}.outputCodeDir|代码目标的输出目录|| -x outputCodeDir=/my/output/dir|
162163
|{dataTarget}.outputDataDir|数据目标的输出目录|| -x outputDataDir=/my/output/dir|
163-
|codeStyle|代码目标的命名风格,内置实现的Code Target都会自动设置与目标语言相匹配的codeStyle,不需要显式指定|none、csharp-default、java-default、go-default、lua-default、typescript-default、cpp-default、python-default| -x codeStyle=csharp-default|
164+
|codeStyle|代码目标的命名风格,内置实现的Code Target都会自动设置与目标语言相匹配的codeStyle,不需要显式指定|none、csharp-default、java-default、go-default、lua-default、typescript-default、cpp-default、python-default、dart-default| -x codeStyle=csharp-default|
164165
|namingConvention.{codeTarget}.{location}|codeTarget为`--codeTarget`参数中指定的target名。location为风格位置,可选值为namespace、type、method、property、field、enumItem,详见[代码风格](./codestyle)。该参数为层级选项,如果不指定{codeTarget},则对所有target生效|none、pascal、camel、upper、snake|-x namingConvention.cs-bin.field=pascal|
165166
|dataExporter|数据导出器| null、default|-x dataExporter=default|
166167
|codePostprocess|代码后处理器,可以为多个|未实现任何内置postprocess| -x codePostProcess=a,b,c|

docs/manual/traits.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ Luban内置了丰富的特性。
9999
- python (2.7+ 及 3.0+)
100100
- gdscript (4.0+)
101101
- php
102+
- dart
102103

103104

104105
## 支持主流引擎、热更新方案和游戏平台

i18n/en/docusaurus-plugin-content-docs/current/manual/codestyle.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ Code style provides a set of naming style configurations that indicate the namin
4444
|typescript|pascal|pascal|camel|camel|camel|none|
4545
|c++|snake|pascal|pascal|pascal|camel|none|
4646
|python|snake|pascal|snake|snake|snake|none|
47+
|dart|pascal|pascal|camel|camel|camel|none|
4748

4849
If it is not in these language lists, the none code style is used, that is, the original name is used.
4950

i18n/en/docusaurus-plugin-content-docs/current/manual/commandtools.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ Currently, the following code targets are supported built-in:
9797
|go-bin| go, read bin format files|
9898
|go-json| go, read json format files|
9999
|python-json| python, read json format files|
100+
|dart-json| dart, read json format files|
100101
|gdscript-json| gdscript, read json format files. Note that if you use C# language development, it is recommended to use the more efficient cs-bin format|
101102
|typescript-bin| typescript, read json format files|
102103
|typescript-json| typescript, read json format files|

i18n/en/docusaurus-plugin-content-docs/current/manual/generatecodedata.md

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
- puerts
1919
- other
2020

21-
2221
## Support for popular game frameworks
2322

2423
- skynet
@@ -27,22 +26,23 @@
2726
- QFramework
2827
- other
2928

30-
## Support mainstream game development languages
31-
32-
- c# (.net framework 4+. dotnet core 3+)
33-
- java (1.6+)
34-
- go (1.10+)
35-
- lua (5.1+)
36-
- typescript (3.0+)
37-
- python (3.0+)
38-
- c++ (11+)。
39-
- erlang (18+). The classic version is supported by Luban and has not been migrated to the current version yet.
40-
- rust (1.5+). The classic version is supported by Luban and has not been migrated to the current version yet.
41-
- godot. The classic version is supported by Luban and has not been migrated to the current version yet.
29+
## Support mainstream game development languages
30+
31+
- c# (.net framework 4+. dotnet core 3+)
32+
- java (1.6+)
33+
- go (1.10+)
34+
- lua (5.1+)
35+
- typescript (3.0+)
36+
- python (3.0+)
37+
- c++ (11+)。
38+
- erlang (18+). The classic version is supported by Luban and has not been migrated to the current version yet.
39+
- rust (1.5+). The classic version is supported by Luban and has not been migrated to the current version yet.
40+
- godot. The classic version is supported by Luban and has not been migrated to the current version yet.
41+
- php
42+
- dart
4243

4344
It is very easy to customize or extend support for new languages.
4445

45-
4646
## Supported Data Formats
4747

4848
:::tip
@@ -120,6 +120,7 @@ In the same language, different codes need to be generated for loading different
120120
|php| | :heavy_check_mark: ||
121121
| rust | | :heavy_check_mark: | |
122122
| godot | | :heavy_check_mark: | |
123+
| dart | | :heavy_check_mark: | |
123124
| protobuf | :heavy_check_mark: | :heavy_check_mark: | |
124125

125126
## generate

i18n/en/docusaurus-plugin-content-docs/current/manual/traits.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ Generates well-modularized code for most languages, thanks to the type system's
9999
- python (2.7+ and 3.0+)
100100
- gdscript (4.0+)
101101
- php
102+
- dart
102103

103104

104105
## Support mainstream engines, hot update solutions and game platforms

versioned_docs/version-classic/intro.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ luban统一了游戏配置开发工作流,极大提升了策划和程序的工
1414
- 强大的数据解析和转换能力 {excel(csv,xls,xlsx)、json、bson、xml、yaml、lua、unity ScriptableObject} => {binary、json、bson、xml、lua、yaml、erlang、 custom format}
1515
- 增强的excel格式,可以简洁地配置出像简单列表、子结构、结构列表,以及任意复杂的深层次的嵌套结构。
1616
- 完备的类型系统,**支持OOP类型继承**,搭配excel、json、lua、xml等格式数据**灵活优雅**表达行为树、技能、剧情、副本之类复杂GamePlay数据
17-
- 支持生成c#、java、go、c++、lua、python、javascript、typescript、erlang、rust、gdscript 代码
17+
- 支持生成c#、java、go、c++、lua、python、javascript、typescript、erlang、rust、gdscript、dart 代码
1818
- 支持生成 protobuf(schema + binary + json)、flatbuffers(schema + json)、msgpack(binary)
1919
- 强大的数据校验能力。ref引用检查、path资源路径、range范围检查等等
2020
- 完善的本地化支持。静态文本值本地化、动态文本值本地化、时间本地化、main-patch多地区版本

versioned_docs/version-classic/manual/loadconfigatruntime.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ println(tables.TbItem.Get(12).Name)
8888

8989
与其他相似,取 --gen_types code_python27_json,data_json。但需要额外安装enum34包,可通过命令 'py -2 -m pip install enum34' 安装。
9090

91-
## 在java,python,c++,rust,lua 语言中加载配置
91+
## 其他语言及数据格式
9292

9393
请参见 [示例项目](https://gitee.com/focus-creative-games/luban_examples/tree/main/Projects)。找到与你项目类型相符的示例项目,参考其加载
9494
代码即可。

versioned_docs/version-classic/manual/traits.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,8 @@
139139
* python (2.7+ 及 3.0+)
140140
* rust
141141
* gdscript
142+
* php
143+
* dart
142144

143145
## 支持主流引擎和平台
144146

0 commit comments

Comments
 (0)