{"id":25659,"library":"greybel-transpiler","title":"greybel-transpiler","description":"MiniScript transpiler written in TypeScript that converts MiniScript source files into deployable code with three build modes: default, beautify, and uglify. Version 4.0.1 supports automatic dependency resolution for #include and #import directives, variable/module namespace obfuscation, environment variable injection at transpile time, and literal deduplication. It offers both DirectTranspiler for quick single-file transpilation and Transpiler for full multi-file builds with dependency graphs and installer output. Built on greybel-core, it targets the MiniScript ecosystem and includes TypeScript type definitions.","status":"active","version":"4.0.1","language":"javascript","source_language":"en","source_url":"https://github.com/ayecue/greybel-transpiler","tags":["javascript","miniscript","typescript"],"install":[{"cmd":"npm install greybel-transpiler","lang":"bash","label":"npm"},{"cmd":"yarn add greybel-transpiler","lang":"bash","label":"yarn"},{"cmd":"pnpm add greybel-transpiler","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Core library for MiniScript parsing and AST manipulation","package":"greybel-core","optional":false}],"imports":[{"note":"ESM and TypeScript import. CommonJS requires .DirectTranspiler property access.","wrong":"const DirectTranspiler = require('greybel-transpiler').DirectTranspiler","symbol":"DirectTranspiler","correct":"import { DirectTranspiler } from 'greybel-transpiler'"},{"note":"Named export, not default. Use braces.","wrong":"import Transpiler from 'greybel-transpiler'","symbol":"Transpiler","correct":"import { Transpiler } from 'greybel-transpiler'"},{"note":"Exact casing: BuildType, not BuildTypes.","wrong":"import { BuildTypes } from 'greybel-transpiler'","symbol":"BuildType","correct":"import { BuildType } from 'greybel-transpiler'"},{"note":"No default export. Use named imports as above.","wrong":"const greybel = require('greybel-transpiler')","symbol":"greybel-transpiler","correct":""}],"quickstart":{"code":"import { DirectTranspiler, BuildType } from 'greybel-transpiler';\n\nconst result = new DirectTranspiler({\n  code: 'print \"hello world\"',\n  buildType: BuildType.BEAUTIFY,\n  obfuscation: false\n}).parse();\n\nconsole.log(result);\n\n// Or multi-file with Transpiler:\nimport { Transpiler, BuildType } from 'greybel-transpiler';\n\nconst result2 = await new Transpiler({\n  target: '/path/to/main.src',\n  buildType: BuildType.DEFAULT,\n  obfuscation: true,\n  installer: true,\n  environmentVariables: new Map([['VERSION', '\"1.0.0\"']])\n}).parse();\n\nconsole.log(result2);","lang":"typescript","description":"Shows basic usage of DirectTranspiler for single-file and Transpiler for multi-file project with obfuscation and env vars."},"warnings":[{"fix":"Use Transpiler with target file path instead of DirectTranspiler when needing dependency resolution.","message":"DirectTranspiler does not resolve #include or #import dependencies; it only parses the given code string. Use Transpiler for dependency resolution.","severity":"gotcha","affected_versions":">=4.0.0"},{"fix":"Review greybel-transpiler changelog and update code accordingly.","message":"Version 4.x may have breaking changes from 3.x; check changelog for specific migration steps.","severity":"breaking","affected_versions":">=4.0.0"},{"fix":"Always explicitly set obfuscation: false if you don't want variable name mangling.","message":"Obfuscation is enabled by default in Transpiler? Verify the constructor option; if obfuscation is not set, it may default to true. The README example sets it explicitly.","severity":"gotcha","affected_versions":">=4.0.0"},{"fix":"Use imported BuildType enum, not hardcoded strings.","message":"BuildType enum values might change; ensure you use the string 'BuildType.BEAUTIFY' not deprecated string literals.","severity":"deprecated","affected_versions":">=4.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 greybel-transpiler. Use import { DirectTranspiler } from 'greybel-transpiler' with correct named export.","cause":"Package not installed or not imported correctly.","error":"Cannot find module 'greybel-transpiler' or its corresponding type declarations."},{"fix":"Use import { DirectTranspiler } from 'greybel-transpiler' instead of import DirectTranspiler from ...","cause":"Default import used instead of named import.","error":"TypeError: DirectTranspiler is not a constructor"},{"fix":"Correct the import to { BuildType }.","cause":"Misspelled BuildType as BuildTypes or similar.","error":"Property 'BuildType' does not exist on type 'typeof import(...)'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}