Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/yan-foto/electron-jade

Simple electron protocol inceptor to compile Jade files on the fly :bird:
https://github.com/yan-foto/electron-jade

Last synced: 3 months ago
JSON representation

Simple electron protocol inceptor to compile Jade files on the fly :bird:

Awesome Lists containing this project

README

        

# --- NOTICE OF DEPRECATION --
This package has been deprecated in favour of [electron-pug](https://www.npmjs.com/package/electron-pug) and is not maintained further.

# electron jade
This module is a simple `file` protocol interceptor for [electron](https://github.com/atom/electron) which compiles all (local) URLs to files with `.jade` extension (e.g `/home/electron-jade/index.jade`) on the fly.

Neutron Compatible
NPM Version
![license](https://img.shields.io/npm/l/electron-jade.svg)
# Installation

```
npm install electron-jade
```

# Usage
Just initialize this module with desired options for [Jade](https://www.npmjs.com/package/jade) package and your locals:

```js
'use strict';

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

// Standard stuff

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

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

# Even more!
If you want to have least effort when developing electron packages, take a look at [neutron](https://github.com/yan-foto/neutron)!