diff options
Diffstat (limited to 'bin/build-style.js')
-rwxr-xr-x | bin/build-style.js | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/bin/build-style.js b/bin/build-style.js index 4118faa3c8..06d4cc0808 100755 --- a/bin/build-style.js +++ b/bin/build-style.js @@ -1,23 +1,12 @@ #!/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 = { - 'style.min.js': require('./minify.js'), - '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 data = JSON.stringify(require(path.join(process.cwd(), process.argv[2]))); +var out = path.join(process.argv[3], 'style.min.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))); -}); +mkdirp.sync(path.dirname(out)); +fs.writeFileSync(out, data); |