-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathindex.js
53 lines (46 loc) · 1.3 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
50
51
52
53
/* eslint-env node */
'use strict';
const path = require('path');
const walkSync = require('walk-sync');
const getGitInfo = require('git-repo-info');
module.exports = {
name: require('./package').name,
options: {
babel: {
plugins: [
require.resolve('ember-concurrency/async-arrow-task-transform'),
],
},
},
blueprintsPath() {
return path.join(__dirname, 'blueprints');
},
included: function (app) {
this._super.included.apply(this, arguments);
const cssSource = 'node_modules/fomantic-ui-css';
app.import({
development: path.join(cssSource, 'semantic.css'),
production: path.join(cssSource, 'semantic.min.css'),
});
const fontSource =
'node_modules/fomantic-ui-css/themes/default/assets/fonts';
const fontFiles = walkSync(fontSource, {
directories: false,
});
const fontOptions = {
destDir: 'assets/themes/default/assets/fonts',
};
for (let font of fontFiles) {
app.import(path.join(fontSource, font), fontOptions);
}
},
config(env, baseConfig) {
let config = this._super.config.apply(this, arguments);
if (!baseConfig.APP) {
return config;
}
const gitInfo = getGitInfo();
baseConfig.APP.commitsSinceLastTag = gitInfo.commitsSinceLastTag;
return config;
},
};