mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-07-03 19:32:14 -04:00
Fixed.
This commit is contained in:
parent
5da7345689
commit
7bf84f6a28
1 changed files with 11 additions and 2 deletions
|
@ -9,11 +9,20 @@ import {expose} from 'threads'
|
||||||
import lightminify from 'lightningcss'
|
import lightminify from 'lightningcss'
|
||||||
import {transform} from 'esbuild';
|
import {transform} from 'esbuild';
|
||||||
|
|
||||||
const compressJS = async (content: string) => {
|
/*
|
||||||
|
* Minify JS content
|
||||||
|
* @param {string} content - JS content to minify
|
||||||
|
*/
|
||||||
|
const compressJS = async (content) => {
|
||||||
return await transform(content, {minify: true});
|
return await transform(content, {minify: true});
|
||||||
}
|
}
|
||||||
|
|
||||||
const compressCSS = async (filename: string, ROOT_DIR: string) => {
|
/*
|
||||||
|
* Minify CSS content
|
||||||
|
* @param {string} filename - name of the file
|
||||||
|
* @param {string} ROOT_DIR - the root dir of Etherpad
|
||||||
|
*/
|
||||||
|
const compressCSS = async (filename, ROOT_DIR) => {
|
||||||
const absPath = path.resolve(ROOT_DIR, filename);
|
const absPath = path.resolve(ROOT_DIR, filename);
|
||||||
try {
|
try {
|
||||||
const basePath = path.dirname(absPath);
|
const basePath = path.dirname(absPath);
|
Loading…
Add table
Add a link
Reference in a new issue