@arcanis-inc/tachyons-generator
Generate a custom Arcanis Tachyons build with a json configuration
Last updated 3 months ago by matheuscosta .
MIT · Original npm · Tarball · package.json
$ cnpm install @arcanis-inc/tachyons-generator 
SYNC missed versions from official npm registry.

@arcanis/tachyons-generator

Generate a custom Arcanis Tachyons build with a json configuration.

Originally forked from tachyons-generator.

Usage

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

const fs = require('fs')

const tachyonsGenerator = require('@arcanis/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)

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

generate()

Example config

Check config.js

Optional configurations

namespace

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

Example:

 "namespace": "my-namespace",

Will generate the following CSS:

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

License

MIT

Current Tags

  • 0.0.1                                ...           latest (3 months ago)

1 Versions

  • 0.0.1                                ...           3 months ago
Maintainers (1)
Downloads
Today 0
This Week 1
This Month 1
Last Day 1
Last Week 0
Last Month 4
Dependencies (26)
Dev Dependencies (3)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |