{"id":27428,"library":"stylus-standalone","title":"stylus-standalone","description":"Stylus-standalone is a standalone browser-ready build of the Stylus CSS preprocessor, allowing you to compile Stylus code directly in the browser without Node.js or a build step. Version 0.1.0 is the initial release, and the package appears to be experimental with no further updates. It provides a single script tag inclusion via CDN, making it easy to experiment with Stylus in HTML. However, it lacks TypeScript definitions, active maintenance, and common developer tooling. Compared to the official stylus package, this is a minimal wrapper that exposes the compiler globally, suitable only for quick prototyping or educational use.","status":"abandoned","version":"0.1.0","language":"javascript","source_language":"en","source_url":"https://github.com/uetchy/stylus-standalone","tags":["javascript","standalone","stylus"],"install":[{"cmd":"npm install stylus-standalone","lang":"bash","label":"npm"},{"cmd":"yarn add stylus-standalone","lang":"bash","label":"yarn"},{"cmd":"pnpm add stylus-standalone","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"This package is not ESM-compatible; it exports a global stylus object.","wrong":"import stylus from 'stylus-standalone'","symbol":"stylus","correct":"<!-- Include via script tag -->\n<script src=\"https://unpkg.com/stylus-standalone\"></script>\n<!-- then use window.stylus -->"},{"note":"Callback is required; returns undefined.","wrong":"stylus.render(str, options)","symbol":"stylus.render","correct":"stylus.render(str, options, callback)"},{"note":"The stylus function returns a Renderer instance with a .render method that takes a callback.","wrong":"stylus(str).render()","symbol":"stylus(str)","correct":"stylus(str).render(callback)"}],"quickstart":{"code":"<!DOCTYPE html>\n<html>\n<head>\n  <script src=\"https://unpkg.com/stylus-standalone\"></script>\n</head>\n<body>\n  <script>\n    const stylusCode = `\n      body\n        font-family sans-serif\n        color #333\n    `;\n    stylus.render(stylusCode, { compress: true }, (err, css) => {\n      if (err) console.error(err);\n      else {\n        const style = document.createElement('style');\n        style.textContent = css;\n        document.head.appendChild(style);\n      }\n    });\n  </script>\n</body>\n</html>","lang":"javascript","description":"Demonstrates in-browser Stylus compilation using a script tag and the global stylus object with callback."},"warnings":[{"fix":"Consider using the official stylus package with a build tool.","message":"The package is not maintained and may not work with modern browsers.","severity":"gotcha","affected_versions":"0.1.0"},{"fix":"Wrap calls in a promise: new Promise((resolve, reject) => stylus.render(str, opts, (e,r) => e ? reject(e) : resolve(r)))","message":"Callback-based API only; promises not supported.","severity":"breaking","affected_versions":"0.1.0"},{"fix":"Use stylus package via npm instead.","message":"Package likely uses outdated stylus version and may have unpatched security issues.","severity":"deprecated","affected_versions":"0.1.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Ensure <script src=\"https://unpkg.com/stylus-standalone\"></script> is placed before your code.","cause":"Script tag not loaded before usage.","error":"stylus is not defined"},{"fix":"Use stylus.render() directly, not stylus().render().","cause":"Trying to use stylus as a function without proper invocation.","error":"Cannot read property 'render' of undefined"},{"fix":"Always provide a callback: stylus.render(str, opts, (err, css) => {...})","cause":"Missing callback argument in render call.","error":"TypeError: callback is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}