1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
/// Binary invoked to build the WASM bundle.
pub const EUV_BIN: &str = "euv";
/// CLI flag (space form) selecting the output directory.
pub const OUT_FLAG: &str = "--out";
/// Environment variable that carries the user's PATH for child processes.
pub const PATH_ENV: &str = "PATH";
/// CLI flag (space form) selecting the wasm package name.
pub const NAME_FLAG: &str = "--name";
/// CLI flag selecting the dev (non-release) wasm profile.
pub const DEBUG_FLAG: &str = "--debug";
/// Prefix marker for `--out=<DIR>` inline form; slice delimiter for the value.
pub const PREFIX_OUT: &str = "--out=";
/// Prefix marker for `--name=<NAME>` inline form; slice delimiter for the value.
pub const PREFIX_NAME: &str = "--name=";
/// Default wasm package name (used by wasm-pack as `--out-name`).
pub const DEFAULT_NAME: &str = "euv_docs";
/// Path fragment appended to the user output dir to hold wasm-pack artifacts.
pub const PKG_DIR_NAME: &str = "pkg";
/// CLI flag selecting the release wasm profile (the default).
pub const RELEASE_FLAG: &str = "--release";
/// CLI flag selecting the unoptimized wasm profile (faster build, slower runtime).
pub const EUV_DEBUG_FLAG: &str = "--debug";
/// CLI flag (long form) for `--help`.
pub const HELP_FLAG_LONG: &str = "--help";
/// Default output directory name (relative to cwd).
pub const DEFAULT_OUT_DIR: &str = "dist";
/// CLI flag (space form) selecting the index.html template path.
pub const INDEX_HTML_FLAG: &str = "--index-html";
/// Prefix marker for `--index-html=<PATH>` inline form; slice delimiter for the value.
pub const PREFIX_INDEX_HTML: &str = "--index-html=";
/// CLI flag selecting the wasm-pack web target.
pub const EUV_TARGET_FLAG: &str = "--target";
/// CLI flag (short form) for `--help`.
pub const HELP_FLAG_SHORT: &str = "-h";
/// Web target value for wasm-pack.
pub const WASM_TARGET_WEB: &str = "web";
/// Site source directory must contain this TOML config.
///
/// **Deprecated**: euv-docs 0.2.0+ reads site config from the
/// parent README.md frontmatter (`<SRC_DIR>/../README.md`). This
/// constant is retained so the CLI can emit a helpful warning when
/// neither the legacy config.toml nor the README.md frontmatter
/// is present.
pub const CONFIG_FILE_NAME: &str = "config.toml";
/// euv subcommand that triggers the actual build.
pub const EUV_BUILD_SUBCMD: &str = "build";
/// CLI flag disabling `wasm-pack pack` artifact bundling.
pub const EUV_NO_PACK_FLAG: &str = "--no-pack";
/// CLI flag selecting the wasm-pack output directory.
pub const EUV_OUT_DIR_FLAG: &str = "--out-dir";
/// CLI flag selecting the optimized wasm profile.
pub const EUV_RELEASE_FLAG: &str = "--release";
/// Argument for unknown flag starting with `-`.
pub const MSG_UNKNOWN_FLAG: &str = "unknown flag";
/// CLI flag selecting the wasm-pack package name.
pub const EUV_OUT_NAME_FLAG: &str = "--out-name";
/// CLI flag (long form) for `--version`.
pub const VERSION_FLAG_LONG: &str = "--version";
/// HTML template copied into the output root by `euv build --index-html`.
pub const TEMPLATE_FILE_NAME: &str = "template.html";
/// CLI flag (short form) for `--version`.
pub const VERSION_FLAG_SHORT: &str = "-v";
/// CLI flag passed to `euv build` to forward `template.html`.
pub const EUV_INDEX_HTML_FLAG: &str = "--index-html";
/// Positional marker that ends `euv build` flags and starts wasm-pack flags.
pub const WASM_PACK_DELIMITER: &str = "--";
/// Environment variable the build script reads for the output directory.
pub const EUV_DOCS_OUT_DIR_ENV: &str = "EUV_DOCS_OUT_DIR";
/// Environment variable the build script reads for the source directory.
pub const EUV_DOCS_SRC_DIR_ENV: &str = "EUV_DOCS_SRC_DIR";
/// CLI flag disabling `.gitignore` generation inside the wasm output dir.
pub const EUV_NO_GITIGNORE_FLAG: &str = "--no-gitignore";
/// CLI flag disabling TypeScript generation in wasm-pack.
pub const EUV_NO_TYPESCRIPT_FLAG: &str = "--no-typescript";
/// CLI flag (space form) building a single locale bundle.
pub const LOCALE_FLAG: &str = "--locale";
/// Prefix marker for `--locale=<NAME>` inline form; slice delimiter for the value.
pub const PREFIX_LOCALE: &str = "--locale=";
/// Environment variable the build script reads for the pinned locale.
pub const EUV_DOCS_LOCALE_ENV: &str = "EUV_DOCS_LOCALE";
/// Hidden deployment-metadata directory inside the site output where the
/// build script writes the locale manifest.
pub const DEPLOY_DIR_NAME: &str = ".deploy";
/// Locale manifest file the first build writes into `.deploy/`; the CLI
/// reads it to discover the remaining locales to build.
pub const LOCALE_MANIFEST_FILE_NAME: &str = "locales.tsv";
/// Argument missing the value for `--out <DIR>` / `--name <NAME>`.
pub const MSG_FLAG_REQUIRES_VALUE: &str = "flag requires a value";
/// Error when the required `<SRC_DIR>` positional argument is absent.
pub const MSG_MISSING_SRC_DIR: &str = "missing required <SRC_DIR> argument";
/// The SPA shell `euv build` writes into the output root; also copied
/// to `404.html` below so static hosts serve the app for unknown paths.
pub const INDEX_HTML_FILE_NAME: &str = "index.html";
/// The static-host 404 fallback, a copy of the SPA shell.
pub const NOT_FOUND_HTML_FILE_NAME: &str = "404.html";