This repository has been archived on 2024-01-26. You can view files and clone it, but cannot push or open issues or pull requests.
calcifer/web/semantic/tasks/config/project/release.js

66 lines
1.3 KiB
JavaScript
Raw Normal View History

2015-03-29 19:33:23 +02:00
/*******************************
Release Config
*******************************/
var
requireDotFile = require('require-dot-file'),
config,
2016-06-10 00:34:34 +02:00
npmPackage,
2015-03-29 19:33:23 +02:00
version
;
/*******************************
Derived Values
*******************************/
try {
2016-06-10 00:34:34 +02:00
config = requireDotFile('semantic.json');
}
catch(error) {}
2015-03-29 19:33:23 +02:00
2016-06-10 00:34:34 +02:00
try {
npmPackage = require('../../../package.json');
2015-03-29 19:33:23 +02:00
}
catch(error) {
// generate fake package
2016-06-10 00:34:34 +02:00
npmPackage = {
name: 'Unknown',
2015-03-29 19:33:23 +02:00
version: 'x.x'
};
}
2016-06-10 00:34:34 +02:00
// looks for version in config or package.json (whichever is available)
version = (npmPackage && npmPackage.version !== undefined && npmPackage.name == 'semantic-ui')
? npmPackage.version
: config.version
;
2015-03-29 19:33:23 +02:00
/*******************************
Export
*******************************/
module.exports = {
title : 'Semantic UI',
repository : 'https://github.com/Semantic-Org/Semantic-UI',
url : 'http://www.semantic-ui.com/',
banner: ''
+ ' /*' + '\n'
+ ' * # <%= title %> - <%= version %>' + '\n'
+ ' * <%= repository %>' + '\n'
+ ' * <%= url %>' + '\n'
+ ' *' + '\n'
+ ' * Copyright 2014 Contributors' + '\n'
+ ' * Released under the MIT license' + '\n'
+ ' * http://opensource.org/licenses/MIT' + '\n'
+ ' *' + '\n'
+ ' */' + '\n',
2016-06-10 00:34:34 +02:00
version : version
2015-03-29 19:33:23 +02:00
};