-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
901b6da
commit c74be33
Showing
6 changed files
with
37 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Attributes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# demo_gen | ||
See the tracking issue: https://github.com/rust-diplomat/diplomat/issues/604. | ||
|
||
## Using demo_gen |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Configuring Markup | ||
Diplomat takes the `-l` or `--library-config` option (in `diplomat_tool::gen` this is the `library_config` parameter). This represents a path to a `.toml` file that demo_gen will then read and convert into `DemoConfig`. | ||
|
||
Here's a sample .toml file for configuration (with comments for clarity): | ||
|
||
```toml | ||
# If false, demo_gen will automatically search all methods for functions it can generate demonstration JS for. | ||
# If true, demo_gen will look for any methods explicitly flagged with #[diplomat::demo(generate)] to perform generation. | ||
explicit-generation=true # default = false (bool) | ||
|
||
# This removes the rendering/ folder. | ||
hide-default-renderer=true # default = false (bool) | ||
|
||
# Adjusts all imports that demo_gen creates to a specific module. Setting this will not generate the js/ folder. | ||
# | ||
# So for instance, this setting will adjust imports to: `import { type } from "icu4x"; | ||
module-name="icu4x" # (string) | ||
|
||
# Adjusts all imports that demo_gen creates to a relative path where Diplomat JS output should be. Setting this will not generate the js/ folder. | ||
# | ||
# Setting this will adjust imports to: `import {type} from "../js/folder/here/index.mjs"; | ||
# | ||
# Intended to be a mutually exclusive setting with module-name, although you can set both simultaneously to import modules from a relative path. | ||
relative-js-path="../js/folder/here" # (string) | ||
``` |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters