Verified Commit 7445a713 authored by David Haynes's avatar David Haynes 🙆
Browse files

Sass build is now one gulp task

- weee
parent e999a88c
Pipeline #1568 passed with stage
in 23 seconds
...@@ -14,7 +14,25 @@ ...@@ -14,7 +14,25 @@
*/ */
// Gulp Imports // Gulp Imports
var gulp = require('gulp'); var gulp = require('gulp');
var sass = require('gulp-sass');
var sourcemaps = require('gulp-sourcemaps');
var postcss = require('gulp-postcss');
var autoprefixer = require('autoprefixer');
var uglifycss = require('gulp-uglifycss');
var rename = require("gulp-rename");
gulp.task('default', () => { gulp.task('sass', function () {
// place code for your default task here return gulp.src('./masonstrap/**/*.scss')
.pipe(sourcemaps.init())
.pipe(sass().on('error', sass.logError))
.pipe(postcss([autoprefixer()]))
.pipe(sourcemaps.write())
.pipe(gulp.dest('./public/assets/css/'))
.pipe(uglifycss())
.pipe(rename({extname: ".min.css"}))
.pipe(gulp.dest('./public/assets/css/'));
});
gulp.task('sass:watch', function () {
gulp.watch('./masonstrap/**/*.scss', ['sass']);
}); });
...@@ -6,8 +6,15 @@ ...@@ -6,8 +6,15 @@
"author": "Mason SRCT", "author": "Mason SRCT",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"autoprefixer": "^7.1.4",
"bootstrap": "4.0.0-beta", "bootstrap": "4.0.0-beta",
"font-awesome": "^4.7.0", "font-awesome": "^4.7.0",
"gulp-postcss": "^7.0.0",
"gulp-rename": "^1.2.2",
"gulp-sass": "^3.1.0",
"gulp-sourcemaps": "^2.6.1",
"gulp-uglify": "^3.0.0",
"gulp-uglifycss": "^1.0.8",
"jquery": "^3.2.1", "jquery": "^3.2.1",
"popper.js": "^1.11.1" "popper.js": "^1.11.1"
}, },
......
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment