https://github.com/tachyons-css/tachyons-build-css
Transpile Tachyons postcss to vanilla css
https://github.com/tachyons-css/tachyons-build-css
Last synced: 2 months ago
JSON representation
Transpile Tachyons postcss to vanilla css
- Host: GitHub
- URL: https://github.com/tachyons-css/tachyons-build-css
- Owner: tachyons-css
- License: mit
- Created: 2016-07-07T20:02:19.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2023-01-12T06:13:38.000Z (almost 3 years ago)
- Last Synced: 2025-07-07T01:06:51.197Z (5 months ago)
- Language: JavaScript
- Homepage:
- Size: 421 KB
- Stars: 28
- Watchers: 2
- Forks: 12
- Open Issues: 18
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
# tachyons-build-css [](https://travis-ci.org/tachyons-css/tachyons-build-css) [](https://github.com/feross/standard)
Transpile Tachyons PostCSS to vanilla CSS.
This build process also removes comments, autoprefixes, and has options for minifying the output or repeating class selectors (to play nice with overly specific CSS frameworks).
## Installation
```bash
npm install --save-dev tachyons-build-css
```
## Usage
```javascript
const fs = require('fs')
const tachyonsBuildCss = require('tachyons-build-css')
const input = fs.readFileSync('input.css', 'utf8')
tachyonsBuildCss(input, {
from: 'input.css',
to: 'output.css',
minify: true,
plugins: [my(), other(), plugins()]
}).then(result => {
fs.writeFileSync('output.css', result.css)
})
```
If you want more control, but want the plugins used here, you can get them with the `getPlugins` function
```javascript
const { getPlugins } = require('tachyons-build-css')
const plugins = getPlugins({
from: 'input.css',
to: 'output.css',
minify: true
})
```
#### Options
| Option | Default | Description | Values |
| ------ | ------- | ----------- | ------ |
| `from` | `undefined` | The input file name | file name |
| `to` | `undefined` | The output file name | file name |
| `minify` | `false` | Minify the output CSS | `true`, `false` |
| `repeat` | `false` | Whether to repeat classes in selectors | `false`, `1..10` |
| `plugins` | `false` | Additional postcss plugins | [my(), other(), plugins()] |
| `atImport` | `{}` | Options for `postcss-import` | `postcss-import` options |
## License
MIT
## Contributing
1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request
Crafted with <3 by John Otander ([@4lpine](https://twitter.com/4lpine)).
***
> This package was initially generated with [yeoman](http://yeoman.io) and the [p generator](https://github.com/johnotander/generator-p.git).