In the Nexss Programmer the constants can be set by nConst("MY_CONSTANT","my value of the constant which cannot be changed.")
;
It has predefined constants which can be used in whole system.
fs, path, child_process (The same on NodeJS.)
console.log(process.distroName); // eg. Alpine Linux
console.log(process.distroVersion); // eg. 3.12.xb (string)
console.log(process.distroTag1); // eg. ALPINE3
console.log(process.distroTag2); // eg. ALPINE
console.log(process.distroSudo)
console.log(process.mem); // eg. 24670208
process.nexssCWD //current working directory
process.nexssFilename // contains actual filename which is executed.
process.nexssConfigContent //contains project config (is loaded once)
process.nexssCurrentCommand // containes current command which is run
Below multilines will be replaced by && and for Powershell ; so you can use multiline commands for install
Example of installing vlang
install: `Invoke-WebRequest -Uri https://github.com/vlang/v/releases/latest/download/v_windows.zip -OutFile ${process.env.NEXSS_APPS_PATH}/vlang/v_windows.zip
cd ${process.env.NEXSS_APPS_PATH}/vlang
make.bat
nexss System/Env/EnsurePath --EnvPathAdd=${process.env.NEXSS_APPS_PATH}/vlang`,
self.push({
display: chunk.display,
command: nexssCommand,
from: "transform-nexss",
stream: "stop",
reason: reason ? reason : "reason not specified",
status: "end",
data,
command: process.nexssCMD,
});