Skip to content

Instantly share code, notes, and snippets.

@overthemike
Created September 1, 2018 00:22
Show Gist options
  • Save overthemike/c3a5724b6f8ae693d14874cac3f06573 to your computer and use it in GitHub Desktop.
Save overthemike/c3a5724b6f8ae693d14874cac3f06573 to your computer and use it in GitHub Desktop.
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