forked from idobata/idobata-hooks
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBrocfile.js
More file actions
28 lines (22 loc) · 757 Bytes
/
Brocfile.js
File metadata and controls
28 lines (22 loc) · 757 Bytes
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
const Filter = require('broccoli-filter');
const Funnel = require('broccoli-funnel');
const concat = require('broccoli-concat');
const haml = require('hamljs');
const mergeTrees = require('broccoli-merge-trees');
class RenderHaml extends Filter {
processString(content) {
return haml.render(content).trimLeft();
}
getDestFilePath(relativePath) {
return `templates/idobata-hooks/${relativePath.replace(/\.html\.haml$/, '.hbs')}`;
}
}
const styles = concat('lib/hooks', {
inputFiles: ['*/style.sass'],
outputFile: '/styles/_idobata-hooks.sass'
});
const templates = new Funnel('lib/hooks', {
include: ['*/help.html.haml']
});
const helps = new RenderHaml(templates);
module.exports = mergeTrees([styles, helps]);