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

Remove false positive warning in CLI when using the --content option #7220

Merged
merged 2 commits into from Jan 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion CHANGELOG.md
Expand Up @@ -7,7 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

- Nothing yet!
### Fixed

- Remove false positive warning in CLI when using the `--content` option ([#7220](https://github.com/tailwindlabs/tailwindcss/pull/7220))

## [3.0.16] - 2022-01-24

Expand Down
8 changes: 5 additions & 3 deletions src/cli.js
Expand Up @@ -437,7 +437,6 @@ async function build() {

function resolveConfig() {
let config = configPath ? require(configPath) : {}
let resolvedConfig = resolveConfigInternal(config)

if (args['--purge']) {
log.warn('purge-flag-deprecated', [
Expand All @@ -450,10 +449,13 @@ async function build() {
}

if (args['--content']) {
resolvedConfig.content.files = args['--content'].split(/(?<!{[^}]+),/)
let files = args['--content'].split(/(?<!{[^}]+),/)
let resolvedConfig = resolveConfigInternal(config, { content: { files } })
resolvedConfig.content.files = files
return resolvedConfig
}

return resolvedConfig
return resolveConfigInternal(config)
}

function extractFileGlobs(config) {
Expand Down