{"id":13790078,"url":"https://github.com/ym-project/esbuild-stylus-loader","last_synced_at":"2026-02-14T17:18:21.466Z","repository":{"id":47639574,"uuid":"312145572","full_name":"ym-project/esbuild-stylus-loader","owner":"ym-project","description":"esbuild plugin for stylus files","archived":false,"fork":false,"pushed_at":"2025-05-13T05:26:35.000Z","size":854,"stargazers_count":10,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-28T02:58:45.165Z","etag":null,"topics":["esbuild","plugin","stylus"],"latest_commit_sha":null,"homepage":"","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/ym-project.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-11-12T02:26:30.000Z","updated_at":"2025-08-27T13:21:52.000Z","dependencies_parsed_at":"2024-11-18T04:33:14.188Z","dependency_job_id":"304357ba-c2fa-4da5-bcfd-91267f84fd8e","html_url":"https://github.com/ym-project/esbuild-stylus-loader","commit_stats":{"total_commits":113,"total_committers":3,"mean_commits":"37.666666666666664","dds":0.03539823008849563,"last_synced_commit":"e0392f75811e0c3d25c3ecf73be486e660d395d3"},"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"purl":"pkg:github/ym-project/esbuild-stylus-loader","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ym-project%2Fesbuild-stylus-loader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ym-project%2Fesbuild-stylus-loader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ym-project%2Fesbuild-stylus-loader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ym-project%2Fesbuild-stylus-loader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ym-project","download_url":"https://codeload.github.com/ym-project/esbuild-stylus-loader/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ym-project%2Fesbuild-stylus-loader/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29450847,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-14T15:52:44.973Z","status":"ssl_error","status_checked_at":"2026-02-14T15:52:11.208Z","response_time":53,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["esbuild","plugin","stylus"],"created_at":"2024-08-03T22:00:36.725Z","updated_at":"2026-02-14T17:18:21.451Z","avatar_url":"https://github.com/ym-project.png","language":"JavaScript","funding_links":[],"categories":["Plugins"],"sub_categories":[],"readme":"# esbuild-stylus-loader\n\n[Esbuild](https://esbuild.github.io/) plugin for [stylus](https://stylus-lang.com/) files.\n\n## Installation\n```sh\nnpm install esbuild-stylus-loader stylus\n```\nor\n```sh\nyarn add esbuild-stylus-loader stylus\n```\n\n## Example\n\n`build.js`\n```js\nconst {build} = require('esbuild')\nconst {stylusLoader} = require('esbuild-stylus-loader')\n\nbuild({\n    entryPoints: [\n        'src/index.js',\n    ],\n    bundle: true,\n    outdir: 'dist',\n    plugins: [\n        stylusLoader({\n            stylusOptions: {\n                define: [\n                    ['BG_IMAGE', 'https://domain.com/image.jpeg'],\n                ],\n            },\n        })\n    ],\n}).then(result =\u003e {})\n```\n\n`src/index.js`\n```js\nimport './style.styl'\nconsole.log('hello world')\n```\n\n`src/style.styl`\n```styl\nhtml\n    background-image url(BG_IMAGE)\n```\n\n`command line`\n```sh\nnode ./build.js\n```\n\n## Arguments\n\n```js\nstylusLoader({\n    stylusOptions: {\n        /**\n         * @see https://stylus-lang.com/docs/js.html#includepath\n         * @type {string[]}\n         */\n        include: ['./some/path'],\n\n        /**\n         * @see https://stylus-lang.com/docs/js.html#importpath\n         * @type {string[]}\n         */\n        import: [\n            path.resolve(__dirname, 'path'),\n            path.resolve(__dirname, 'another-path'),\n        ],\n\n        /**\n         * @see https://stylus-lang.com/docs/js.html#usefn\n         * @type {Function[]}\n         */\n        use: [\n            (stylus) =\u003e {\n                stylus.define('URL', 'domain.com')\n            },\n        ],\n\n        /**\n         * @see https://stylus-lang.com/docs/js.html#definename-node\n         * @type {[string, any, boolean?][]}\n         */\n        define: [\n            ['BG_IMAGE', 'https://domain.com/image.jpeg'],\n            /** The third argument allows to insert raw data */\n            ['BG_IMAGE', 'https://domain.com/image.jpeg', true],\n        ],\n\n        /**\n         * Stylus will include css file content via @import \"./file.css\" keyword.\n         * @type {boolean}\n         */\n        includeCss: false,\n    },\n})\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fym-project%2Fesbuild-stylus-loader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fym-project%2Fesbuild-stylus-loader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fym-project%2Fesbuild-stylus-loader/lists"}