
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
express-manifest-helpers
Advanced tools
Use as express middleware to provide view helpers methods
$ npm install express-manifest-helpers
import express from 'express'
import manifestHelpers from 'express-manifest-helpers'
var app = express()
app.use(manifestHelpers({
manifestPath: '/path/to/manifest.json'
}))
doctype html
html(lang="en")
head
title Page Title
!= stylesheetTag('style.css')
body
!= imageTag('logo.png')
!= javascriptTag('app.js')
Helpers can also output html attrs
!= imageTag('logo.png', { width: 120, height: 120 })
// <img src="logo.png" width="120" height="120" />
Disable the cache for development
app.use(manifestHelpers({
manifestPath: '/path/to/manifest.json',
cache: process.env.NODE_ENV === 'production'
}))
Prepend a path to the asset urls
app.use(manifestHelpers({
manifestPath: '/path/to/manifest.json',
prependPath: '//cdn.example/assets'
}))
assetPath(source)
- returns the path to the provided source
imageTag(source, attrs)
- return a img tag for the source provided
javascriptTag(source, attrs)
- return a script tag for the source provided
stylesheetTag(source, attrs)
- return a link tag for the source provided
FAQs
View helpers to use with an asset manifest
The npm package express-manifest-helpers receives a total of 1,176 weekly downloads. As such, express-manifest-helpers popularity was classified as popular.
We found that express-manifest-helpers 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
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.