Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
scully-plugin-amp-css
Advanced tools
The purpose of the Scully AMP CSS plugin is to take all style
tags from rendered pages and combine them into a single style tag located in the head
tag of a given page. This is a requirement for AMP pages given by Google. This talk here talks in some part about this requirement. Scully makes this relatively easy because after each page is rendered, a plugin can be run to do something to that page; in this case to combine all the styles into a single style
tag.
style
tags into a single style
taghead
tagstyle
tagsnpm install scully-plugin-amp-css --save-dev
yarn add scully-plugin-amp-css --dev
To use this plugin, you need to just require the package inside the Scully config.ts
for your project, i.e. scully.your-project-name.config.ts
. After requiring the plugin, add it to the defaultPostRenderers
array for the desired routes that the plugin should be run on. In most (if not all cases), this would be on all routes, but you need to add it to those routes for it to work.
// scully.your-project-name.config.ts
require('scully-plugin-amp-css');
export const config: ScullyConfig = {
projectRoot: './src',
projectName: 'your-project-name',
outDir: './dist/static',
routes: {},
defaultPostRenderers: ['combineStylesAmpPlugin'],
};
That's all it takes for the plugin to be included and run on the pages in your app.
Make sure to run include this plugin before other CSS plugins, like the critical CSS plugin.
Thanks goes to these wonderful people (emoji key):
Preston Lamb 📖 💻 |
This project follows the all-contributors specification. Contributions of any kind welcome!
FAQs
Scully plugin to combine all style tags in to one
The npm package scully-plugin-amp-css receives a total of 320 weekly downloads. As such, scully-plugin-amp-css popularity was classified as not popular.
We found that scully-plugin-amp-css 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.