{"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,"search_vec":"'4.0.1':26 'automat':28 'beautifi':22 'build':19,65 'built':72 'code':16 'convert':10 'core':76 'dedupl':47 'default':21 'definit':86 'depend':29,67 'deploy':15 'direct':35 'directtranspil':51 'ecosystem':81 'environ':39 'file':13,56,64 'full':61 'graph':68 'greybel':2,75 'greybel-cor':74 'greybel-transpil':1 'import':34 'includ':32,83 'inject':41 'instal':70 'javascript':87 'liter':46 'miniscript':4,11,80,88 'mode':20 'multi':63 'multi-fil':62 'namespac':37 'obfusc':38 'offer':49 'output':71 'quick':53 'resolut':30 'singl':55 'single-fil':54 'sourc':12 'support':27 'target':78 'three':18 'time':44 'transpil':3,5,43,57,59 'type':85 'typescript':8,84,89 'uglifi':24 'variabl':40 'variable/module':36 'version':25 'written':6","created_at":"2026-05-01T13:45:54.630387+00:00","updated_at":"2026-05-01T13:45:54.630387+00:00","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,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"greybel","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/ayecue/greybel-transpiler","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/greybel-transpiler","openapi_spec":null,"status_page":null,"smithery":null,"categories":["serialization","devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-05-01","next_check":"2026-07-30","install_tag":null}}