Miss any of our Open RFC calls?Watch the recordings here! »

electron-ejs-layout

0.1.0 • Public • Published

electron-ejs-layout

npm npm

Simple Electron plugin for render EJS templates. It allow you to use ejs files in your electron projects and you can define some layouts.

How to use it

For initialize electron-ejs-layout on your project, simply add

//In main process.
var electronEjs = require('electron-ejs-layout')(locals);
conf = {
    layoutViewPath: __dirname+'/views/'
};
...
//You have to define layoutFile
conf.layoutFile = 'layout.ejs';
mainWindow.loadURL('file://'+__dirname+'/views/main/main.ejs');

Where locals is an object where each key is used as a variable in your template.

Issues

You can publish issues here https://github.com/jpcweb/electron-ejs-layout/issues

License

electron-ejs-layout is under the MIT license.

Install

npm i electron-ejs-layout

DownloadsWeekly Downloads

2

Version

0.1.0

License

MIT

Last publish

Collaborators

  • avatar