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

Undocumented option "include" #509

Open
timbednar opened this issue Jul 7, 2021 · 7 comments
Open

Undocumented option "include" #509

timbednar opened this issue Jul 7, 2021 · 7 comments

Comments

@timbednar
Copy link

I noticed that the option "include" is not documented in the readme.md https://github.com/addyosmani/critical#options or am I missing something.

@timbednar
Copy link
Author

critical.generate({ base: 'static/', src: url, css: [cssPath], dimensions: [{ width: 320, height: 480 },{ width: 768, height: 1024 },{ width: 1280, height: 960 }], dest: destPath, minify: true, extract: false, ignore: ['font-face'], include: [/listing-/gi,/footer.footer/gi] });

@bezoerb
Copy link
Collaborator

bezoerb commented Jul 7, 2021

oh,... this is an old option kept for compatibility reasons. it's the same as using the penthouse forceInclude option:

critical.generate({ 
  ...
  penthouse: {
    forceInclude: [/listing-/gi,/footer.footer/gi]
  },
  ...
})

@timbednar
Copy link
Author

timbednar commented Jul 8, 2021 via email

@bezoerb
Copy link
Collaborator

bezoerb commented Jul 9, 2021

Sure :)
Do you want to crate a PR adding this to the readme?

@timbednar
Copy link
Author

timbednar commented Jul 11, 2021 via email

@dsentker
Copy link

Any progress here? I encoutered the same problem and it would be useful to let the developer know about the penthouse option.

@bezoerb
Copy link
Collaborator

bezoerb commented Aug 26, 2021

The penthouse option is documented in the readme:
https://github.com/addyosmani/critical#options

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

3 participants