-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
29 lines (23 loc) · 734 Bytes
/
index.js
File metadata and controls
29 lines (23 loc) · 734 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
29
/* jshint node: true */
'use strict';
module.exports = {
name: 'telling-stories-site',
included: function() {
this._super.included.apply(this, arguments);
this.isEnabled = !!process.env['TELLING_STORIES'];
},
postBuild: function(result) {
if (!this.isEnabled) {
return;
}
var dir = result.directory;
var fs = require('fs');
var path = require('path');
fs.unlinkSync(path.resolve(dir, 'index.html'));
fs.renameSync(path.resolve(dir, 'tests/index.html'), path.resolve(dir, 'runner.html'));
fs.renameSync(path.resolve(dir, 'telling-stories-site/viewer.html'), path.resolve(dir, 'index.html'));
},
includedCommands: function() {
return require('./lib/commands');
}
};