mirror of https://github.com/getmango/Mango.git
- allow building without uglifying with `make build`
This commit is contained in:
parent
69f4795f06
commit
7c059342b5
13
Makefile
13
Makefile
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue