Skip to content

Instantly share code, notes, and snippets.

@beatak
Created August 29, 2014 23:58
Show Gist options
  • Select an option

  • Save beatak/8192fd2a651ba451607e to your computer and use it in GitHub Desktop.

Select an option

Save beatak/8192fd2a651ba451607e to your computer and use it in GitHub Desktop.
https://github.com/reworkcss/css is an interesting project and `test` cases are full of interesting css rules | declarations… so I decided to take all css into one file! you need to put this file into their repo root to run it.
'use strict';
var fs = require('fs');
var path = require('path');
var shell = require('shelljs');
var CWD = path.resolve( process.cwd() );
var dir_test = path.join(CWD, 'test', 'cases');
var result = [];
var list = shell
.find(dir_test)
.filter( function (path) {return path.match( /input\.css$/ );} );
list.forEach(function (path) {
result.push( fs.readFileSync(path).toString() );
});
console.log( result.join('\n') );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment