Skip to content

Commit

Permalink
Merge pull request #5 from apvarun/fix-purge-path-cli
Browse files Browse the repository at this point in the history
Fix purge path cli
  • Loading branch information
apvarun authored Oct 24, 2023
2 parents 8d7651e + eb2e627 commit 088feb6
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.3.1] - 2023-10-24

- Update `purge` path to `content` key in tailwind config check

## [0.3.0] - 2023-10-17

- Support Tailwind v3
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tailwindcss-analysis",
"version": "0.3.0",
"version": "0.3.1",
"description": "Analyse the TailwindCSS classes used in your application",
"license": "MIT",
"main": "dist/index.js",
Expand Down
7 changes: 4 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,12 @@ async function run() {
const tailwindConfig = readModule(join(root, '/tailwind.config.js'));
if (
!tailwindConfig ||
!tailwindConfig.purge ||
tailwindConfig.purge.length === 0
(!tailwindConfig.purge ||
tailwindConfig.purge.length === 0) && (!tailwindConfig.content ||
tailwindConfig.content.length === 0)
) {
console.log(
'Ensure that files to `purge` are configured in your tailwind config file'
'Ensure that files to `purge/content` are configured in your tailwind config file'
);
return;
}
Expand Down
2 changes: 1 addition & 1 deletion tailwind.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module.exports = {
purge: ['./app/src/**/*.{js,ts,jsx,tsx}'],
content: ['./app/src/**/*.{js,ts,jsx,tsx}'],
mode: 'jit',
darkMode: false, // or 'media' or 'class'
theme: {
Expand Down

0 comments on commit 088feb6

Please sign in to comment.