Merge branch 'master' into timers

This commit is contained in:
Jeff Williams 2012-10-07 07:41:14 -07:00
commit c1c15e8156
3 changed files with 7 additions and 4 deletions

View File

@ -77,7 +77,7 @@ var ls = exports.ls = function(dir, recurse, _allFiles, _path) {
} }
else { // it's a file else { // it's a file
_allFiles.push( _allFiles.push(
(_path.join('/') + '/' + file).replace(/[\/\\]+/g, '/') path.normalize(_path.join('/') + '/' + file)
); );
} }
} }

View File

@ -14,10 +14,14 @@ var util = require('common/util');
// required config values, override these defaults in your config.json if necessary // required config values, override these defaults in your config.json if necessary
const defaults = { const defaults = {
"tags": {
"allowUnknownTags": true
},
"source": { "source": {
"includePattern": ".+\\.js(doc)?$", "includePattern": ".+\\.js(doc)?$",
"excludePattern": "(^|\\/)_" "excludePattern": "(^|\\/)_"
}, },
"plugins": [],
"jsVersion": 180 "jsVersion": 180
}; };
@ -28,7 +32,6 @@ const defaults = {
*/ */
function Config(json) { function Config(json) {
json = JSON.parse( (json || "{}") ); json = JSON.parse( (json || "{}") );
this._config = util.mergeRecurse(defaults, json); this._config = util.mergeRecurse(defaults, json);
} }

View File

@ -232,12 +232,12 @@ exports.publish = function(taffyData, opts, tutorials) {
// update outdir if necessary, then create outdir // update outdir if necessary, then create outdir
var packageInfo = ( find({kind: 'package'}, false) || [] ) [0]; var packageInfo = ( find({kind: 'package'}, false) || [] ) [0];
if (packageInfo && packageInfo.name) { if (packageInfo && packageInfo.name) {
outdir += '/' + packageInfo.name + '/' + packageInfo.version + '/'; outdir = path.join(outdir, packageInfo.name, packageInfo.version);
} }
fs.mkPath(outdir); fs.mkPath(outdir);
// copy static files to outdir // copy static files to outdir
var fromDir = templatePath + '/static', var fromDir = path.join(templatePath, 'static'),
staticFiles = fs.ls(fromDir, 3); staticFiles = fs.ls(fromDir, 3);
staticFiles.forEach(function(fileName) { staticFiles.forEach(function(fileName) {