move xterm lib to assets/external

This commit is contained in:
Zhi Wang 2022-01-07 11:11:37 -05:00
parent 477454e9bf
commit c3606288c8
11 changed files with 9 additions and 6 deletions

View File

@ -1,7 +1,6 @@
This directory contains xterm.js 4.16 This directory contains xterm.js 4.16
To update this to a newer version of xterm.js, run To update the xterm library to a newer version of xterm.js, run
`npm install xterm.js` in a different directory, `npm install xterm.js` in a different directory, and then copy
and copy xterm.js and xterm.js.map and xterm.css here. xterm.js and xterm.js.map and xterm.css and the files for three
of xterm.js's addons to the external directory.
Do the same to three of xterm.js's addons.

View File

@ -224,7 +224,11 @@ func fileHandler(c *gin.Context, fname string) {
} else { } else {
//c.HTML interprets the file as HTML file //c.HTML interprets the file as HTML file
//we do not need that for regular files //we do not need that for regular files
c.File(fmt.Sprint("./assets/", fname)) if strings.HasPrefix(fname, "xterm") {
c.File(fmt.Sprint("./assets/external/", fname))
} else {
c.File(fmt.Sprint("./assets/", fname))
}
} }
} }