Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
asset-versioning
Advanced tools
Version your assets by appending a hash to the filename.
$ asset-versioning build 'css/**/*.css' 'js/**/*.js' --outputDirectory build | asset-versioning replace 'build/**/*'
Or, equivalently, using the API:
const assetVersioning = require('asset-versioning')
async function run () {
const manifest = await assetVersioning.build(['css/**/*.css', 'js/**/*.js'], {
outputDirectory: 'build'
})
assetVersioning.replace(['build/**/*'], manifest)
}
run()
$ asset-versioning build --help
Usage: asset-versioning build [globs] [options]
Versions the files matched by globs. Writes a JSON object mapping
the original filenames to the versioned filenames to stdout.
Globs:
One or more globs.
Options:
-b, --baseDirectory BASE_DIRECTORY Base directory to perform the
globbing. Defaults to './'.
-o, --outputDirectory OUTPUT_DIRECTORY Directory to output the
versioned files. Defaults
to './build'.
-h, --help Print this message.
Example:
asset-versioning build 'css/**/*.css' 'js/**/*.js' --outputDirectory build > manifest.json
$ asset-versioning replace --help
Usage: asset-versioning replace [globs] [options]
Replaces original filenames with their versioned filenames (as
specified in a manifest) in the files matched by globs. Ignores
binary files matched by the globs.
Globs:
One or more globs.
Options:
-b, --baseDirectory BASE_DIRECTORY Base directory to perform the
globbing. Defaults to './'.
-m, --manifestFile MANIFEST_FILE A JSON file mapping the original
filenames to the versioned
filenames. Read from stdin if
this is not specified.
-h, --help Print this message.
Example:
asset-versioning replace 'build/**/*' --manifestFile manifest.json
const assetVersioning = require('asset-versioning')
Versions the files matched by globs
. Returns a Promise for an object mapping the original filenames to the versioned filenames.
globs
is an array of one or more globs.
options
is an object literal:
Key | Description | Default |
---|---|---|
baseDirectory | Base directory to perform the globbing. | process.cwd() |
outputDirectory | Directory to output the versioned files. | ./build |
Replaces original filenames with their versioned filenames (as specified in the manifest
) in the files matched by globs
. Ignores binary files matched by the globs
.
globs
is an array of one or more globs.
manifest
is an object mapping the original filenames to the versioned filenames.
options
is an object literal:
Key | Description | Default |
---|---|---|
baseDirectory | Base directory to perform the globbing. | process.cwd() |
Install via yarn:
$ yarn add --dev asset-versioning
Or npm:
$ npm install --save-dev asset-versioning
FAQs
Version your assets by appending a hash to the filename.
The npm package asset-versioning receives a total of 0 weekly downloads. As such, asset-versioning popularity was classified as not popular.
We found that asset-versioning 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
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.