diff --git a/.gitignore b/.gitignore index 30c3ef3..9d3f3b8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,2 @@ -redbean*.com *.db -.build \ No newline at end of file +build \ No newline at end of file diff --git a/Makefile b/Makefile index 18d638a..6199ead 100644 --- a/Makefile +++ b/Makefile @@ -1,16 +1,21 @@ +.PHONY: build/peachy.com +build/peachy.com: build/redbean-2.2.com + cp build/redbean-2.2.com build/peachy-noassets.com + cd assets ; zip -r ../build/peachy-noassets.com . ; cd .. + mv build/peachy-noassets.com build/peachy.com + .PHONY: run -run: .build/peachy.com - .build/peachy.com +run: build/peachy.com + build/peachy.com -.PHONY: .build/peachy.com -.build/peachy.com: redbean/redbean-2.2.com - mkdir -p .build - # rm .build/* - cp redbean/redbean-2.2.com .build/peachy-noassets.com - zip -r .build/peachy-noassets.com .init.lua .lua - mv .build/peachy-noassets.com .build/peachy.com +build/redbean-2.2.com: + wget --directory-prefix build https://redbean.dev/redbean-2.2.com + chmod a+x build/redbean-2.2.com +.PHONY: clean +clean: + rm build/peachy* -.redbean/redbean-2.2.com: - wget --directory-prefix redbean https://redbean.dev/redbean-2.2.com - chmod a+x redbean/redbean-2.2.com +.PHONY: clean-redbean +clean-redbean: + rm build/redbean* diff --git a/.init.lua b/assets/.init.lua similarity index 87% rename from .init.lua rename to assets/.init.lua index 992a754..129dac1 100644 --- a/.init.lua +++ b/assets/.init.lua @@ -1,4 +1,4 @@ -LaunchBrowser() +-- LaunchBrowser() fm = require "fullmoon" fm.setTemplate("hello", "Hello, {%& name %}") @@ -7,5 +7,4 @@ fm.setRoute("/hello/:name", function(r) end) fm.setTemplate("itworks", "

It works!

") fm.setRoute("/", fm.serveContent("itworks")) -print "did some stuff" fm.run() \ No newline at end of file diff --git a/.lua/fullmoon.lua b/assets/.lua/fullmoon.lua similarity index 100% rename from .lua/fullmoon.lua rename to assets/.lua/fullmoon.lua