Skip to content

Instantly share code, notes, and snippets.

@suhaboncukcu
Last active November 29, 2020 17:47
Show Gist options
  • Save suhaboncukcu/f376de2c7ac76160a2d1ba7449597f97 to your computer and use it in GitHub Desktop.
Save suhaboncukcu/f376de2c7ac76160a2d1ba7449597f97 to your computer and use it in GitHub Desktop.
Bulma Gulp Minimal Setup
@import "../node_modules/bulma/sass/utilities/initial-variables"
// custom overrides and general styles
@import "./general/style.sass"
@import "./mymodule/style.sass"
//
@import "../node_modules/bulma/bulma"
'use strict';
var gulp = require('gulp');
var sass = require('gulp-sass');
var cleanCSS = require('gulp-clean-css');
var concat = require('gulp-concat');
var bless = require('gulp-bless');
var paths = {
'source-sass': './sass/*.sass',
'transpiled-css': './css',
};
gulp.task('sass', [], function () {
return gulp.src(paths['source-sass'])
.pipe(sass().on('error', sass.logError))
//.pipe(uglify())
.pipe(concat('all.min.css'))
.pipe(bless())
.pipe(cleanCSS({compatibility: 'ie10'}))
.pipe(gulp.dest(paths['transpiled-css']));
});
gulp.task('sass:watch', function () {
gulp.watch([paths['source-sass']], ['sass']);
});
gulp.task('default', ['sass', 'sass:watch']);
{
"name": "",
"version": "1.0.0",
"description": "",
"main": "gulpfile.js",
"dependencies": {
"bulma": "^0.5.3",
"gulp": "^3.9.1",
"gulp-bless": "^4.0.0",
"gulp-clean-css": "^3.9.0",
"gulp-concat": "^2.6.1",
"gulp-sass": "^3.1.0"
},
"devDependencies": {},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment