{"id":20119802,"url":"https://github.com/gruntjs/grunt-contrib-stylus","last_synced_at":"2025-04-12T22:19:17.531Z","repository":{"id":4580626,"uuid":"5722454","full_name":"gruntjs/grunt-contrib-stylus","owner":"gruntjs","description":"Compile Stylus files to CSS.","archived":false,"fork":false,"pushed_at":"2024-02-09T15:56:52.000Z","size":309,"stargazers_count":175,"open_issues_count":6,"forks_count":70,"subscribers_count":8,"default_branch":"main","last_synced_at":"2024-05-23T05:10:09.337Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://gruntjs.com/","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/gruntjs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE-MIT","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2012-09-07T21:07:17.000Z","updated_at":"2024-05-31T10:08:10.806Z","dependencies_parsed_at":"2024-05-31T10:18:36.677Z","dependency_job_id":null,"html_url":"https://github.com/gruntjs/grunt-contrib-stylus","commit_stats":{"total_commits":180,"total_committers":32,"mean_commits":5.625,"dds":0.7777777777777778,"last_synced_commit":"fd56960cdff71c3615aa77db0a7866341a3e5645"},"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gruntjs%2Fgrunt-contrib-stylus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gruntjs%2Fgrunt-contrib-stylus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gruntjs%2Fgrunt-contrib-stylus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gruntjs%2Fgrunt-contrib-stylus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gruntjs","download_url":"https://codeload.github.com/gruntjs/grunt-contrib-stylus/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248638019,"owners_count":21137586,"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":"2024-11-13T19:17:13.865Z","updated_at":"2025-04-12T22:19:17.508Z","avatar_url":"https://github.com/gruntjs.png","language":"JavaScript","funding_links":[],"categories":["Tools"],"sub_categories":["CUI Preprocessor"],"readme":"# grunt-contrib-stylus v1.2.0 [![Build Status: Linux](https://travis-ci.org/gruntjs/grunt-contrib-stylus.svg?branch=master)](https://travis-ci.org/gruntjs/grunt-contrib-stylus) [![Build Status: Windows](https://ci.appveyor.com/api/projects/status/3f708w3tww2lem3o/branch/master?svg=true)](https://ci.appveyor.com/project/gruntjs/grunt-contrib-stylus/branch/master)\n\n\u003e Compile Stylus files to CSS\n\n\n\n## Getting Started\n\nIf you haven't used [Grunt](http://gruntjs.com/) before, be sure to check out the [Getting Started](http://gruntjs.com/getting-started) guide, as it explains how to create a [Gruntfile](http://gruntjs.com/sample-gruntfile) as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:\n\n```shell\nnpm install grunt-contrib-stylus --save-dev\n```\n\nOnce the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:\n\n```js\ngrunt.loadNpmTasks('grunt-contrib-stylus');\n```\n\n*This plugin was designed to work with Grunt 0.4.x. If you're still using grunt v0.3.x it's strongly recommended that [you upgrade](http://gruntjs.com/upgrading-from-0.3-to-0.4), but in case you can't please use [v0.3.1](https://github.com/gruntjs/grunt-contrib-stylus/tree/grunt-0.3-stable).*\n\n\n\n## Stylus task\n_Run this task with the `grunt stylus` command._\n\nTask targets, files and options may be specified according to the grunt [Configuring tasks](http://gruntjs.com/configuring-tasks) guide.\n\nThis task comes preloaded with [nib](http://tj.github.io/nib/).\n\n### Options\n\n#### compress\nType: `Boolean`  \nDefault: `true`\n\nSpecifies if we should compress the compiled css. Compression is always disabled when `--debug` flag is passed to grunt.\n\n#### linenos\nType: `Boolean`  \nDefault: `false`\n\nSpecifies if the generated CSS file should contain comments indicating the corresponding stylus line.\n\n#### firebug\nType: `Boolean`  \nDefault: `false`\n\nSpecifies if the generated CSS file should contain debug info that can be used by the FireStylus Firebug plugin.\n\n#### paths\nType: `Array`\n\nSpecifies directories to scan for `@import` directives when parsing.\n\n#### define\nType: `Object`\n\nAllows you to define global variables in Gruntfile that will be accessible in Stylus files.\n\n#### rawDefine\nType: `Boolean|Array|String`\n\nIf set to `true`, defines global variables in Gruntfile without casting objects to Stylus lists. Allows using a JavaScript object in Gruntfile to be accessible as a Stylus Hash. See Stylus's issue tracker for details. [stylus/stylus#1286](https://github.com/stylus/stylus/issues/1286)\n\nAllows passing an array or string to specify individual keys to define \"raw\", casting all other keys as default Stylus behavior.\n\n#### urlfunc\nType: `String|Object`\n\nIf `String`: specifies function name that should be used for embedding images as Data URI.\n\nIf `Object`:\n* `name` - Type: `String`. Function name that should be used for embedding images as Data URI.\n* [ `limit` ] - Type: `Number|Boolean` Default: `30000`. Bytesize limit defaulting to 30Kb (30000), use false to disable the limit.\n* [ `[paths` ] - Type: `Array`, Default: `[]`. Image resolution path(s).\n\nSee [url()](http://stylus.github.io/stylus/docs/functions.url.html) for details.\n\n\n#### [use](https://github.com/stylus/stylus/blob/master/docs/js.md#usefn)\nType: `Array`\n\nAllows passing of stylus plugins to be used during compile.\n\n#### [import](https://github.com/stylus/stylus/blob/master/docs/js.md#importpath)\nType: `Array`\n\nImport given stylus packages into every compiled `.styl` file, as if you wrote `@import '...'`\nin every single one of said files.\n\n#### include css\nType: `Boolean`  \nDefault: `false`\n\nWhen including a css file in your app.styl by using `@import \"style.css\"`, by default it will not include the full script, use `true` to compile into one script.\n( **NOTICE:** the object key contains a space `\"include css\"` )\n\n#### [resolve url](http://stylus.github.io/stylus/docs/executable.html#resolving-relative-urls-inside-imports)\nType: `Boolean`  \nDefault: `false`\n\nTelling Stylus to generate `url(\"bar/baz.png\")` in the compiled CSS files accordingly from `@import \"bar/bar.styl\"` and `url(\"baz.png\")`, which makes relative pathes work in Stylus.\n\n_All urls are resolved relatively to position of resulting `.css` file_\n\n( **NOTICE:** the object key contains a space `\"resolve url\"` and Stylus resolves the url only if it finds the provided file )\n\n#### resolve url nocheck\nType: `Boolean`  \nDefault: `false`\n\nLike [resolve url](#resolve-url), but without file existence check. Fixing [some current issues](https://github.com/stylus/stylus/issues/2119).\n\n( **NOTICE:** the object key contains two spaces `\"resolve url nocheck\"` )\n\n#### banner\nType: `String`  \nDefault: `''`\n\nThis string will be prepended to the beginning of the compiled output.\n\n#### relativeDest\nType: `String`  \nDefault: `''`\n\nPath to be joined and resolved with each file dest to get new one. Mostly useful for files specified using wildcards:\n\n```js\noptions: {\n  relativeDest: 'out'\n},\nfiles: [{\n  src: ['src/components/*/*.styl'],\n  ext: '.css'\n}]\n```\n\nwill generate `src/components/*/out/*.css` files.\n\n### Examples\n\n```js\nstylus: {\n  compile: {\n    options: {\n      paths: ['path/to/import', 'another/to/import'],\n      relativeDest: '../out', //path to be joined and resolved with each file dest to get new one.\n                              //mostly useful for files specified using wildcards\n      urlfunc: 'data-uri', // use data-uri('test.png') in our code to trigger Data URI embedding\n      use: [\n        function () {\n          return testPlugin('yep'); // plugin with options\n        },\n        require('fluidity') // use stylus plugin at compile time\n      ],\n      import: [      //  @import 'foo', 'bar/moo', etc. into every .styl file\n        'foo',       //  that is compiled. These might be findable based on values you gave\n        'bar/moo'    //  to `paths`, or a plugin you added under `use`\n      ]\n    },\n    files: {\n      'path/to/result.css': 'path/to/source.styl', // 1:1 compile\n      'path/to/another.css': ['path/to/sources/*.styl', 'path/to/more/*.styl'] // compile and concat into single file\n    }\n  }\n}\n```\n\n\n## Release History\n\n * 2016-03-08   v1.2.0   Stylus ^0.54.\n * 2016-03-04   v1.1.0   Add \"resolve url nocheck\". Fixes #146. Remove peerDeps. Point main script to task.\n * 2016-01-19   v1.0.0   Bump stylus to 0.53.\n * 2015-07-21   v0.22.0   Add `relativeDest` option. Bump stylus to 0.52.\n * 2015-03-09   v0.21.0   Bump stylus to 0.50.\n * 2014-09-22   v0.20.0   Bump stylus to 0.49.\n * 2014-08-26   v0.19.0   Bump dependencies. Bump stylus to 0.48.\n * 2014-07-02   v0.18.0   Bump stylus to 0.47.\n * 2014-06-04   v0.17.0   Bump stylus to 0.46.\n * 2014-05-12   v0.16.0   Bump stylus to 0.45.\n * 2014-05-01   v0.15.1   Add support for `rawDefine`.\n * 2014-04-23   v0.15.0   Bump stylus to 0.44.\n * 2014-04-08   v0.14.0   Bump stylus to 0.43.\n * 2014-03-01   v0.13.2   Fix `limit` option for `urlfunc`. Update copyright to 2014.\n * 2014-02-27   v0.13.1   `grunt.template.process` is not needed.\n * 2014-02-22   v0.13.0   Adds Data URI Image Inlining options. Fix \"resolve url\" option. Use chalk module to colorize terminal output. Emphasize spaces in object keys in the README.\n * 2014-01-08   v0.12.0   Update to stylus 0.42.0.\n * 2013-12-02   v0.11.0   Update to stylus 0.41.0.\n * 2013-11-07   v0.10.0   Update to stylus 0.40.0 and nib 1.0.1.\n * 2013-10-20   v0.9.0   Update to stylus 0.38.0.\n * 2013-08-20   v0.8.0   Update to stylus 0.37.0 and nib to 1.0.0.\n * 2013-07-31   v0.7.0   Update to stylus 0.35.\n * 2013-07-11   v0.6.0   Update to stylus 0.33.\n * 2013-03-10   v0.5.0   Upgrade to stylus 0.32.1.\n * 2013-02-22   v0.4.1   Support stylus `define` option.\n * 2013-02-15   v0.4.0   First official release for Grunt 0.4.0.\n * 2013-01-23   v0.4.0rc7   Updating grunt/gruntplugin dependencies to rc7. Changing in-development grunt/gruntplugin dependency versions from tilde version ranges to specific versions.\n * 2013-01-09   v0.4.0rc5   Updating to work with grunt v0.4.0rc5. Switching to `this.file` API.\n * 2012-12-15   v0.4.0a   Conversion to grunt v0.4 conventions. Remove Node.js v0.6 and grunt v0.3 support. Merge grunt-stylus features (plugin loading, embedding). Remove experimental destination wildcards.\n * 2012-10-12   v0.3.1   Rename grunt-contrib-lib dep to grunt-lib-contrib.\n * 2012-09-24   v0.3.0   Options no longer accepted from global config key. Individually compile into dest, maintaining folder structure.\n * 2012-09-17   v0.2.2   Tests refactored, better watch integration.\n * 2012-09-10   v0.2.0   Refactored from grunt-contrib into individual repo.\n\n---\n\nTask submitted by [Eric Woroshow](http://ericw.ca)\n\n*This file was generated on Fri Mar 18 2016 21:06:50.*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgruntjs%2Fgrunt-contrib-stylus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgruntjs%2Fgrunt-contrib-stylus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgruntjs%2Fgrunt-contrib-stylus/lists"}