Skip to content

Commit ba6c5bb

Browse files
committed
Finish adding the ident-js-* support
1 parent e128682 commit ba6c5bb

File tree

2 files changed

+33
-9
lines changed

2 files changed

+33
-9
lines changed

docs/cli-usage.md

+10-6
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ djinni \
155155
| `--wasm-base-lib-include-prefix` | The path prefix to be added to djinni support library inlcude lines in generated files |
156156
| `--ts-out <out-folder>` | Path to the Typescript type definitions output folder |
157157
| `--ts-module <module>` | Name of the module for the Typescript types. `module.ts` by default. |
158-
| `--ts-support-files-out <out-folder>` | Path for where the support files `DjinniModule.[js|ts]` should be generated. No support files are generated if the path is not specified. |
158+
| `--ts-support-files-out <out-folder>` | Path for where the support files `DjinniModule.[js\|ts]` should be generated. No support files are generated if the path is not specified. |
159159

160160

161161
### Yaml Generation
@@ -244,11 +244,15 @@ Possible values: `FooBar`, `fooBar`, `foo_bar`, `FOO_BAR`, `m_fooBar`.
244244

245245
#### Javascript / Typescript
246246

247-
| Argument | Default |
248-
|----------------------|-----------|
249-
| `--ident-js-enum` | `FOO_BAR` |
250-
| `--ident-js-field` | `fooBar` |
251-
| `--ident-js-type` | `FooBar` |
247+
| Argument | Default |
248+
|-------------------------|-----------|
249+
| `--ident-js-type` | `FooBar` |
250+
| `--ident-js-type-param` | `FooBar` |
251+
| `--ident-js-method` | `fooBar` |
252+
| `--ident-js-local` | `fooBar` |
253+
| `--ident-js-enum` | `FOO_BAR` |
254+
| `--ident-js-const` | `FOO_BAR` |
255+
| `--ident-js-field` | `fooBar` |
252256

253257

254258
Example:

src/main/scala/djinni/Main.scala

+23-3
Original file line numberDiff line numberDiff line change
@@ -804,6 +804,26 @@ object Main {
804804
)
805805

806806
note("\nTypescript/Javascript options:")
807+
identStyle(
808+
"ident-js-type",
809+
"FooBar",
810+
c => { jsIdentStyle = jsIdentStyle.copy(ty = c) }
811+
)
812+
identStyle(
813+
"ident-js-type-param",
814+
"FooBar",
815+
c => { jsIdentStyle = jsIdentStyle.copy(typeParam = c) }
816+
)
817+
identStyle(
818+
"ident-js-method",
819+
"fooBar",
820+
c => { jsIdentStyle = jsIdentStyle.copy(method = c) }
821+
)
822+
identStyle(
823+
"ident-js-local",
824+
"fooBar",
825+
c => { jsIdentStyle = jsIdentStyle.copy(local = c) }
826+
)
807827
identStyle(
808828
"ident-js-enum",
809829
"FOO_BAR",
@@ -815,9 +835,9 @@ object Main {
815835
c => { jsIdentStyle = jsIdentStyle.copy(field = c) }
816836
)
817837
identStyle(
818-
"ident-js-type",
819-
"FooBar",
820-
c => { jsIdentStyle = jsIdentStyle.copy(ty = c) }
838+
"ident-js-const",
839+
"FOO_BAR",
840+
c => { jsIdentStyle = jsIdentStyle.copy(const = c) }
821841
)
822842
}
823843

0 commit comments

Comments
 (0)