Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
cssnano-preset-lite
Advanced tools
Readme
Safe and minimum transformation with just removing whitespaces, line breaks and comments
This lite preset for cssnano only includes transforms that only removes extra whitespace, linebreaks, and comments.
With npm do:
npm install cssnano-preset-lite --save-dev
If you don't have npm then check out this installation tutorial.
If you would like to use the default configuration, then you don't need to add anything to your package.json
.
But should you wish to customise this, you can pass an array with the second parameter as the options object to use. For example, to remove all comments:
{
"name": "awesome-application",
+ "cssnano": {
+ "preset": [
+ "lite",
+ {"discardComments": {"removeAll": true}}
+ ]
+ }
}
Depending on your usage, the JSON configuration might not work for you, such as in cases where you would like to use options with customisable function parameters. For this use case, we recommend a cssnano.config.js
at the same location as your package.json
. You can then load a preset and export it with your custom parameters:
const defaultPreset = require('cssnano-preset-lite');
module.exports = defaultPreset({
discardComments: {
remove: (comment) => comment[0] === '@',
},
});
Note that you may wish to publish your own preset to npm for reusability, should it differ a lot from this one. This is highly encouraged!
cssnano-utils
Utility methods used by cssnano
postcss-discard-comments
Discard comments in your CSS files with PostCSS.
This plugin is loaded with its default configuration.
postcss-discard-empty
Discard empty rules and values with PostCSS.
This plugin is loaded with its default configuration.
postcss-normalize-whitespace
Trim whitespace inside and around CSS rules & declarations.
This plugin is loaded with its default configuration.
See CONTRIBUTORS.md.
FAQs
Safe and minimum transformation
The npm package cssnano-preset-lite receives a total of 6,717 weekly downloads. As such, cssnano-preset-lite popularity was classified as popular.
We found that cssnano-preset-lite demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.