Skip to content

Commit

Permalink
edit the classless functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
kostastepetes committed Jan 31, 2024
1 parent 373c4f4 commit e69763e
Show file tree
Hide file tree
Showing 7 changed files with 2,211 additions and 1,293 deletions.
2 changes: 1 addition & 1 deletion classless/classless.css
Original file line number Diff line number Diff line change
Expand Up @@ -512,4 +512,4 @@ blockquote footer {
font-size: small;
line-height: var(--line-height);
padding: 1.5rem 0;
}
}
1 change: 1 addition & 0 deletions classless/sqky-classless.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 12 additions & 2 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,27 @@
const { src, dest, watch, series } = require('gulp')
const sass = require('gulp-sass')(require('sass'))
const purgecss = require('gulp-purgecss')
const cleanCSS = require('gulp-clean-css')
const rename = require('gulp-rename')

function buildStyles() {
return src('sass/**/*.scss')
return src('sass/**/*.scss')
.pipe(sass({ outputStyle: 'compressed' }))
.pipe(purgecss({ content: ['*.html'] }))
.pipe(dest('css'))
}

function minifyCSS() {
return src('classless/classless.css')
.pipe(cleanCSS({compatibility: 'ie8'}))
.pipe(rename('sqky-classless.min.css'))
.pipe(dest('classless'));
}

function watchTask() {
watch(['sass/**/*.scss', '*.html'], buildStyles)
watch('classless/classless.css', minifyCSS)
}

exports.buildStyles = buildStyles;
exports.minifyCSS = minifyCSS;
exports.default = series(buildStyles, watchTask)
Loading

0 comments on commit e69763e

Please sign in to comment.