Struct deno_config::ConfigFile
source · pub struct ConfigFile {
pub specifier: Url,
pub json: ConfigFileJson,
}
Fields§
§specifier: Url
§json: ConfigFileJson
Implementations§
source§impl ConfigFile
impl ConfigFile
pub fn discover( config_flag: &ConfigFlag, maybe_config_path_args: Option<Vec<PathBuf>>, cwd: &Path ) -> Result<Option<ConfigFile>, AnyError>
pub fn discover_from( start: &Path, checked: &mut HashSet<PathBuf> ) -> Result<Option<ConfigFile>, AnyError>
pub fn read(config_path: &Path) -> Result<Self, AnyError>
pub fn from_specifier(specifier: Url) -> Result<Self, AnyError>
pub fn new(text: &str, specifier: Url) -> Result<Self, AnyError>
pub fn dir_path(&self) -> PathBuf
sourcepub fn get_check_js(&self) -> bool
pub fn get_check_js(&self) -> bool
Returns true if the configuration indicates that JavaScript should be type checked, otherwise false.
sourcepub fn to_compiler_options(
&self
) -> Result<(Value, Option<IgnoredCompilerOptions>), AnyError>
pub fn to_compiler_options( &self ) -> Result<(Value, Option<IgnoredCompilerOptions>), AnyError>
Parse compilerOptions
and return a serde Value
.
The result also contains any options that were ignored.
pub fn to_import_map_path(&self) -> Option<String>
pub fn node_modules_dir_flag(&self) -> Option<bool>
pub fn vendor_dir_flag(&self) -> Option<bool>
pub fn vendor_dir_path(&self) -> Option<PathBuf>
pub fn to_import_map_value(&self) -> Value
pub fn is_an_import_map(&self) -> bool
pub fn has_unstable(&self, name: &str) -> bool
pub fn to_exports_config(&self) -> Result<ExportsConfig, AnyError>
pub fn to_files_config(&self) -> Result<Option<FilePatterns>, AnyError>
pub fn to_fmt_config(&self) -> Result<Option<FmtConfig>, AnyError>
pub fn to_lint_config(&self) -> Result<Option<LintConfig>, AnyError>
pub fn to_test_config(&self) -> Result<Option<TestConfig>, AnyError>
pub fn to_publish_config(&self) -> Result<Option<PublishConfig>, AnyError>
pub fn to_workspace_config(&self) -> Result<Option<WorkspaceConfig>, AnyError>
pub fn to_bench_config(&self) -> Result<Option<BenchConfig>, AnyError>
sourcepub fn to_lsp_tasks(&self) -> Option<Value>
pub fn to_lsp_tasks(&self) -> Option<Value>
Return any tasks that are defined in the configuration file as a sequence of JSON objects providing the name of the task and the arguments of the task in a detail field.
pub fn to_tasks_config( &self ) -> Result<Option<IndexMap<String, String>>, AnyError>
sourcepub fn to_maybe_imports(&self) -> Result<Vec<(Url, Vec<String>)>, AnyError>
pub fn to_maybe_imports(&self) -> Result<Vec<(Url, Vec<String>)>, AnyError>
If the configuration file contains “extra” modules (like TypeScript
"types"
) options, return them as imports to be added to a module graph.
sourcepub fn to_maybe_jsx_import_source_config(
&self
) -> Result<Option<JsxImportSourceConfig>, AnyError>
pub fn to_maybe_jsx_import_source_config( &self ) -> Result<Option<JsxImportSourceConfig>, AnyError>
Based on the compiler options in the configuration file, return the JSX import source configuration.
pub fn resolve_tasks_config(&self) -> Result<IndexMap<String, String>, AnyError>
pub fn to_lock_config(&self) -> Result<Option<LockConfig>, AnyError>
pub fn resolve_lockfile_path(&self) -> Result<Option<PathBuf>, AnyError>
Trait Implementations§
source§impl Clone for ConfigFile
impl Clone for ConfigFile
source§fn clone(&self) -> ConfigFile
fn clone(&self) -> ConfigFile
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl RefUnwindSafe for ConfigFile
impl Send for ConfigFile
impl Sync for ConfigFile
impl Unpin for ConfigFile
impl UnwindSafe for ConfigFile
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more