From 3a115154e77c9d9ab83ddf4ae539f36866a8e0b4 Mon Sep 17 00:00:00 2001 From: Chad Weider Date: Sat, 10 Mar 2012 17:15:04 -0800 Subject: [PATCH] Migrate tar to use library paths. --- src/node/utils/Minify.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/node/utils/Minify.js b/src/node/utils/Minify.js index 4e1c44db4..a4c3efa0c 100644 --- a/src/node/utils/Minify.js +++ b/src/node/utils/Minify.js @@ -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$/, '') + }) ); }