Migrate tar to use library paths.

pull/555/head
Chad Weider 2012-03-10 17:15:04 -08:00
parent 0d6ec8c04a
commit 3a115154e7
1 changed files with 6 additions and 3 deletions

View File

@ -36,11 +36,14 @@ var TAR_PATH = path.join(__dirname, 'tar.json');
var tar = JSON.parse(fs.readFileSync(TAR_PATH, 'utf8'));
// Rewrite tar to include modules with no extensions and proper rooted paths.
var LIBRARY_PREFIX = 'ep_etherpad-lite/static/js';
exports.tar = {};
for (var key in tar) {
exports.tar['/' + key] =
tar[key].map(function (p) {return '/' + p}).concat(
tar[key].map(function (p) {return '/' + p.replace(/\.js$/, '')})
exports.tar[LIBRARY_PREFIX + '/' + key] =
tar[key].map(function (p) {return LIBRARY_PREFIX + '/' + p}).concat(
tar[key].map(function (p) {
return LIBRARY_PREFIX + '/' + p.replace(/\.js$/, '')
})
);
}