forked from jsdoc/jsdoc
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJakefile.js
More file actions
32 lines (23 loc) · 765 Bytes
/
Jakefile.js
File metadata and controls
32 lines (23 loc) · 765 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// see: http://howtonode.org/intro-to-jake
desc('Updating package.json revision.');
task('default', [], function (params) {
var fs = require('fs'),
sys = require('sys');
// import the Mustache template tool
eval(fs.readFileSync('Jake/lib/mustache.js', 'utf8'));
var templates = {
packagejson: fs.readFileSync('Jake/templates/package.json.tmpl', 'utf8')
};
var metadata = {
appname: 'JSDoc',
appversion: '3.0.0alpha',
timestamp: ''+new Date().getTime()
};
var outdir = './';
var rendered = Mustache.to_html(
templates.packagejson,
metadata
);
fs.writeFileSync(outdir + 'package.json', rendered, 'utf8');
process.exit(0);
});