
Security News
Risky Biz Podcast: Making Reachability Analysis Work in Real-World Codebases
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
jade-browser
Advanced tools
express/connect middleware that serves jade compiled templates to the browser
Middleware for express/connect to expose jade templates to the web browser. It provides a few additional features like express-like render function with partial handling.
var express = require('express')
, jade_browser = require('jade-browser')
, app = express.createServer();
app.use(jade_browser(url_endpoint, template_dir, options));
or for Express.js v3.x:
var express = require('express')
, jade_browser = require('jade-browser')
, app = express();
app.use(jade_browser(url_endpoint, template_dir, options));
$ npm install jade-browser
As middleware jade-browser is simple to use.
var express = require('express')
, jade_browser = require('jade-browser')
, app = express.createServer();
app.use(jade_browser('/js/templates.js', '**', options));
filename
The filename of the resulting compiled templates filepatterns
A single string or array of patterns used to glob for template filesoptions
Options object, see below (optional)root
The root of the views (default: __dirname)namespace
Namespace for the browser (default: 'jade')minify
Minifies the output (default: false)maxAge
Time in seconds to cache the results (default: 86400)noCache
Recompiles the output on every request (default: false)jade.render('path/to/template', { values: for_template });
For direct access (for templates that have no need for partials).
jade.templates['path/to/template.jade'](locals);
Note: With render '.jade' extension is not required. Relative paths can be used in templates and in render function.
jade.render('path/../to/../test');
Large amounts of this code is inspired by TJ. Parts of express-expose and internal parts of express are recycled to make this happen. Contibuting docs part is taken from Mongoosastic.
The list of contributors according to git shortlog -s -n
:
Pull requests are always welcome as long as an accompanying test case is associated.
This project is configured to use git flow and the following conventions are used:
dev
- represents current active development and can possibly be
unstable.
master
- pristine copy of repository, represents the currently
stable release found in the npm index.
feature/**
- represents a new feature being worked on
If you wish to contribute, the only requirement is to:
Although I use git flow and prefix feature branches with "feature/" I don't require this for pull requests... all I care is that the feature branch name makes sense.
Pulls requests against master or pull requests branched from master will be rejected.
Examples of good branch names:
In order to run the tests which are in test
folder, you will need:
With those installed, running npm install
and ''npm test'' will run the tests.
(The MIT License)
Copyright (c) 2009-2011 Storify <info@storify.com>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
FAQs
express/connect middleware that serves jade compiled templates to the browser
The npm package jade-browser receives a total of 9 weekly downloads. As such, jade-browser popularity was classified as not popular.
We found that jade-browser 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
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
Security News
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.