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.
@asset-pipe/css-reader
Advanced tools
Readme
A module that takes any number of css feeds and bundles them into a css bundle.
This is an internal module intended for use by other modules in the asset-pipe project.
Given any number of css feeds, the reader will:
The following is an example of a feed file: (Something like /path/to/feeds/feed-a.json)
[
{
// Unique id for entry. Created by hashing together name, version and file
id: '4f32a8e1c6cf6e5885241f3ea5fee583560b2dfde38b21ec3f9781c91d58f42e',
name: 'my-module-1',
version: '1.0.1',
file: 'my-module-1/main.css',
// bundled css content with any @import statements inlined
source: '/* ... */'
}
]
npm install @asset-pipe/css-reader
const cssReader = require('@asset-pipe/css-reader')
Pass feeds created by an asset-pipe sink:
const sink = new SinkFs({
path: '/path/to/css/feeds'
});
const feed1 = JSON.parse(await sink.get('feed-a.json'));
const feed2 = JSON.parse(await sink.get('feed-b.json'));
const bundle = await cssReader([feed1, feed2])
Reader takes an array of feeds. Feeds should be produced with an asset-pipe sink such as:
Example
const bundle = await cssReader([feed, ...feeds])
This module has the following API:
Supported arguments are:
feeds
- Array - An Array of feeds.options
- Object - configuration.
options.minify
(default: false) Specify whether to minify code using cssnano.Returns: Promise<string>
- A promise that resolves to a bundle string that is processed by autoprefixer.
Remember to specify a browserslist in your project to ensure cssnano and autoprefixer support the browsers your users use.
The contribution process is as follows:
npm test
. This will also check to ensure that 100% code coverage is maintained. If not you may need to add additional tests.git commit
or, if you are not familiar with sematic commit messages, please run npm run cm
and follow the prompts instead which will help you write a correct semantic commit message.FAQs
CSS asset feed reader
The npm package @asset-pipe/css-reader receives a total of 332 weekly downloads. As such, @asset-pipe/css-reader popularity was classified as not popular.
We found that @asset-pipe/css-reader demonstrated a not healthy version release cadence and project activity because the last version was released 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.