-
-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Removes esbuild system (may™ return in future) - Moves SASS back to src/static/css/ (rather than src/css/) - Re-adds PostCSS, Gulp tasks for SASS transpilation
- Loading branch information
Showing
10 changed files
with
187 additions
and
172 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
const purgecss = require('@fullhuman/postcss-purgecss')({ | ||
// Specify the paths to all of the template files in your project | ||
content: ["./src/**/*.hbs", "./src/**/*.js", "./src/**/*.ts", "./gulpfile.ts"], | ||
|
||
// This is the function used to extract class names from your templates | ||
defaultExtractor: content => { | ||
// Capture as liberally as possible, including things like `h-(screen-1.5)` | ||
const broadMatches = content.match(/[^<>"'`\s]*[^<>"'`\s:]/g) || [] | ||
|
||
// Capture classes within other delimiters like .block(class="w-1/2") in Pug | ||
const innerMatches = content.match(/[^<>"'`\s.()]*[^<>"'`\s.():]/g) || [] | ||
|
||
return broadMatches.concat(innerMatches) | ||
} | ||
}); | ||
|
||
module.exports = { | ||
plugins: [ | ||
require("postcss-import"), | ||
require("tailwindcss")("tailwind.config.js"), | ||
require("autoprefixer"), | ||
...process.env.NODE_ENV === 'production' | ||
? [purgecss] | ||
: [] | ||
], | ||
syntax: require("postcss-scss") | ||
} |
Oops, something went wrong.