Sha256: c22995fa372bf25b766b2ab90ecb70de99a3a80b26626aff9ec06752d2d95507
Contents?: true
Size: 1008 Bytes
Versions: 16
Compression:
Stored size: 1008 Bytes
Contents
var fs = require('fs'), hdbs = require('handlebars').create(); function versionFor(library) { var envPropertyName = library.toUpperCase() + '_VERSION'; var version = process.env[ envPropertyName ]; if (version == null || version === '') { console.error('Must set environment variable ' + envPropertyName); process.exit(1); } var path = 'vendor/' + library + '-' + version + '.js'; if (!fs.existsSync(path)) { console.error('No such file: ' + path); process.exit(1); } return version; } module.exports = function buildSuite() { var template = fs.readFileSync('spec/suite.hdbs').toString(), compiledTemplate = hdbs.compile(template), outputPath = 'spec/suite.html', templateData = { emberVersion: versionFor('ember'), jQueryVersion: versionFor('jquery'), handlebarsVersion: versionFor('handlebars') }; fs.writeFileSync(outputPath, compiledTemplate(templateData)); return outputPath; };
Version data entries
16 entries across 16 versions & 1 rubygems