config
This commit is contained in:
parent
41d402625b
commit
af3c42f7e8
10 changed files with 170 additions and 75 deletions
|
|
@ -58,12 +58,17 @@ if (!fs.existsSync("asajs.config.js")) {
|
|||
}
|
||||
|
||||
export const config: Config = createRequire(import.meta.url)(path.resolve(process.cwd(), "asajs.config.js")).config
|
||||
export const debugMode = options["debug"] ?? false
|
||||
|
||||
export const isBuildMode = options["build"] ?? config.compiler?.enabled ?? false
|
||||
export const isLinkMode = options["link"] ?? config.compiler?.autoImport ?? false
|
||||
export const unLinked = options["unlink"] ?? !(config.compiler?.autoImport ?? true)
|
||||
export const buildFolder = config.compiler?.buildFolder || "build"
|
||||
export const uiBuildFolder = config.compiler?.uiBuildFolder || "asajs"
|
||||
export const isNotObfuscate = debugMode || !(config.compiler?.obfuscateStringName ?? false)
|
||||
export const allowRandomStringName = !debugMode || (config.compiler?.allowRandomStringName ?? true)
|
||||
export const namespaceCount = debugMode ? 5 : (config.compiler?.namespaceCount ?? 15)
|
||||
export const forceRandomStringLength = debugMode ? 10 : config.compiler?.forceRandomStringLength
|
||||
|
||||
export const bindingFuntions = config.binding_functions
|
||||
|
||||
|
|
|
|||
Reference in a new issue