Skip to content

Commit

Permalink
build: use postcss
Browse files Browse the repository at this point in the history
  • Loading branch information
Kikobeats committed Apr 3, 2024
1 parent b26322a commit 1fd9b17
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 11 deletions.
17 changes: 10 additions & 7 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
'use strict'

const strip = require('gulp-strip-css-comments')
const prefix = require('gulp-autoprefixer')
const cssnano = require('gulp-cssnano')
const uglify = require('gulp-uglify')
const postcss = require('gulp-postcss')
const concat = require('gulp-concat')
const uglify = require('gulp-uglify')
const gulp = require('gulp')

const src = {
Expand All @@ -24,9 +22,14 @@ const styles = () =>
gulp
.src(src.css)
.pipe(concat(`${dist.name.css}.min.css`))
.pipe(prefix())
.pipe(strip({ all: true }))
.pipe(cssnano())
.pipe(
postcss([
require('postcss-focus'),
require('cssnano')({
preset: require('cssnano-preset-advanced')
})
])
)
.pipe(gulp.dest(dist.path))

const scripts = () =>
Expand Down
9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -141,17 +141,20 @@
"ava": "5",
"browser-sync": "latest",
"concurrently": "latest",
"cssnano": "latest",
"cssnano-preset-advanced": "latest",
"finepack": "latest",
"git-authors-cli": "latest",
"github-generate-release": "latest",
"gulp": "latest",
"gulp": "4",
"gulp-autoprefixer": "latest",
"gulp-concat": "latest",
"gulp-cssnano": "latest",
"gulp-strip-css-comments": "latest",
"gulp-postcss": "latest",
"gulp-uglify": "latest",
"nano-staged": "latest",
"npm-check-updates": "latest",
"postcss": "latest",
"postcss-focus": "latest",
"simple-git-hooks": "latest",
"standard": "latest",
"standard-markdown": "latest",
Expand Down
2 changes: 1 addition & 1 deletion public/css/style.min.css

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

0 comments on commit 1fd9b17

Please sign in to comment.