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.
postcss-prepend-imports
Advanced tools
Readme
PostCSS plugin to automatically import global dependencies.
That's quite useful when you need to preload variables in all css files.
Disclaimer
It's advised to use this plugin in combination with both postcss-import and postcss-custom-properties.
Example using Gulp
gulp.task('css', function() {
return gulp.src('./src/*.css')
.pipe(postcss([
require('postcss-prepend-imports')({
path: 'shared',
files: ['color.css']
}),
require('postcss-import')(),
require('postcss-custom-properties')()
]))
.pipe(gulp.dest('./build'));
});
Variables file example
/* ./shared/color.css */
:root {
--background-default: #ccc;
}
Input
/* ./src/main.css */
.main {
background: var(--background-default);
}
Output
/* ./build/main.css */
.main {
background: #ccc;
}
Above snippet is the output when we use postcss-prepend-imports together with postcss-import and postcss-custom-properties.
npm install postcss-prepend-imports --save-dev
var options = {
path: '__tests__/fixtures',
files: ['colors.css']
};
postcss([ require('postcss-prepend-imports')(options) ])
Type: string
(default: ''
)
Set the root folder where postcss-prepend-imports
plugin should find files to prepend.
Type: array
(default: []
)
List of file names to prepend in all css files using @import
.
See PostCSS docs for examples for your environment.
FAQs
PostCSS plugin to automatically import global dependencies
The npm package postcss-prepend-imports receives a total of 282 weekly downloads. As such, postcss-prepend-imports popularity was classified as not popular.
We found that postcss-prepend-imports 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
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.