UNPKG

1.38 kBJavaScriptView Raw
1/*******************************
2 Release Config
3*******************************/
4
5const requireDotFile = require('require-dot-file');
6
7let
8 config,
9 npmPackage,
10 version
11;
12
13/*******************************
14 Derived Values
15*******************************/
16
17config = requireDotFile('semantic.json', process.cwd());
18
19try {
20 npmPackage = require('../../../package.json'); // eslint-disable-line global-require
21} catch (error) {
22 // generate fake package
23 npmPackage = {
24 name: 'Unknown',
25 version: 'x.x',
26 };
27}
28
29// looks for version in config or package.json (whichever is available)
30version = npmPackage && npmPackage.version !== undefined && npmPackage.name === 'fomantic-ui'
31 ? npmPackage.version
32 : config.version;
33
34/*******************************
35 Export
36*******************************/
37
38module.exports = {
39
40 title: 'Fomantic UI',
41 repository: 'https://github.com/fomantic/Fomantic-UI',
42 url: 'https://fomantic-ui.com/',
43
44 banner: ''
45 + '/*\n'
46 + ' * # <%= title %> - <%= version %>\n'
47 + ' * <%= repository %>\n'
48 + ' * <%= url %>\n'
49 + ' *\n'
50 + ' * Copyright <%= year %> Contributors\n'
51 + ' * Released under the MIT license\n'
52 + ' * https://opensource.org/licenses/MIT\n'
53 + ' *\n'
54 + ' */\n',
55
56 version: version,
57
58};