"]
6 | license = "MIT"
7 |
8 | [lib]
9 | crate-type = ["cdylib", "rlib"]
10 |
11 | [dependencies]
12 | farmfe_core = { workspace = true }
13 | farmfe_toolkit_plugin_types = { workspace = true }
14 | farmfe_macro_plugin = { workspace = true }
15 | farmfe_toolkit = { workspace = true }
16 | serde = { version = "1.0.197", features = ["derive"] }
17 | regex = "1.10.4"
18 |
--------------------------------------------------------------------------------
/examples/babel-react-compiler/src/App.jsx:
--------------------------------------------------------------------------------
1 | import React, { useCallback, useEffect, useState } from 'react';
2 |
3 | export default function App() {
4 | const [count, setCount] = useState(1);
5 |
6 | useEffect(() => {
7 | console.log(count);
8 | }, [count]);
9 |
10 | const inc = useCallback(() => setCount(v => v + 1), []);
11 |
12 | return (
13 |
14 |
hello world {count}
15 |
16 |
17 | );
18 | }
19 |
--------------------------------------------------------------------------------
/rust-plugins/auto-import/playground-vue/src/assets/vue.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/.changeset/README.md:
--------------------------------------------------------------------------------
1 | # Changesets
2 |
3 | Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
4 | with multi-package repos, or single-package repos to help you version and publish your code. You can
5 | find the full documentation for it [in our repository](https://github.com/changesets/changesets)
6 |
7 | We have a quick list of common questions to get you started engaging with this project in
8 | [our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
9 |
--------------------------------------------------------------------------------
/rust-plugins/auto-import/src/presets/react_router_dom.rs:
--------------------------------------------------------------------------------
1 | use super::ImportPreset;
2 |
3 | pub fn get_react_router_dom_preset() -> ImportPreset {
4 | ImportPreset {
5 | imports: vec![
6 | "useLinkClickHandler".to_string(),
7 | "useSearchParams".to_string(),
8 | "Link".to_string(),
9 | "NavLink".to_string(),
10 | "Navigate".to_string(),
11 | "Outlet".to_string(),
12 | "Route".to_string(),
13 | "Routes".to_string(),
14 | ],
15 | from: "react-router-dom".to_string(),
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/rust-plugins/compress/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | edition = "2021"
3 | name = "farmfe_plugin_compress"
4 | version = "0.0.0"
5 |
6 | [lib]
7 | crate-type = ["cdylib", "rlib"]
8 |
9 | [dependencies]
10 | farmfe_core = { workspace = true }
11 | farmfe_toolkit_plugin_types = { workspace = true }
12 | farmfe_macro_plugin = { workspace = true }
13 | farmfe_toolkit = { workspace = true }
14 | serde = { version = "1.0.217", features = ["derive"] }
15 | serde_json = "1.0.138"
16 | flate2 = { version = "1.0.35", features = ["zlib"] }
17 | brotli = "7.0.0"
18 |
--------------------------------------------------------------------------------
/rust-plugins/auto-import/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | edition = "2021"
3 | name = "farmfe_plugin_auto_import"
4 | version = "0.0.0"
5 |
6 | [lib]
7 | crate-type = ["cdylib", "rlib"]
8 |
9 | [dependencies]
10 | farmfe_core = { workspace = true }
11 | farmfe_utils = { workspace = true }
12 | farmfe_toolkit_plugin_types = { workspace = true }
13 | farmfe_macro_plugin = { workspace = true }
14 | farmfe_toolkit = { workspace = true }
15 |
16 | serde = { version = "1.0.197", features = ["derive"] }
17 | glob = "0.3.1"
18 | walkdir = "2.5.0"
19 | regress = "0.10.1"
20 |
--------------------------------------------------------------------------------
/rust-plugins/icons/src/compiler/solid.rs:
--------------------------------------------------------------------------------
1 | use farmfe_core::regex::Regex;
2 |
3 | use super::CompilerParams;
4 |
5 | pub fn solid_compiler(parm: CompilerParams) -> String {
6 | let CompilerParams { svg, .. } = parm;
7 | let re_braces = Regex::new(r"([{}])").unwrap();
8 | let svg_with_props = re_braces.replace_all(&svg, "{'$1'}");
9 | let re_svg_tag = Regex::new(r"(?<=