|
| 1 | +[package] |
| 2 | +name = "miniref" |
| 3 | +version = "0.1.0" |
| 4 | +edition = "2021" |
| 5 | + |
| 6 | +[lib] |
| 7 | +crate-type = ["cdylib", "rlib"] |
| 8 | + |
| 9 | +[dependencies] |
| 10 | +leptos = { version = "0.7.0", features = ["nightly"] } |
| 11 | +leptos_router = { version = "0.7.0", features = ["nightly"] } |
| 12 | +# Axum and leptos_axum must have a version match |
| 13 | +axum = { version = "0.7.0", optional = true } |
| 14 | +console_error_panic_hook = "0.1" |
| 15 | +leptos_axum = { version = "0.7.0", optional = true } |
| 16 | +leptos_meta = { version = "0.7.0" } |
| 17 | +tokio = { version = "1", features = ["rt-multi-thread"], optional = true } |
| 18 | +tower = { version = "0.5.2", optional = true } |
| 19 | +tower-http = { version = "0.6.2", features = ["fs"], optional = true } |
| 20 | +wasm-bindgen = "=0.2.99" |
| 21 | +thiserror = "1" |
| 22 | +http = "1" |
| 23 | +serde = { version = "1.0.217", features = ["derive"]} |
| 24 | +gray_matter = { version = "0.2.8", optional = true } |
| 25 | +reqwest = { version = "0.12.12", features = ["json"], optional = true } |
| 26 | +katex = { version = "0.4.6", features = ["quick-js"], optional = true } |
| 27 | +regex = { version = "1.11.1", optional = true } |
| 28 | +syntect = { version = "5.2.0", optional = true } |
| 29 | +html-escape = { version = "0.2.13", optional = true } |
| 30 | +web-sys = "0.3.76" |
| 31 | +js-sys = "0.3.76" |
| 32 | + |
| 33 | +[dependencies.markdown] |
| 34 | +version = "1.0.0-alpha.21" |
| 35 | +optional = true |
| 36 | + |
| 37 | +[dependencies.mime_guess] |
| 38 | +version = "2.0" |
| 39 | +optional = true |
| 40 | + |
| 41 | + |
| 42 | +[features] |
| 43 | +hydrate = ["leptos/hydrate"] |
| 44 | +ssr = [ |
| 45 | + "dep:axum", |
| 46 | + "dep:gray_matter", |
| 47 | + "dep:katex", |
| 48 | + "dep:regex", |
| 49 | + "dep:syntect", |
| 50 | + "dep:html-escape", |
| 51 | + "dep:markdown", |
| 52 | + "dep:mime_guess", |
| 53 | + "dep:reqwest", |
| 54 | + "dep:tokio", |
| 55 | + "dep:tower", |
| 56 | + "dep:tower-http", |
| 57 | + "dep:leptos_axum", |
| 58 | + "leptos/ssr", |
| 59 | + "leptos_meta/ssr", |
| 60 | + "leptos_router/ssr", |
| 61 | +] |
| 62 | + |
| 63 | +# Defines a size-optimized profile for the WASM bundle in release mode |
| 64 | +[profile.wasm-release] |
| 65 | +inherits = "release" |
| 66 | +opt-level = 'z' |
| 67 | +lto = true |
| 68 | +codegen-units = 1 |
| 69 | +panic = "abort" |
| 70 | + |
| 71 | +[package.metadata.leptos] |
| 72 | +# The name used by wasm-bindgen/cargo-leptos for the JS/WASM bundle. Defaults to the crate name |
| 73 | +output-name = "miniref" |
| 74 | + |
| 75 | +# The site root folder is where cargo-leptos generate all output. WARNING: all content of this folder will be erased on a rebuild. Use it in your server setup. |
| 76 | +site-root = "target/site" |
| 77 | + |
| 78 | +# The site-root relative folder where all compiled output (JS, WASM and CSS) is written |
| 79 | +# Defaults to pkg |
| 80 | +site-pkg-dir = "pkg" |
| 81 | + |
| 82 | +# [Optional] The source CSS file. If it ends with .sass or .scss then it will be compiled by dart-sass into CSS. The CSS is optimized by Lightning CSS before being written to <site-root>/<site-pkg>/app.css |
| 83 | +style-file = "style/main.scss" |
| 84 | +# Assets source dir. All files found here will be copied and synchronized to site-root. |
| 85 | +# The assets-dir cannot have a sub directory with the same name/path as site-pkg-dir. |
| 86 | +# |
| 87 | +# Optional. Env: LEPTOS_ASSETS_DIR. |
| 88 | +assets-dir = "public" |
| 89 | + |
| 90 | +# The IP and port (ex: 127.0.0.1:3000) where the server serves the content. Use it in your server setup. |
| 91 | +site-addr = "127.0.0.1:3000" |
| 92 | + |
| 93 | +# The port to use for automatic reload monitoring |
| 94 | +reload-port = 3001 |
| 95 | + |
| 96 | +# [Optional] Command to use when running end2end tests. It will run in the end2end dir. |
| 97 | +# [Windows] for non-WSL use "npx.cmd playwright test" |
| 98 | +# This binary name can be checked in Powershell with Get-Command npx |
| 99 | +end2end-cmd = "pnpm playwright test" |
| 100 | +end2end-dir = "end2end" |
| 101 | + |
| 102 | +# The browserlist query used for optimizing the CSS. |
| 103 | +browserquery = "defaults" |
| 104 | + |
| 105 | +# The environment Leptos will run in, usually either "DEV" or "PROD" |
| 106 | +env = "DEV" |
| 107 | + |
| 108 | +# The features to use when compiling the bin target |
| 109 | +# |
| 110 | +# Optional. Can be over-ridden with the command line parameter --bin-features |
| 111 | +bin-features = ["ssr"] |
| 112 | + |
| 113 | +# If the --no-default-features flag should be used when compiling the bin target |
| 114 | +# |
| 115 | +# Optional. Defaults to false. |
| 116 | +bin-default-features = false |
| 117 | + |
| 118 | +# The features to use when compiling the lib target |
| 119 | +# |
| 120 | +# Optional. Can be over-ridden with the command line parameter --lib-features |
| 121 | +lib-features = ["hydrate"] |
| 122 | + |
| 123 | +# If the --no-default-features flag should be used when compiling the lib target |
| 124 | +# |
| 125 | +# Optional. Defaults to false. |
| 126 | +lib-default-features = false |
| 127 | + |
| 128 | +# The profile to use for the lib target when compiling for release |
| 129 | +# |
| 130 | +# Optional. Defaults to "release". |
| 131 | +lib-profile-release = "wasm-release" |
0 commit comments