-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
32 lines (24 loc) · 925 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
const akasha = require('akasharender');
const mahabhuta = akasha.mahabhuta;
const path = require('path');
const mahafuncs = require('./mahabhuta');
const pluginName = "epub-website";
const _plugin_config = Symbol('config');
const _plugin_options = Symbol('options');
module.exports = class EPUBWebsitePlugin extends akasha.Plugin {
constructor() {
super(pluginName);
}
configure(config, options) {
this[_plugin_config] = config;
this[_plugin_options] = options;
options.config = config;
config
.addPartialsDir(path.join(__dirname, 'partials'))
.addAssetsDir(path.join(__dirname, 'assets'))
.addStylesheet({ href: "/akasha/epub-website/style.css" })
.addMahabhuta(mahafuncs.mahabhutaArray(options));
}
get config() { return this[_plugin_config]; }
get options() { return this[_plugin_options]; }
}