/
index.js
49 lines (39 loc) · 1.1 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
'use strict';
const path = require('path')
const stringUtils = require('ember-cli-string-utils');
const { applyConfig } = require('empress-blueprint-helpers');
module.exports = {
description: 'Default blueprint for Field Guide',
normalizeEntityName() {
// no-op
},
fileMapTokens: function() {
let isAddon = this.project.isEmberCLIAddon();
return {
__base__() {
if(isAddon) {
return path.join('tests', 'dummy');
}
return '';
}
}
},
locals: function(options) {
let packageName = options.project.name();
let dasherizedPackageName = stringUtils.dasherize(packageName);
if(options.project.isEmberCLIAddon()) {
dasherizedPackageName = 'dummy';
}
return {
dasherizedPackageName,
};
},
filesToRemove: ['app/templates/application.hbs'],
afterInstall() {
applyConfig(this.project, 'field-guide', {
name: 'Product Name',
copyright: 'This is the default copyright string - update before publishing',
github: 'https://github.com/empress/field-guide?update-with-your-repo-url'
})
}
};