diff --git a/build/build.js b/build/build.js
index 9bfce65..ddb30ab 100644
--- a/build/build.js
+++ b/build/build.js
@@ -3,14 +3,14 @@ module.exports = function(grunt) {
var async = require('async'),
fs = require('fs');
- var version = grunt.config.get("pasteup.version");
+ var version = grunt.config.get("pasteup.version").toString();
function buildDocumentationPages(cb) {
var template = grunt.file.read('build/templates/default.html');
async.forEach(fs.readdirSync('docs'), function(name, cb) {
var ft = grunt.file.read('docs/' + name, 'utf8');
- var f = grunt.template.process(ft.toString(), {'pasteupVersion': version});
- var output = grunt.template.process(template, {'name':name, 'code':ft, 'pasteupVersion': version});
+ var f = grunt.template.process(ft.toString(), { data: {'pasteupVersion': version} });
+ var output = grunt.template.process(template, { data: {'name':name, 'code':ft, 'pasteupVersion': version} });
grunt.file.write('build/deployable_artefact/' + name, output);
cb();
}, function() {
@@ -30,7 +30,7 @@ module.exports = function(grunt) {
cb();
}, function() {
// Render modules into template.
- var output = grunt.template.process(template, {'modules': modules, 'pasteupVersion': version});
+ var output = grunt.template.process(template, { data: {'modules': modules, 'pasteupVersion': version} });
grunt.file.write('build/deployable_artefact/modules.html', output);
cb();
});
@@ -42,7 +42,7 @@ module.exports = function(grunt) {
// Get each module and create its own page in the docs.
async.forEach(fs.readdirSync('html/module'), function(name, cb) {
var module = grunt.file.read('html/module/' + name, 'utf8');
- var output = grunt.template.process(template, {'name': name, 'code': module, 'pasteupVersion': version});
+ var output = grunt.template.process(template, { data: {'name': name, 'code': module, 'pasteupVersion': version} });
grunt.file.write('build/deployable_artefact/modules/' + name, output);
cb();
}, function() {
diff --git a/build/deploy.js b/build/deploy.js
index 363e140..e56a63e 100755
--- a/build/deploy.js
+++ b/build/deploy.js
@@ -90,9 +90,9 @@ function deploy(command, callback) {
Returns the most recent version number in /version
*/
function getVersionNumber() {
- var f = fs.readFileSync(__dirname + '/../versions', 'utf8');
+ var f = fs.readFileSync(__dirname + '/../component.json', 'utf8');
var data = JSON.parse(f.toString());
- return data['versions'].pop();
+ return data['version'];
}
function getFarFutureExpiryDate() {
diff --git a/build/templates/default.html b/build/templates/default.html
index d105ae6..0fd44e5 100644
--- a/build/templates/default.html
+++ b/build/templates/default.html
@@ -78,7 +78,7 @@
-
+