Created
September 1, 2018 00:22
-
-
Save overthemike/c3a5724b6f8ae693d14874cac3f06573 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const gulp = require('gulp') | |
const buildCSS = require('./semantic/gulpfile').buildCSS | |
const fs = require('fs') | |
const varfiles = fs.readdirSync('files') | |
gulp.task('build-css', function build(done){ | |
run() | |
}) | |
function run(counter) { | |
if (!counter) { | |
counter = 0 | |
} | |
console.log(counter, varfiles.length) | |
if (counter < varfiles.length) { | |
const file = fs.readFileSync('./files/' + varfiles[counter]) | |
fs.writeFileSync('./semantic/src/site/globals/site.variables', file) | |
counter++ | |
buildCSS(function(){ | |
const style = fs.readFileSync('./semantic/dist/semantic.min.css') | |
fs.writeFileSync('./brands/brand' + counter + '.min.css', style) | |
run(counter) | |
}) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment