1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-03 17:59:37 +02:00

Add plugin static files cache

This commit is contained in:
Chocobozzz 2019-07-23 09:48:48 +02:00 committed by Chocobozzz
parent 7663e55a2c
commit a8b666e9f1
6 changed files with 36 additions and 20 deletions

View file

@ -17,6 +17,7 @@ import { ServerHook, ServerHookName, serverHookObject } from '../../../shared/mo
import { getHookType, internalRunHook } from '../../../shared/core-utils/plugins/hooks'
import { RegisterOptions } from '../../typings/plugins/register-options.model'
import { PluginLibrary } from '../../typings/plugins'
import { ClientHtml } from '../client-html'
export interface RegisteredPlugin {
npmName: string
@ -323,6 +324,8 @@ export class PluginManager implements ServerHook {
for (const cssPath of cssRelativePaths) {
await this.concatFiles(join(pluginPath, cssPath), PLUGIN_GLOBAL_CSS_PATH)
}
ClientHtml.invalidCache()
}
private concatFiles (input: string, output: string) {