Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

electron-pug

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

electron-pug

Simple electron module to render Pug (former Jade) templates

  • 1.3.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
11
Maintainers
1
Weekly downloads
 
Created
Source

electron pug

This module is a simple file protocol interceptor for electron which compiles all (local) URLs to files with .pug extension (e.g /home/electron-pug/index.pug) on the fly.

Neutron Compatible NPM Version license

Installation

npm install electron-pug

Usage

Just initialize this module with desired options for Pug package and your locals:

'use strict';

const app = require('app');
const locals = {/* ...*/};
const j = require('electron-pug')({pretty: true}, locals);
const BrowserWindow = require('browser-window');

// Standard stuff

app.on('ready', function () {
  let mainWindow = new BrowserWindow({ width: 800, height: 600 });

  mainWindow.loadUrl('file://' + __dirname + '/index.pug');
  // the rest...
});

Even more!

If you want to have least effort when developing electron packages, take a look at neutron!

Keywords

FAQs

Package last updated on 16 Apr 2016

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

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc