
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
parcel-processor
Advanced tools
write asset files to a package directory given an entry point
Given an entry point on process.argv[2]
, create a browserify bundle and write
the inline assets to opts.dst
:
var copier = require('parcel-processor');
var browserify = require('browserify');
var path = require('path');
var file = path.resolve(process.argv[2]);
copier(browserify(file), {
keys: [ 'style' ],
dst: __dirname + '/dst'
});
var copier = require('parcel-processor')
Given a browserify instance b
and some
options opts
, copy asset files from the
parcel-map output to the destination
opts.dst
.
The options are:
opts.dst
- the destination root to start writing package files atopts.keys
- array of keys for
parcel-map to read from the package.jsonopts.defaults
- object of default values passed directly through to
parcel-mapThe return value is an event emitter cp
with some events documented below.
When the concatenated css bundle has been written, this event fires with the file path.
When the concatenated js bundle has been written, this event fires with the file path.
This event fires when a package is being written.
pkg
has these properties:
pkg.isParcel
- whether the package is a parcelpkg.package
- the package.json contentspkg.assets
- an array of assets paths declared in pkg
pkg.id
- the package.json identifier from
parcel-mappkg.files
- an object mapping the opts.keys
types to arrays of matching
file paths for each typepkg.path
- the path to the package root containing a package.jsonpkg.dependencies
- an array of dependency ids that pkg
depends onpkg.hash
- the hash name used for the asset directoryExample pkg
output:
{ package:
{ view: 'view.html',
main: 'main.js',
style: '*.css',
__dirname: '/home/substack/projects/parcel-processor/example/views/page1' },
assets: [ '/home/substack/projects/parcel-processor/example/views/page1/x.css' ],
id: '2814e2ae0d4b530be5c8adee15a7d5ce16246f96',
files: { style: [ '/home/substack/projects/parcel-processor/example/views/page1/x.css' ] },
path: '/home/substack/projects/parcel-processor/example/views/page1',
dependencies: [],
hash: '5c1f45e9747e602cfcda7c2b390b6779d11acb80' }
This event fires when the asset map from parcel-map is available.
When the package and all dependent packages are completely written, this event fires.
With npm do:
npm install parcel-processor
MIT
FAQs
write asset files to a package directry given an entry point
The npm package parcel-processor receives a total of 0 weekly downloads. As such, parcel-processor popularity was classified as not popular.
We found that parcel-processor demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.