Gathering detailed insights and metrics for manifest-rev
Gathering detailed insights and metrics for manifest-rev
Gathering detailed insights and metrics for manifest-rev
Gathering detailed insights and metrics for manifest-rev
rev-del
Delete replaced files from an old manifest
koa-manifest-rev
Dynamically load assets into your views from your `rev-manifest.json` manifest revision file
rev-manifest
[](https://travis-ci.org/shakyShane/rev-manifest)
laravel-elixir-rev-manifest
Generate revision manifest for Laravel Elixir.
Dynamically load assets into your views, emails, etc. from your `rev-manifest.json` manifest revision file.
npm install manifest-rev
Typescript
Module System
Min. Node Version
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
3 Stars
17 Commits
2 Forks
1 Watchers
1 Branches
4 Contributors
Updated on Nov 08, 2024
Latest Version
1.0.3
Package Id
manifest-rev@1.0.3
Unpacked Size
12.44 kB
Size
4.66 kB
File Count
14
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
Dynamically load assets into your views, emails, etc. from your
rev-manifest.json
manifest revision file (e.g.<script src="{{ manifest('foo.js'); }}"></script>
would return<script src="/foo-0775041dd4.js"></script>
when rendered).
npm:
1npm install manifest-rev
yarn:
1yarn add manifest-rev
1const path = require('path'); 2 3const Koa = require('koa'); 4const manifestRev = require('manifest-rev'); 5 6const app = new Koa(); 7 8app.use((ctx, next) => { 9 ctx.state.manifest = manifestRev({ 10 manifest: path.join(__dirname, 'build', 'rev-manifest.json'), 11 prepend: '/' 12 }); 13 return next(); 14}); 15 16// ...
Call the manifest(str, ?prop)
helper function in your views when you need to include assets (requires a templating engine).
pug:
1html 2 head 3 title Foo 4 body 5 h1 Foo 6 script(src=manifest('foo.js', 'path'))
1<html> 2 <head> 3 <title>Foo</title> 4 </head> 5 <body> 6 <h1>Foo</h1> 7 <script src="<%= manifest('foo.js', 'path'); %>" integrity="<%= manifest('foo.js', 'integrity') %>"></script> 8 </body> 9</html>
nunjucks (via koa-nunjucks-promise):
1<html> 2 <head> 3 <title>Foo</title> 4 </head> 5 <body> 6 <h1>Foo</h1> 7 <script src="{{ manifest('foo.js'); }}" integrity="{{ manifest('foo.js', 'integrity'); }}"></script> 8 </body> 9</html>
manifestRev(options)
- accepts a required options
argument for setup. Returns middleware for use in app.use
statement (which in turn binds to ctx.state
a helper function called manifest
). Here are the properties accepts in the options
argument.
manifest
(required) - path to a valid rev-manifest.json
file (e.g. as built by gulp-rev or gulp-rev-all)prepend
(optional) - string to prepend before file paths rendered after lookup (e.g. if you type {{ manifest('foo.js'); }}
in your view, and you have passed prepend: '/dist/'
in your setup, then your tag would render as <script src="/dist/foo-0775041dd4.js"></script>
(defaults to /
)manifest(str)
- the helper function returned when manifestRev
is invoked in your app. Returns the string found from a lookup in your rev-manifest.json
file for the str
argument passed (e.g. if you type {{ manifest('foo.js'); }}
in your view, then it returns for the value of the foo.js
property as defined in your manifest
file, such as foo-0775041dd4.js
). If the found is not found, then the input str
argument is returned.
manifest(str)
is now manifest(str, prop)
which now accepts a following property within your rev-manifest.json
file. prop
is optional and defaults to the path of the rev'd file. For example if you type {{ manifest('foo.js', 'integrity'); }}
in your view, then it returns for the value of the foo.js
file integrity
property as defined in your manifest
file, such as sha256-YEWYfCFP9yc5DAF8K5AtLEyFuKZ1MNw+xQPm8g70LYY=
). If the found is not found, then the input str
argument is returned.Name | Website |
---|---|
Nick Baugh | http://niftylettuce.com/ |
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
security policy file detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 0/13 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
49 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More