Skip to content

Instantly share code, notes, and snippets.

@mykehsd
Created May 16, 2012 18:57
Show Gist options
  • Select an option

  • Save mykehsd/2713015 to your computer and use it in GitHub Desktop.

Select an option

Save mykehsd/2713015 to your computer and use it in GitHub Desktop.
Recess not flagging error?
Node configuration:
[email protected] /usr/local/lib/node_modules/recess
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected] ([email protected])
css/fat.css:
#js-Test {
width: 0px;
}
div,
#div:hover {
position: absolute;
}
Node script:
var recess = require('recess')
recess('css/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
)
})
Output:
{ path: 'css/fat.css',
output: [ '#js-Test {\n width: 0;\n}\n\ndiv,\n#div:hover {\n position: absolute;\n}' ],
errors: [],
options:
{ compile: true,
compress: false,
config: false,
noIDs: true,
noJSPrefix: true,
noOverqualifying: true,
noUnderscores: true,
noUniversalSelectors: true,
prefixWhitespace: true,
strictPropertyOrder: true,
stripColors: false,
zeroUnits: true },
callback: [Function: recess],
data: '#js-Test {\n width: 0px;\n}\n\ndiv,\n#div:hover {\n position: absolute;\n}\n\n',
definitions:
[ { selectors: [Object],
rules: [Object],
_lookups: {},
strictImports: undefined },
{ selectors: [Object],
rules: [Object],
_lookups: {},
strictImports: undefined } ] } [ '#js-Test {\n width: 0;\n}\n\ndiv,\n#div:hover {\n position: absolute;\n}' ] []
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment