Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tailwind README + ui preview fixes #36

Merged
merged 13 commits into from
Nov 4, 2023
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .stylelintrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
"rules": {
"comment-empty-line-before": null,
"no-descending-specificity": null,
"at-rule-no-unknown": [true, { "ignoreAtRules": ["include", "mixin", "extend", "content", "if", "else", "for", "each", "while", "function", "return", "warn", "error", "debug"]}]
"at-rule-no-unknown": [true, { "ignoreAtRules": ["include", "mixin", "extend", "content", "if", "else", "for", "each", "while", "function", "return", "warn", "error", "debug", "layer", "apply", "tailwind"]}]
}
}
3 changes: 3 additions & 0 deletions gulp.d/lib/preview.tailwind.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
const mainConfig = require('../../tailwind.config.js')

module.exports = { ...mainConfig, content: ['public/**/*.{html,js}', 'src/**/*.hbs'] }
8 changes: 6 additions & 2 deletions gulp.d/tasks/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,18 @@ const ospath = require('path')
const path = ospath.posix
const postcss = require('gulp-postcss')
const postcssCalc = require('postcss-calc')
const postcssNested = require('postcss-nested')
const postcssAdvancedVars = require('postcss-advanced-variables')
const postcssImport = require('postcss-import')
const tailwindcss = require('tailwindcss')
const tailwindcssNesting = require('tailwindcss/nesting')
const postcssUrl = require('postcss-url')
const postcssVar = require('postcss-custom-properties')
const { Transform } = require('stream')
const map = (transform) => new Transform({ objectMode: true, transform })
const through = () => map((file, enc, next) => next(null, file))
const uglify = require('gulp-uglify')
const vfs = require('vinyl-fs')
const tailwindconfig = require('../lib/preview.tailwind.config')

module.exports = (src, dest, preview) => () => {
const opts = { base: src, cwd: src }
Expand Down Expand Up @@ -49,7 +51,9 @@ module.exports = (src, dest, preview) => () => {
},
},
]),
postcssNested,
tailwindcssNesting,
// only run tailwindcss in preview, datastax-docs-site repo has it's own tailwind cli step
preview ? tailwindcss(tailwindconfig) : () => {},
postcssAdvancedVars,
postcssVar({ preserve: preview }),
// NOTE to make vars.css available to all top-level stylesheets, use the next line in place of the previous one
Expand Down
Loading
Loading