Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

electron-ejs-layout

jpcweb4MIT0.1.0

Simple Electron plugin for render EJS templates + layout.

electron, ejs, layout

readme

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.