twitter/recess

Name: recess

Owner: Twitter, Inc.

Description: A simple and attractive code quality tool for CSS built on top of LESS

Created: 2012-04-17 21:33:37.0

Updated: 2018-01-10 11:18:22.0

Pushed: 2016-04-18 11:53:32.0

Homepage: http://twitter.github.com/recess

Size: 2268

Language: CSS

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

RECESS - NO LONGER MAINTAINED, DOES NOT WORK WITH NEWER LESS VERSIONS Build Status

Developed at Twitter to support our internal styleguide, RECESS is a simple, attractive code quality tool for CSS built on top of LESS.

Incorporate it into your development process as a linter, or integrate it directly into your build system as a compiler, RECESS will keep your source looking clean and super manageable.

GENERAL USE
cess [path] [options]
OPTIONS
EXAMPLES

Lint all css files

cess *.css

Lint file, ignore styling of IDs

cess ./bootstrap.css --noIds false

Lint file with compact output and no color

cess ./bootstrap.css --format compact --stripColors

Compile and compress .less file, then output it to a new file

cess ./bootstrap.less --compress > ./bootstrap-production.css

Watch a directory for changes and auto compile a css file from the changes. experimental

cess input.less:ouput.css --watch watch/this/dir/for/changes

Watch a single file for changes and auto compile a css file from the changes. experimental

cess input.less:ouput.css --watch
PROGRAMMATIC API

Recess provides a pretty simple programmatic api.

recess = require('recess')

Once you've required recess, just pass it a path (or array of paths) and an optional options object and an optional callback:

ss(['../fat.css', '../twitter.css'], { compile: true }, callback)

The following options (and defaults) are available in the programatic api:

The callback is fired when each instance has finished processessing an input. The callback is passed an array of of instances (one for each path). The instances have a bunch of useful things on them like the raw data and an array of output strings.

When compiling, access the compiled source through the output property:

recess = require('recess')

ss('./js/fat.css', { compile: true }, function (err, obj) {
 (err) throw err
nsole.log(
obj // recess instance for fat.css
obj.output // array of loggable content
obj.errors // array of failed lint rules


INSTALLATION

To install recess you need both node and npm installed.

m install recess -g
AUTHORS
LICENSE

Copyright 2012-2013 Twitter, Inc.

Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.