Installation
Install via npm
Section titled “Install via npm”npm install -g purusVerify
Section titled “Verify”purus versionYour first program
Section titled “Your first program”Create a file hello.purus:
const message be ///Hello, World///console.log[message]Compile and run:
purus build hello.purusnode hello.jsOr run directly without generating files:
purus run hello.purusCreate a project
Section titled “Create a project”Use purus new to set up a project with configuration, scripts, and dependencies:
purus new my-projectcd my-projectnpm run buildFile extensions
Section titled “File extensions”| Extension | Output | Use case |
|---|---|---|
.purus | .js | Standard JavaScript |
.cpurus | .cjs | CommonJS module |
.mpurus | .mjs | ES Module |