From f918da96884618cdedf2ed2602e49ddde4c06ba6 Mon Sep 17 00:00:00 2001 From: Joshua McQuistan Date: Fri, 10 Nov 2023 17:14:14 +0000 Subject: [PATCH] Revert remove use of --cfg=web_sys_unstable_apis for templates --- template/.ffizer.yaml | 4 ++++ template/src/{{ module }}/{{ function_name }}.ffizer.hbs.rs | 3 +++ 2 files changed, 7 insertions(+) diff --git a/template/.ffizer.yaml b/template/.ffizer.yaml index 58c6216..cafee3e 100644 --- a/template/.ffizer.yaml +++ b/template/.ffizer.yaml @@ -3,6 +3,10 @@ variables: ask: Name of the function - name: category ask: Documentation category (lower case) + - name: unstable_apis + default_value: "false" + ask: Does the function require `--cfg=web_sys_unstable_apis` to be activated? + select_in_values: ["true", "false"] - name: module default_value: "" ask: Module [optional] diff --git a/template/src/{{ module }}/{{ function_name }}.ffizer.hbs.rs b/template/src/{{ module }}/{{ function_name }}.ffizer.hbs.rs index 3217414..0edb6ba 100644 --- a/template/src/{{ module }}/{{ function_name }}.ffizer.hbs.rs +++ b/template/src/{{ module }}/{{ function_name }}.ffizer.hbs.rs @@ -3,6 +3,9 @@ use leptos::*; ///{{#if (eq unstable_apis "true")}} /// +/// > This function requires `--cfg=web_sys_unstable_apis` to be activated as +/// [described in the wasm-bindgen guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html).{{/if}} +/// /// ## Demo /// /// [Link to Demo](https://github.com/Synphonyte/leptos-use/tree/main/examples/{{ function_name }})