{"id":27088,"library":"jspp-compiler","title":"JSPP Compiler","description":"JSPP Compiler (v2.0.8) transpiles JSPP entry files and included modules into standalone JavaScript. It automatically resolves includes without manual std inclusion. Released as an npm package, it is the primary compiler for the JSPP language aimed at browser-compatible output. Minimal configuration: entry file, root directory, and output file.","status":"active","version":"2.0.8","language":"javascript","source_language":"en","source_url":null,"tags":["javascript","jspp"],"install":[{"cmd":"npm install jspp-compiler","lang":"bash","label":"npm"},{"cmd":"yarn add jspp-compiler","lang":"bash","label":"yarn"},{"cmd":"pnpm add jspp-compiler","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"Default export is not defined; use named export.","symbol":"compile","correct":"import { compile } from 'jspp-compiler';"},{"note":"Works in both ESM and CJS.","wrong":"const compileFile = require('jspp-compiler').compileFile;","symbol":"compileFile","correct":"import { compileFile } from 'jspp-compiler';"}],"quickstart":{"code":"import { compileFile } from 'jspp-compiler';\n\nconst inputFilePath = 'path/to/entry.jspp';\nconst rootDir = 'path/to/root';\nconst outputFilePath = 'path/to/output.js';\n\ncompileFile({ input: inputFilePath, root: rootDir, output: outputFilePath });","lang":"typescript","description":"Transpiles a JSPP entry file to JavaScript using compileFile."},"warnings":[{"fix":"Use absolute paths or ensure relative paths are correct.","message":"The root directory must be provided and must be absolute or relative to the current working directory. Incorrect root may cause include resolution failures.","severity":"gotcha","affected_versions":">=2.0.0"},{"fix":"Migrate to async/await or .then() patterns.","message":"Version 2.0.0 changed the API from callback-based to promise-based. Old code using callbacks will break.","severity":"breaking","affected_versions":">=2.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run 'npm install jspp-compiler'","cause":"Package not installed","error":"Error: Cannot find module 'jspp-compiler'"},{"fix":"Use named import: import { compile } from 'jspp-compiler'","cause":"Importing incorrectly (default vs named)","error":"TypeError: compile is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}