Add basic scaffolding for the checks tab

Change-Id: I7a0d80ca17a3429cd340fc7f26bf0ac828ebeac4
This commit is contained in:
Ben Rohlfs
2020-11-20 16:58:45 +01:00
parent b161a6b293
commit 4449660834
7 changed files with 92 additions and 3 deletions

View File

@@ -200,8 +200,8 @@ func handleSrcRequest(compiledSrcPath string, dirListingMux *http.ServeMux, writ
data = moduleImportRegexp.ReplaceAll(data, []byte("${1}tslib/tslib.es6.js';"))
// 'lit-element' imports and exports have to be resolved to 'lit-element/lit-element.js'.
moduleImportRegexp = regexp.MustCompile("(?m)^((import|export).*'/node_modules/)lit-element.js';$")
data = moduleImportRegexp.ReplaceAll(data, []byte("${1}lit-element/lit-element.js';"))
moduleImportRegexp = regexp.MustCompile("(?m)^((import|export).*'/node_modules/)lit-(element|html).js';$")
data = moduleImportRegexp.ReplaceAll(data, []byte("${1}lit-${3}/lit-${3}.js';"))
if strings.HasSuffix(normalizedContentPath, "/node_modules/page/page.js") {
// Can't import page.js directly, because this is undefined.