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

Grunt purgecss doesn't execute on all files when more than two. #619

Closed
kiril-daskalov opened this issue Feb 26, 2021 · 1 comment · Fixed by #723
Closed

Grunt purgecss doesn't execute on all files when more than two. #619

kiril-daskalov opened this issue Feb 26, 2021 · 1 comment · Fixed by #723
Labels

Comments

@kiril-daskalov
Copy link

kiril-daskalov commented Feb 26, 2021

Describe the bug
Grunt purgecss doesn't execute on all files when more than two.
I have 4 files and each time purge css is started the output is different. Sometimes output all files some times 3, sometimes 2.

To Reproduce
Use this simple configuration.

config.purgecss = {
  my_target: {
    files: {
      "main.css": "main.css",
      "calculator.css": "calculator.css",
      "media.css": "media.css",
      "text.css": "text.css",
    },
  },
};

Expected behavior
Should execute on all files all times.

Screenshots
If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

  • OS: Bug Sur and Linux Mint
  • Package
    "grunt-purgecss": "^4.0.2",
    Node: v14.15.0
  • Version 4.02

Additional context

@kiril-daskalov kiril-daskalov changed the title Grunt purgecss don't execute on all files when more than two. Grunt purgecss doesn't execute on all files when more than two. Mar 1, 2021
@z3niths
Copy link

z3niths commented Jun 16, 2021

I confirm this's happening to me too
In my case, it's slightly different. I had multiple sources process into one destination.

"files": {
      "static/dist/destfile.css": [
        "file1.css",
        "file2.css",
      ],
    }
  • Mac M1
  • Node v14.15.3
  • "grunt": "^1.4.0",
  • "grunt-purgecss": "^4.0.3",

Additional syntax

"files": [
      {
        src:
          [file1.css', 'file2.css'],
        dest: "static/dist/destfile.css"
      }
    ]

This syntax also doesn't work using src/dest

It's always process first file (file1.css)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants