mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-21 16:06:16 -04:00
Minify now supports plugins
This commit is contained in:
parent
fd5b7c1080
commit
2c7b84ca3e
4 changed files with 41 additions and 24 deletions
|
@ -2,5 +2,5 @@ var minify = require('../../utils/Minify');
|
|||
|
||||
exports.expressCreateServer = function (hook_name, args, cb) {
|
||||
//serve minified files
|
||||
args.app.get('/minified/:filename', minify.minifyJS);
|
||||
args.app.get(/^\/minified\/(.*)/, minify.minifyJS);
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@ exports.expressCreateServer = function (hook_name, args, cb) {
|
|||
//serve static files
|
||||
args.app.get('/static/js/require-kernel.js', function (req, res, next) {
|
||||
res.header("Content-Type","application/javascript; charset: utf-8");
|
||||
res.write(minify.requireDefinition() + "\n require.setLibraryURI('/plugins'); ");
|
||||
res.write(minify.requireDefinition()); // + "\n require.setLibraryURI('/plugins'); ");
|
||||
res.end();
|
||||
});
|
||||
|
||||
|
@ -24,6 +24,7 @@ exports.expressCreateServer = function (hook_name, args, cb) {
|
|||
}
|
||||
|
||||
var filePath = path.normalize(path.join(plugins.plugins[plugin_name].package.path, "static", url));
|
||||
|
||||
res.sendfile(filePath, { maxAge: exports.maxAge });
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue