Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added current version to docs

  • Loading branch information...
commit 5530a4cb9f59ec26e3a24e073e156ce5d3194259 1 parent e799e9f
@davglass davglass authored
Showing with 21 additions and 1 deletion.
  1. +4 −1 Makefile
  2. +17 −0 scripts/versions.js
View
5 Makefile
@@ -1,7 +1,10 @@
install:
npm install
-docs:
+version:
+ ./scripts/versions.js
+
+docs: version
cd docs/raw && ../../bin/selleck -o ../html
deploydocs: docs
View
17 scripts/versions.js
@@ -0,0 +1,17 @@
+#!/usr/bin/env node
+
+var path = require('path'),
+ fs = require('fs'),
+ package = require(path.join(__dirname, '../', 'package.json')),
+ version = package.version,
+ doc = path.join(__dirname, '../', 'docs', 'raw', 'project.json');
+
+console.log('[version]', version);
+console.log('[doc]', doc);
+
+var docJSON = require(doc);
+
+docJSON.version = version;
+
+fs.writeFileSync(doc, JSON.stringify(docJSON, null, 2));
+console.log('[done]');
Please sign in to comment.
Something went wrong with that request. Please try again.