Skip to content
This repository has been archived by the owner on Oct 30, 2018. It is now read-only.

Commit

Permalink
rename
Browse files Browse the repository at this point in the history
  • Loading branch information
Isao Yagi committed Oct 18, 2012
1 parent da8bcc4 commit f2a80b6
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions lib/app/commands/build/shared.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/*jslint sloppy:true, stupid:true, node:true */

var fw,
var fl,
path = require('path'),
EXTNS = /\.(css|js|json)$/i;


function init(writer) {
fw = writer; // module ./writer.js containing static filesystem functions
fl = writer; // module ./writer.js containing static filesystem functions
}

// add uris from resource store to buildmap, copy some to build dir
Expand All @@ -18,7 +18,7 @@ function mapStoreUris(buildmap, conf, storemap) {
} else {
from = storemap[uri]; // source mojito app filesystem path
to = path.join(conf.build.dir, uri);
fw.copy(from, to);
fl.copy(from, to);
}
});
}
Expand All @@ -33,12 +33,13 @@ function mapSpecUris(buildmap, conf, name, store) {
});
}

// add <mojit>/definition.json tunnel uris to buildmap
// add /tunnel/*/definition.json uris to buildmap
function mapDefxUris(buildmap, conf, store) {
var mojits = store.getResources('client', conf.context, {type: 'mojit'});

mojits.forEach(function (mojit) {
var uri = mojit.url + '/definition.json';

buildmap[conf.tunnelpf + uri + conf.contextqs] = uri;
mapSpecUris(buildmap, conf, mojit.name, store);
});
Expand All @@ -62,7 +63,7 @@ function makeManifest(uris, dir, stamp) {
Object.keys(uris).forEach(function (i) {
lines.push(uris[i]);
});
fw.write(path.join(dir, 'cache.manifest'), lines.join("\n"));
fl.write(path.join(dir, 'cache.manifest'), lines.join("\n"));
}

function injectManifestAttr(uri, str) {
Expand Down Expand Up @@ -94,7 +95,7 @@ function mungePage(conf, mapuri, contents) {
}
}

fw.write(file, contents);
fl.write(file, contents);
}

module.exports = {
Expand Down

0 comments on commit f2a80b6

Please sign in to comment.