Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Template fixes #534

Merged
merged 3 commits into from
Jan 9, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions template.distillery/Makefile.options
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ CLIENT_FILES := $(wildcard *.eliomi *.eliom) \
SERVER_ELIOM_PACKAGES := ocsigen-start.server

# OCamlfind packages for the server
SERVER_PACKAGES := lwt_log lwt_ppx js_of_ocaml-ppx.deriving ppx_deriving.std
SERVER_PACKAGES := lwt_ppx js_of_ocaml-ppx.deriving ppx_deriving.std

# OCamlfind packages for database access
SERVER_DB_PACKAGES := pgocaml.syntax

# OCamlfind packages for the client
CLIENT_PACKAGES := lwt_log lwt_ppx js_of_ocaml-ppx js_of_ocaml-ppx.deriving \
CLIENT_PACKAGES := lwt_ppx js_of_ocaml-ppx js_of_ocaml-ppx.deriving \
ppx_deriving.std ocsigen-start.client base

# Automatically install packages via NPM
Expand Down
9 changes: 5 additions & 4 deletions template.distillery/Makefile.style
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# command is needed by $(CSS_DEST). It uses the fact that `sed --version`
# doesn't exist for the BSD version.

.PHONY: css check_sass clean-style import-external-css
.PHONY: css check_sass clean-style

check_sed:
ifneq ($(shell sed --version 2> /dev/null),)
Expand All @@ -12,7 +12,7 @@ else
SED = sed -i .css
endif

css: import-external-css $(CSS_DEST)
css: $(CSS_DEST)

define ERROR_SASS

Expand Down Expand Up @@ -65,7 +65,7 @@ endif
# If SASS is not activated, it will concatenate all CSS files (listed in
# $(CSS_FILES)) in $(LOCAL_CSS).
# In both cases, external CSS files ($(EXTERNAL_CSS_FILES)) are copied.
$(LOCAL_CSS): check_sass $(PACKAGE_JSON) $(NPM_POSTCSS) $(NPM_AUTOPREFIXER) import-external-css
$(LOCAL_CSS): $(PACKAGE_JSON) $(NPM_POSTCSS) $(NPM_AUTOPREFIXER) $(LOCAL_STATIC_CSS)/.import-external-css | check_sass
ifeq "$(USE_SASS)" "yes"
ifeq ($(shell which sassc),)
[ -d $(SASSDIR) ] && \
Expand Down Expand Up @@ -108,10 +108,11 @@ $(CSS_DEST): $(LOCAL_CSS) | $(CSSDIR) check_sed
# up-to-date and it allows to add other external CSS files between two
# compilation processes.

import-external-css:
$(LOCAL_STATIC_CSS)/.import-external-css: $(EXTERNAL_CSS_FILES)
ifneq "$(EXTERNAL_CSS_FILES)" ""
cp $(EXTERNAL_CSS_FILES) $(LOCAL_STATIC_CSS)
endif
touch $(LOCAL_STATIC_CSS)/.import-external-css

clean-style:
$(RM) $(LOCAL_CSS) $(LOCAL_STATIC_CSS)/$(PROJECT_NAME).css.map
Expand Down
8 changes: 4 additions & 4 deletions template.distillery/PROJECT_NAME.eliom
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,10 @@ let%server _ =
ignore
[%client (
(* Eliom_config.debug_timings := true; *)
(* Lwt_log_core.add_rule "eliom:client*" Lwt_log.Debug; *)
(* Lwt_log_core.add_rule "os*" Lwt_log.Debug; *)
Lwt_log_core.add_rule "%%%MODULE_NAME%%%*" Lwt_log.Debug
(* Lwt_log_core.add_rule "*" Lwt_log.Debug *)
(* Lwt_log_core.add_rule "eliom:client*" Lwt_log_js.Debug; *)
(* Lwt_log_core.add_rule "os*" Lwt_log_js.Debug; *)
Lwt_log_core.add_rule "%%%MODULE_NAME%%%*" Lwt_log_js.Debug
(* Lwt_log_core.add_rule "*" Lwt_log_js.Debug *)
: unit ) ];
(* Lwt_log_core.add_rule "*" Lwt_log.Debug *)
Lwt_log_core.add_rule "%%%MODULE_NAME%%%*" Lwt_log.Debug
Expand Down
4 changes: 2 additions & 2 deletions template.distillery/PROJECT_NAME_mobile.eliom
Original file line number Diff line number Diff line change
Expand Up @@ -144,5 +144,5 @@ let _ =
debugger console, you can do so by uncommenting the following
lines. *)
(* let () = Eliom_config.debug_timings := true *)
(* let () = Lwt_log_core.add_rule "eliom:client*" Lwt_log.Debug *)
(* let () = Lwt_log_core.add_rule "os*" Lwt_log.Debug *)
(* let () = Lwt_log_core.add_rule "eliom:client*" Lwt_log_js.Debug *)
(* let () = Lwt_log_core.add_rule "os*" Lwt_log_js.Debug *)