mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-20 15:36:16 -04:00
lint: src/node/hooks/express/static.js
This commit is contained in:
parent
09fc7438ea
commit
6df3eadecd
1 changed files with 6 additions and 4 deletions
|
@ -1,11 +1,12 @@
|
||||||
|
'use strict';
|
||||||
|
|
||||||
const minify = require('../../utils/Minify');
|
const minify = require('../../utils/Minify');
|
||||||
const plugins = require('ep_etherpad-lite/static/js/pluginfw/plugin_defs');
|
const plugins = require('../../../static/js/pluginfw/plugin_defs');
|
||||||
const CachingMiddleware = require('../../utils/caching_middleware');
|
const CachingMiddleware = require('../../utils/caching_middleware');
|
||||||
const settings = require('../../utils/Settings');
|
|
||||||
const Yajsml = require('etherpad-yajsml');
|
const Yajsml = require('etherpad-yajsml');
|
||||||
const _ = require('underscore');
|
const _ = require('underscore');
|
||||||
|
|
||||||
exports.expressCreateServer = function (hook_name, args, cb) {
|
exports.expressCreateServer = (hookName, args, cb) => {
|
||||||
// Cache both minified and static.
|
// Cache both minified and static.
|
||||||
const assetCache = new CachingMiddleware();
|
const assetCache = new CachingMiddleware();
|
||||||
args.app.all(/\/javascripts\/(.*)/, assetCache.handle);
|
args.app.all(/\/javascripts\/(.*)/, assetCache.handle);
|
||||||
|
@ -34,7 +35,8 @@ exports.expressCreateServer = function (hook_name, args, cb) {
|
||||||
args.app.use(jsServer.handle.bind(jsServer));
|
args.app.use(jsServer.handle.bind(jsServer));
|
||||||
|
|
||||||
// serve plugin definitions
|
// serve plugin definitions
|
||||||
// not very static, but served here so that client can do require("pluginfw/static/js/plugin-definitions.js");
|
// not very static, but served here so that client can do
|
||||||
|
// require("pluginfw/static/js/plugin-definitions.js");
|
||||||
args.app.get('/pluginfw/plugin-definitions.json', (req, res, next) => {
|
args.app.get('/pluginfw/plugin-definitions.json', (req, res, next) => {
|
||||||
const clientParts = _(plugins.parts)
|
const clientParts = _(plugins.parts)
|
||||||
.filter((part) => _(part).has('client_hooks'));
|
.filter((part) => _(part).has('client_hooks'));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue