Skip to content

Commit

Permalink
Added current version to docs
Browse files Browse the repository at this point in the history
  • Loading branch information
davglass committed Oct 9, 2012
1 parent e799e9f commit 5530a4c
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Makefile
@@ -1,7 +1,10 @@
install: install:
npm install npm install


docs: version:
./scripts/versions.js

docs: version
cd docs/raw && ../../bin/selleck -o ../html cd docs/raw && ../../bin/selleck -o ../html


deploydocs: docs deploydocs: docs
Expand Down
17 changes: 17 additions & 0 deletions 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]');

0 comments on commit 5530a4c

Please sign in to comment.