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

Using command line for local laravel project #473

Open
mmehdizadeh opened this issue Feb 17, 2022 · 3 comments
Open

Using command line for local laravel project #473

mmehdizadeh opened this issue Feb 17, 2022 · 3 comments

Comments

@mmehdizadeh
Copy link

Hi, I want to use uncss for my laravel project, scan all blade files (instead of HTML)
I try this but not working:
uncss -s style.css -H C:\project\resources\views\front > style_2.css

@NovaAtWarren
Copy link

NovaAtWarren commented Feb 17, 2022

As per the readme, you can't use uncss on a template file. You will have to render said file to an html file, or serve it, and run the result through uncss after.

UnCSS cannot be run on non-HTML pages, such as templates or PHP files. If you need to run UnCSS against your templates, you should probably generate example HTML pages from your templates, and run uncss on those generated files; or run a live local dev server, and point uncss at that.

@mmehdizadeh
Copy link
Author

@NovaAtWarren Yes, sorry for my mistake
Is there any way to check authenticated pages when using served version ?

@NovaAtWarren
Copy link

I'm not familiar with your project so this might not be easy (or possible) but what I did on a project of mine once was a combination of

  • A debug flag, which would spam warnings on startup about a lack of security, and that authenticated as a test user without logging in
  • Where that wasn't possible, I went to the page in Chrome, saved it, and then ran uncss on that.

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

No branches or pull requests

2 participants