- allow building without uglifying with `make build`

This commit is contained in:
Alex Ling 2020-02-17 02:15:44 +00:00
parent 69f4795f06
commit 7c059342b5
2 changed files with 15 additions and 4 deletions

View File

@ -1,12 +1,19 @@
build:
all: uglify | build
uglify:
yarn
yarn uglify
shards install
build: libs
crystal build src/mango.cr --release --progress
libs:
shards install
run:
crystal run src/mango.cr --error-trace
clean:
rm mango
rm -rf dist
rm yarn.lock
rm -rf node_modules

View File

@ -5,7 +5,11 @@ require "./util"
class FS
extend BakedFileSystem
bake_folder "../dist"
{% if read_file? "./dist" %}
bake_folder "../dist"
{% else %}
bake_folder "../public"
{% end %}
end
class StaticHandler < Kemal::Handler