Update Semantic to 2.1

Ticket #56
This commit is contained in:
Tim Schumacher 2016-06-10 00:34:34 +02:00
parent 3f1e728781
commit 4385f1acbc
425 changed files with 59924 additions and 37200 deletions

View file

@ -5,7 +5,7 @@
var
requireDotFile = require('require-dot-file'),
config,
package,
npmPackage,
version
;
@ -15,25 +15,29 @@ var
*******************************/
try {
config = requireDotFile('semantic.json');
package = require('../../../package.json');
// looks for version in config or package.json (whichever is available)
version = (config && config.version !== undefined)
? config.version
: package.version
;
config = requireDotFile('semantic.json');
}
catch(error) {}
try {
npmPackage = require('../../../package.json');
}
catch(error) {
// generate fake package
package = {
npmPackage = {
name: 'Unknown',
version: 'x.x'
};
}
// looks for version in config or package.json (whichever is available)
version = (npmPackage && npmPackage.version !== undefined && npmPackage.name == 'semantic-ui')
? npmPackage.version
: config.version
;
/*******************************
Export
*******************************/
@ -56,6 +60,6 @@ module.exports = {
+ ' *' + '\n'
+ ' */' + '\n',
version : package.version
version : version
};