# gulp-stylus-vars

> Inject variables in stylus files

Latest version **1.0.1** (published 2016-12-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install gulp-stylus-vars
pnpm add gulp-stylus-vars
yarn add gulp-stylus-vars
bun add gulp-stylus-vars
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2016-12-08 |
| First published | 2016-09-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Giovanni Bruno |
| Maintainers | giovanni.bruno |
| Keywords | gulp, gulpplugin, sass, inject, variables |

## Links

- npm: https://www.npmjs.com/package/gulp-stylus-vars
- Repository: https://github.com/giowe/gulp-stylus-vars
- Homepage: https://github.com/giowe/gulp-stylus-vars#readme
- Issues: https://github.com/giowe/gulp-stylus-vars/issues
- npm.io page: https://npm.io/package/gulp-stylus-vars

## Dependencies (3)

- [gulp-util](https://npm.io/package/gulp-util.md) ^3.0.7
- [streamqueue](https://npm.io/package/streamqueue.md) 0.0.6
- [readable-stream](https://npm.io/package/readable-stream.md) ^2.1.5

## Recent versions

- 1.0.1 (latest) — 2016-12-08
- 1.0.0 — 2016-09-21

## README

# gulp-stylus-vars

<div>
	<a href="https://www.npmjs.com/package/slush-aws-lambda"><img src='http://img.shields.io/npm/v/gulp-stylus-vars.svg?style=flat'></a>
	<a href="https://www.npmjs.com/package/slush-aws-lambda"><img src='https://img.shields.io/npm/dm/gulp-stylus-vars.svg?style=flat-square'></a>
	<a href="https://david-dm.org/giowe/gulp-stylus-vars"><img src='https://david-dm.org/giowe/gulp-stylus-vars.svg'></a>
	<a href="https://www.youtube.com/watch?v=Sagg08DrO5U"><img src='http://img.shields.io/badge/gandalf-approved-61C6FF.svg'></a>
</div>

Inject variables in stylus files from a js object.

## Usage

```
npm install gulp-stylus-vars
```

```js

var stylusVars = require('gulp-stylus-vars');

gulp.task('stylus', function() {
  var variables = {
    stringTest: "hello",
    string2Test: "https://github.com/giowe/gulp-stylus-vars",
    integerTest: 123,
  };

  return gulp.src([
    'src/styles/main.styl'
  ])
    .pipe(stylusVars(variables, { verbose: true }))
    .pipe(stylus())
    .pipe(gulp.dest('dist'))
});
```

This script will prepend the following code to your main.styl file:

```
stringTest = hello
string2Test = "https://github.com/giowe/gulp-stylus-vars"
integerTest = 123
```

So you can use all those variables inside your stylus file.
Quotes will be added when needed via regex.

---
_Source: https://npm.io/package/gulp-stylus-vars · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
