{"id":25109,"library":"compiler","title":"node-compiler","description":"A web compile tool (v0.1.2) for building pipelines of compilation tasks. It provides a plugin-based architecture where processing steps (e.g., transpilation, minification) are chained in a pipeline. Unlike monolithic build tools, it focuses solely on orchestrating compilers. Released as a minimal Node.js package with no stable release cadence; current version is pre-1.0. It differentiates by being lightweight and extensible via custom plugins.","status":"active","version":"0.1.2","language":"javascript","source_language":"en","source_url":"git://github.com/iazrael/compiler","tags":["javascript"],"install":[{"cmd":"npm install compiler","lang":"bash","label":"npm"},{"cmd":"yarn add compiler","lang":"bash","label":"yarn"},{"cmd":"pnpm add compiler","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Runtime requirement","package":"node","optional":false}],"imports":[{"note":"Default import is ESM-style; default export is a class.","wrong":"const Compiler = require('compiler')","symbol":"Compiler","correct":"import Compiler from 'compiler'"},{"note":"Named export for factory function.","wrong":"import createCompiler from 'compiler'","symbol":"createCompiler","correct":"import { createCompiler } from 'compiler'"},{"note":"Plugin is a type/interface; use type-only import.","wrong":"import { Plugin } from 'compiler'","symbol":"Plugin","correct":"import type { Plugin } from 'compiler'"}],"quickstart":{"code":"import Compiler from 'compiler';\n\nconst compiler = new Compiler();\n\ncompiler.use(input => input.toUpperCase());\ncompiler.use(input => input + '!');\n\nconst result = compiler.run('hello');\nconsole.log(result); // 'HELLO!'","lang":"javascript","description":"Basic pipeline usage: create a Compiler instance, add plugins via .use(), then run inputs through the pipeline."},"warnings":[{"fix":"Ensure .use() calls are in the desired sequence.","message":"Plugin order matters; plugins are executed in the order they are added.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Update plugins to accept only input and return transformed string.","message":"In v0.1.0, the plugin signature changed from (input, next) to (input) only, breaking existing custom plugins.","severity":"breaking","affected_versions":">=0.1.0 <0.1.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use import Compiler from 'compiler' or const Compiler = require('compiler').default;","cause":"Using default import incorrectly (CommonJS require instead of default import).","error":"TypeError: compiler.use is not a function"},{"fix":"Ensure each argument to .use() is a function that takes input and returns output.","cause":"Passing non-function to .use().","error":"Error: Plugin must be a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}