Product
Introducing SSO
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
recess
Advanced tools
Readme
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.
$ recess [path] [options]
@import
:ed LESS files in..js-
prefixed classnamesdiv#foo.bar
)*
selectorLint all css files
$ recess *.css
Lint file, ignore styling of IDs
$ recess ./bootstrap.css --noIds false
Lint file with compact output and no color
$ recess ./bootstrap.css --format compact --stripColors
Compile and compress .less file, then output it to a new file
$ recess ./bootstrap.less --compress > ./bootstrap-production.css
Watch a directory for changes and auto compile a css file from the changes. experimental
$ recess 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
$ recess input.less:ouput.css --watch
Recess provides a pretty simple programmatic api.
var 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
:
recess(['../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:
var recess = require('recess')
recess('./js/fat.css', { compile: true }, function (err, obj) {
if (err) throw err
console.log(
obj // recess instance for fat.css
, obj.output // array of loggable content
, obj.errors // array of failed lint rules
)
})
To install recess you need both node and npm installed.
$ npm install recess -g
Copyright 2012 Twitter, Inc.
Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
FAQs
A simple, attractive code quality tool for CSS built on top of LESS
The npm package recess receives a total of 828 weekly downloads. As such, recess popularity was classified as not popular.
We found that recess demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.