# @vtex/tachyons-generator

> Generate a custom VTEX Tachyons build with a json configuration

Latest version **1.5.1** (published 2020-03-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install @vtex/tachyons-generator
pnpm add @vtex/tachyons-generator
yarn add @vtex/tachyons-generator
bun add @vtex/tachyons-generator
```

## 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.5.1 |
| Published | 2020-03-24 |
| First published | 2018-08-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 26 |
| Unpacked size | 82.8 KB |
| Known vulnerabilities | 0 (+6 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 316 |
| Maintainers | afonsopraca, alcar, alinevillaca, amoreira, analuizamtg, andreldsa, anitavincent, arthurepc, arturpimentel, athoscouto, augusto.lazaro, augustob, bivillar, breno, brunohq, brunojdo, caio.oliveira, cmdalbem, daher, diegoximenes, ericreis, felippenardi, firstdoit, guigs, guilhermebruzzi, gustavorosolem, iago, igorframos, jeymisson, jgfidelis, kaisermann, kevinchevallier, lbebber, lucasecdb, lurian, marcoskwkm, marcosvcp, nandoacoelho, natalia_godot, nonsequitur, ntmedina, r-araripe, rafabac, rafarubim, rogerlucena, salesfelipe, tergol, thiagomurakami, tiagonapoli, tlgimenes, vcalasans, victorges, victorhmp, vtexlab |
| Keywords | tachyons, css, oocss, generator |

## Links

- npm: https://www.npmjs.com/package/@vtex/tachyons-generator
- Repository: https://github.com/tachyons-css/tachyons-generator
- Homepage: https://github.com/tachyons-css/tachyons-generator#readme
- Issues: https://github.com/tachyons-css/tachyons-generator/issues
- npm.io page: https://npm.io/package/@vtex/tachyons-generator

## Dependencies (26)

- [cxs](https://npm.io/package/cxs.md) ^6.0.0
- [palx](https://npm.io/package/palx.md) ^1.0.2
- [mqify](https://npm.io/package/mqify.md) ^0.1.1
- [react](https://npm.io/package/react.md) ^15.6.1
- [cssnano](https://npm.io/package/cssnano.md) ^4.1.10
- [postcss](https://npm.io/package/postcss.md) ^6.0.22
- [is-blank](https://npm.io/package/is-blank.md) ^2.1.0
- [isobject](https://npm.io/package/isobject.md) ^3.0.1
- [camelcase](https://npm.io/package/camelcase.md) ^4.1.0
- [colorable](https://npm.io/package/colorable.md) ^1.0.5
- [react-dom](https://npm.io/package/react-dom.md) ^15.6.1
- [kebab-case](https://npm.io/package/kebab-case.md) ^1.0.0
- [autoprefixer](https://npm.io/package/autoprefixer.md) ^8.6.3
- [css-mqpacker](https://npm.io/package/css-mqpacker.md) ^6.0.2
- [perfectionist](https://npm.io/package/perfectionist.md) ^2.4.0
- [postcss-import](https://npm.io/package/postcss-import.md) ^11.1.0
- [postcss-nested](https://npm.io/package/postcss-nested.md) ^3.0.0
- [strip-css-comments](https://npm.io/package/strip-css-comments.md) ^3.0.0
- [postcss-extend-rule](https://npm.io/package/postcss-extend-rule.md) ^2.0.0
- [postcss-class-prefix](https://npm.io/package/postcss-class-prefix.md) ^0.3.0
- [postcss-conditionals](https://npm.io/package/postcss-conditionals.md) ^2.1.0
- [postcss-custom-media](https://npm.io/package/postcss-custom-media.md) ^6.0.0
- [postcss-class-postfix](https://npm.io/package/postcss-class-postfix.md) ^1.0.0
- [postcss-css-variables](https://npm.io/package/postcss-css-variables.md) ^0.8.1
- [strip-css-media-queries](https://npm.io/package/strip-css-media-queries.md) ^1.0.0
- [postcss-discard-comments](https://npm.io/package/postcss-discard-comments.md) ^4.0.2

## Alternatives

- [style-dictionary](https://npm.io/package/style-dictionary.md) — 2.0M weekly downloads
- [postcss-merge-idents](https://npm.io/package/postcss-merge-idents.md) — 1.7M weekly downloads
- [@fontsource/noto-sans](https://npm.io/package/@fontsource/noto-sans.md) — 93.0K weekly downloads
- [uglifycss](https://npm.io/package/uglifycss.md) — 71.6K weekly downloads
- [mat4-interpolate](https://npm.io/package/mat4-interpolate.md) — 23.3K weekly downloads

## Recent versions

- 1.5.1 (latest) — 2020-03-24
- 1.5.0 — 2020-03-23
- 1.4.0 — 2020-03-23
- 1.3.0 — 2019-08-01
- 1.2.1 — 2019-06-11
- 1.2.0 — 2019-06-11
- 1.1.4-beta — 2019-05-21
- 1.1.0 — 2019-03-13
- 1.0.0 — 2018-12-21
- 0.27.0 — 2018-12-02
- 0.26.0 — 2018-11-19
- 0.25.1 — 2018-10-10
- 0.25.0 — 2018-10-05
- 0.24.0 — 2018-08-13

## README

# @vtex/tachyons-generator

Generate a custom VTEX Tachyons build with a json configuration.

Originally forked from [tachyons-generator](https://github.com/tachyons-css/generator).

## Installation

```bash
npm i -S @vtex/tachyons-generator
```

## Usage
This will generate an index.html file with the generated style guide as well as a static css file.

```javascript
const fs = require('fs')

const tachyonsGenerator = require('@vtex/tachyons-generator')
const config = require('./config.json')

const generate = async () => {
  const tachy = tachyonsGenerator(config)

  // Minify CSS
  const out1 = await tachy.generate({ minify: true })
  fs.writeFileSync('tachyons.min.css', out1)

  // Keep colors as CSS variables
  const out2 = await tachy.generate({ compileVars: false })
  fs.writeFileSync('tachyons-with-vars.css', out2)

  // Create stylesheet for devices of type "large" only
  const out3 = await tachy.generate({ stylesheetType: 'large' })
  fs.writeFileSync('tachyons-large.css', out3)

  // Generate docs website
  const docs = await tachy.docs()
  fs.writeFileSync('index.html', docs)
}

generate()
```

#### Example config

Check [config.js](/config.js)

#### Optional configurations

#### `namespace`

You can pass a `namespace` property to namespace the CSS generated (including the normalize module).

Example:

```json
 "namespace": "my-namespace",
```

Will generate the following CSS:

```css
.my-namespace .bg-black { background-color: #000; }
```

## License

MIT

---
_Source: https://npm.io/package/@vtex/tachyons-generator · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
