Skip to content

Commit

Permalink
maintainer convenience
Browse files Browse the repository at this point in the history
  • Loading branch information
choonkeat committed Sep 17, 2021
1 parent 59068fb commit 78c3688
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 5 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
elm-stuff
templates/*/build
templates/*/elm.json
templates/*/package.json
templates/*/package-lock.json
templates/*/public/assets/client.js
templates/*/src/Webapp
19 changes: 15 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,18 @@ build:
./bin/generate-client-content; \
printf "; return dict[key] }\n") > bin/elm-webapp

generate-all: build
rm -rf templates/application; ./bin/elm-webapp application templates/application && make -C templates/application install compile
rm -rf templates/document; ./bin/elm-webapp document templates/document && make -C templates/document install compile
rm -rf templates/element; ./bin/elm-webapp element templates/element && make -C templates/element install compile
template-generate-all:
make template-clean template-generate GENTYPE=application
make template-clean template-generate GENTYPE=document
make template-clean template-generate GENTYPE=element

template-clean:
rm -rf templates/$(GENTYPE)

template-generate: build
./bin/elm-webapp $(GENTYPE) templates/$(GENTYPE)
make -C templates/$(GENTYPE) install
ln -s ../../../src/Webapp templates/$(GENTYPE)/src/Webapp
grep -v choonkeat/elm-webapp templates/$(GENTYPE)/elm.json > templates/$(GENTYPE)/elm.json2
mv templates/$(GENTYPE)/elm.json2 templates/$(GENTYPE)/elm.json
make -C templates/$(GENTYPE) compile
Loading

0 comments on commit 78c3688

Please sign in to comment.