Skip to content

Commit bc176f1

Browse files
authored
Merge pull request #182 from shawnbuso/elements
Remove support for polymer components. bin/claat now supports custom …
2 parents 879b5d2 + 6a65b0f commit bc176f1

File tree

8 files changed

+685
-1448
lines changed

8 files changed

+685
-1448
lines changed

claat/Makefile

Lines changed: 7 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -23,30 +23,22 @@ RELEASES=$(OUTDIR)/claat-darwin-amd64 \
2323
$(OUTDIR)/claat-linux-amd64 \
2424
$(OUTDIR)/claat-linux-386 \
2525
$(OUTDIR)/claat-windows-amd64.exe \
26-
$(OUTDIR)/claat-windows-386.exe \
27-
$(OUTDIR)/claat2-darwin-amd64 \
28-
$(OUTDIR)/claat2-linux-amd64 \
29-
$(OUTDIR)/claat2-linux-386 \
30-
$(OUTDIR)/claat2-windows-amd64.exe \
31-
$(OUTDIR)/claat2-windows-386.exe
26+
$(OUTDIR)/claat-windows-386.exe
3227

3328
SRCS = $(shell find . -name '*.go') render/tmpldata.go
3429

35-
all: $(OUTDIR)/claat $(OUTDIR)/claat2
30+
all: $(OUTDIR)/claat
3631

3732
$(OUTDIR)/claat: $(SRCS) VERSION
38-
go build -o $@ -ldflags "-X main.version=$(VERSION) -X main.useElements=false"
33+
go build -o $@ -ldflags "-X main.version=$(VERSION)"
3934

40-
$(OUTDIR)/claat2: $(SRCS) VERSION
41-
go build -o $@ -ldflags "-X main.version=$(VERSION) -X main.useElements=true"
42-
43-
serve: $(OUTDIR)/claat2
35+
serve: $(OUTDIR)/claat
4436
mkdir -p $(OUTDIR)/deps
4537
cd ../; \
4638
bazel build :bundle; \
4739
mv -f bazel-genfiles/bundle.zip claat/$(OUTDIRNAME)/deps
4840
unzip -o $(OUTDIR)/deps/bundle.zip -d $(OUTDIR)/deps/codelab-elements
49-
cd bin; ./claat2 serve
41+
cd bin; ./claat serve
5042

5143
release: $(RELEASES)
5244
echo $(VERSION) > $(OUTDIR)/VERSION
@@ -69,16 +61,8 @@ $(OUTDIR)/claat-%: GOARCH=$(subst .exe,,$(word 2,$(subst -, ,$*)))
6961
$(OUTDIR)/claat-%: $(SRCS) VERSION
7062
CGO_ENABLED=0 GOOS=$(GOOS) GOARCH=$(GOARCH) go build \
7163
-buildmode exe \
72-
-ldflags "-X main.version=$(VERSION) -X main.useElements=false -s -w" \
73-
-o $@
74-
75-
$(OUTDIR)/claat2-%: GOOS=$(firstword $(subst -, ,$*))
76-
$(OUTDIR)/claat2-%: GOARCH=$(subst .exe,,$(word 2,$(subst -, ,$*)))
77-
$(OUTDIR)/claat2-%: $(SRCS) VERSION
78-
CGO_ENABLED=0 GOOS=$(GOOS) GOARCH=$(GOARCH) go build \
79-
-buildmode exe \
80-
-ldflags "-X main.version=$(VERSION) -X main.useElements=true -s -w" \
64+
-ldflags "-X main.version=$(VERSION) -s -w" \
8165
-o $@
8266

83-
%/tmpldata.go: %/gen-tmpldata.go %/template-elements.html %/template.html %/template.md %/template-offline.html
67+
%/tmpldata.go: %/gen-tmpldata.go %/template.html %/template.md %/template-offline.html
8468
cd $* && go generate

claat/cmd/build.go

Lines changed: 0 additions & 286 deletions
This file was deleted.

claat/cmd/serve.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,7 @@ import (
2424
// CmdServe is the "claat serve ..." subcommand.
2525
// addr is the hostname and port to bind the web server to.
2626
// It returns a process exit code.
27-
func CmdServe(addr string, useElements bool) int {
28-
if !useElements {
29-
CmdBuild()
30-
}
27+
func CmdServe(addr string) int {
3128
http.Handle("/", http.FileServer(http.Dir(".")))
3229
log.Printf("Serving codelabs on %s, opening browser tab now...", addr)
3330
ch := make(chan error, 1)

0 commit comments

Comments
 (0)