Skip to content

Simple electron module to render Pug (former Jade) templates

Notifications You must be signed in to change notification settings

brtthomp/electron-pug

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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, BrowserWindow} = require('electron');
const locals = {/* ...*/};
const pug = require('electron-pug')({pretty: true}, locals);

// Standard stuff

app.on('ready', () => {
  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!

About

Simple electron module to render Pug (former Jade) templates

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%