diff options
| author | Jamal Carvalho <jamal@golang.org> | 2021-06-11 19:04:56 -0400 |
|---|---|---|
| committer | Jamal Carvalho <jamal@golang.org> | 2021-06-12 14:42:15 +0000 |
| commit | b9277dd7e88e2320b1ea69988f2fc13b7afcfdc4 (patch) | |
| tree | 57a87e5944f9bedcbc49b94ca25091ca586dc953 /devtools/cmd | |
| parent | 37878f05ce197b492a66d994decd5ad7e948f1f1 (diff) | |
| download | go-x-pkgsite-b9277dd7e88e2320b1ea69988f2fc13b7afcfdc4.tar.xz | |
devtools,internal: build new static assets
The static build devtool builds the TypeScript files
in static and ignores content/static. Unused config
options like Write are removed and support is added
for bundling files together. The command walks a
given directory and collects files it determines to
be entry points. Files prefixed with an underscore
are assumed to be imported in an entrypoint file
and ignored.
Change-Id: I7c62afd36ff4ee327d528919c54866631a9c73f7
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/327281
Trust: Jamal Carvalho <jamal@golang.org>
Reviewed-by: Julie Qiu <julie@golang.org>
Diffstat (limited to 'devtools/cmd')
| -rw-r--r-- | devtools/cmd/static/main.go | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/devtools/cmd/static/main.go b/devtools/cmd/static/main.go index bc5045d5..93e76b96 100644 --- a/devtools/cmd/static/main.go +++ b/devtools/cmd/static/main.go @@ -13,7 +13,17 @@ import ( ) func main() { - _, err := static.Build(static.Config{StaticPath: "content/static", Write: true}) + _, err := static.Build(static.Config{EntryPoint: "static/frontend", Bundle: true}) + if err != nil { + log.Fatal(err) + } + + _, err = static.Build(static.Config{EntryPoint: "static/worker", Bundle: true}) + if err != nil { + log.Fatal(err) + } + + _, err = static.Build(static.Config{EntryPoint: "static/shared"}) if err != nil { log.Fatal(err) } |
