-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.js
34 lines (32 loc) · 1.04 KB
/
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
33
34
/* eslint-env node */
'use strict';
const mergeTrees = require('broccoli-merge-trees'),
buildCommand = require('./lib/commands/build'),
releaseCommand = require('./lib/commands/release');
module.exports = {
name: 'khartis-build-tools',
configObject: {},
isDevelopingAddon: function() {
return true;
},
includedCommands() {
return {
"khartis:build": buildCommand,
"khartis:release": releaseCommand
};
},
postprocessTree(type, tree) {
if (process.env.KHARTIS_THUMBNAILS_BUILD === "true" && type === 'all') {
const Thumbnailer = require('./lib/tasks/thumbnailer')
return mergeTrees([tree, new Thumbnailer([tree])], {overwrite: true});
}
if (process.env.KHARTIS_MKDOCS_BUILD === "true" && type === 'all') {
const MkDocs = require('./lib/tasks/mkdocs')
return mergeTrees([tree, new MkDocs([tree])], {overwrite: true});
}
return tree;
},
config: function (env, baseConfig) {
this.configObject = baseConfig;
}
};