summaryrefslogtreecommitdiff
path: root/bin/build-fixtures.js
blob: 142147ef887617be5eb69870d85b129710e4da94 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/env node
'use strict';

var load = require('./load-style.js');
var mkdirp = require('mkdirp');
var path = require('path');
var fs = require('fs');

var transforms = {
  'fuzz-colors.min.js': require('./fuzz-colors.js'),
  'fuzz-functions.min.js': require('./fuzz-functions.js'),
  'fuzz-layers.min.js': require('./fuzz-layers.js')
};

var source = load(process.argv[2]);
var out = process.argv[3];
mkdirp.sync(out);

Object.keys(transforms).forEach(function(key) {
  source.pipe(transforms[key].call())
    .pipe(fs.createWriteStream(path.join(out, key)));
});