You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

pug-loader

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pug-loader

The jade loader is responsible for loading the depenendencies of a given jade file.


Version published
Weekly downloads
43K
increased by7.29%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

jade-load

The jade loader is responsible for loading the depenendencies of a given jade file. It adds fullPath and str properties to every Include and Extends node. It also adds an ast property to any Include nodes that are loading jade and any Extends nodes. It then recursively loads the dependencies of any of those included files.

Build Status Dependency Status NPM version

Installation

npm install jade-load

Usage

var fs = require('fs');
var lex = require('jade-lexer');
var parse = require('jade-parser');
var load = require('jade-load');

// you can do everything very manually

var str = fs.readFileSync('bar.jade', 'utf8');
var ast = load(parse(lex(str, 'bar.jade'), 'bar.jade'), {
  lex: lex,
  parse: parse
});

// or you can do all that in just two steps

var str = fs.readFileSync('bar.jade', 'utf8');
var ast = load.string(str, 'bar.jade', {
  lex: lex,
  parse: parse
});

// or you can do all that in only one step

var ast = load.file('bar.jade', {
  lex: lex,
  parse: parse
});

License

MIT

FAQs

Package last updated on 12 Dec 2015

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc