Security News
The Risks of Misguided Research in Supply Chain Security
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
coffeekraken-criticalcss
Advanced tools
Simply and quickly generate the critical css depending on a list of pages to take as source
Simply and quickly generate the critical css depending on a list of pages to take as source.
npm install coffeekraken-criticalcss --save-dev
Use the CLI as follow:
coffeekraken-criticalcss -o dist/css/critical.css -c dist/css/style.css
Here's all the CLI options available:
-o|--output
Output critical css file
dist/css/critical.css
-c|--css
Css file to use to generate critical one
dist/css/style.css
-p|--pages
List of pages urls to process (space separated).
By default, it would try to find a pages.json
file in your project root folder, then it would try to find a pages
property in your package.json
. See bellow for more info on that.
null
-h|--host
Hostname on which to make pages requests
http://localhost:8080
-w|--width
Width of the viewport to calculate the critical css
1200
-h|--height
Height of the viewport to calculate the critical css
900
pages.json
You can create a pages.json
file at your project root folder that will be used to generate the critical css from the pages url defined here.
Here's a sample pages.json file:
{
"home": {
"title": "Homepage",
"url": "/"
},
"contact": {
"title": "Contact",
"url": "/contact"
}
}
You can if you prefere have the same structure in your
package.json
file under apages
property.
This is an open source project and will ever be! You are more that welcomed to contribute to his development and make it more awesome every day. To do so, you have several possibilities:
We try to be some cool guys that build some cool tools to make our (and yours hopefully) every day life better.
The code is available under the MIT license. This mean that you can use, modify, or do whatever you want with it. This mean also that it is shipped to you for free, so don't be a hater and if you find some issues, etc... feel free to contribute instead of sharing your frustrations on social networks like an asshole...
FAQs
Simply and quickly generate the critical css depending on a list of pages to take as source
The npm package coffeekraken-criticalcss receives a total of 1 weekly downloads. As such, coffeekraken-criticalcss popularity was classified as not popular.
We found that coffeekraken-criticalcss demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.