{"id":27642018,"url":"https://github.com/bathos/gobble-stylus","last_synced_at":"2025-04-23T23:52:11.696Z","repository":{"id":86886290,"uuid":"37465767","full_name":"bathos/gobble-stylus","owner":"bathos","description":"Convert Stylus to CSS using Gobble","archived":false,"fork":false,"pushed_at":"2015-06-15T13:26:48.000Z","size":136,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-23T23:52:06.732Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bathos.png","metadata":{"files":{"readme":"README.MD","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-06-15T13:08:48.000Z","updated_at":"2015-07-31T21:10:52.000Z","dependencies_parsed_at":"2023-03-13T19:49:42.792Z","dependency_job_id":null,"html_url":"https://github.com/bathos/gobble-stylus","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bathos%2Fgobble-stylus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bathos%2Fgobble-stylus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bathos%2Fgobble-stylus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bathos%2Fgobble-stylus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bathos","download_url":"https://codeload.github.com/bathos/gobble-stylus/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250535081,"owners_count":21446506,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-04-23T23:52:11.174Z","updated_at":"2025-04-23T23:52:11.688Z","avatar_url":"https://github.com/bathos.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gobble-stylus-2\n\nRender stylus as CSS as a gobble transformation.\n\n\u003e Note: When I made this a few weeks ago, no \"gobble-stylus\" existed on npm.\nSince this one works rather differently than that one I’m publishing it anyway.\nThe differences are that this one is file-style and allows more than a single\nsrc/dest, and the `definitions` option, which for my own use case is critical.\n\n## Installation\n\nIf you haven’t installed gobble yet, [do that first][1]. This is your usual\nnpm install.\n\n```bash\nnpm install gobble-stylus-2 --save-dev\n```\n\n## Usage\n\nIn your gobblefile, you can now use the transformation.\n\n```js\nimport 'gobble';\n\nexport default gobble('my-stylus-directory').transform('stylus-2', opts);\n```\n\nWhen you provide the first transform arg as a string, Gobble goes looking for it\non its own; no need to `require`. However you can also `require` it and pass in\nthe module itself instead of a string.\n\n## Options\n\nFor the most part, the options object is identical to the one you’d normally\npass to the stylus API’s `render` method. There are four exceptions: `filename`,\n`sourceRoot` and `basePath` options aren’t relevent because that logic falls\nunder gobble’s purview, and `definitions` is an option unique to this module to\nprovide indirect access to stylus’ `define` method.\n\n### Opt specific to gobble-stylus-2\n\n - `definitions`: An object hash of variable names / values. This corresponds\n   with the `define` method -- the values can be functions or strings or\n   whatever.\n\n### Regular stylus opts\n\n - `compress`: Boolean -- compress the output\n - `hoist atrules`: Boolean -- moves @import / @export to the top\n - `imports`: An array of files to additionally import\n - `include css`: Boolean -- include regular CSS on @import\n - `paths`: An array of paths which css includes can be relative to.  Note that\n   if you’re used to using the stylus method `include`, this is its equivalent\n   -- `include()` seems to just be aspartame for `paths.push()`.\n - `prefix`: Not sure if this is related to vendor prefixes or what.\n - `resolve url`: Boolean -- resolve relative URLs in imports\n - `sourcemap`: If truthy, generate sourcemap. In gobble-stylus, sourcemaps are\n   default. This can also be an object with additional options:\n     - `comment`: Adds that comment line that I hate (not sure if this is\n       actually observed because of how Gobble handles sourcemaps later)\n     - `inline`: Inlines the map as base64 (...wait what?)\n     - `sourceRoot`: String; set the map’s source root\n     - `basePath`: Default: `.`\n - `use`: An array of stylus middleware / plugin things (or a single one)\n - `warn`: Boolean -- warn on weirdness\n\nI think there are more options, too; not all of them are documented, though some\nonly make sense when using the CLI.\n\n### Regular gobble opts\n\n - `accept` Array of file extensions to recognize as stylus. Default is `.styl`\n   and `.stylus`.\n - `ext`: The output file extension.\n\n[1]: https://github.com/gobblejs/gobble\n\n### Notes\n\nThis operates on any files in the gobble node that end in a stylus extension\n(styl, stylus). If you went to target a specific file (perhaps one that includes\nits peers explicitly), just use gobble’s built-in node methods to select it:\n\n```js\ngobble('css').include('index.css').transform('stylus-2', opts);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbathos%2Fgobble-stylus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbathos%2Fgobble-stylus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbathos%2Fgobble-stylus/lists"}