#############################################################################################
#############################################################################################
##
## DEFINE CONAN
##
#############################################################################################
#############################################################################################


CONAN_BIN            ?= $(VENDOR_PATH)conan
CONAN_CONFIG         ?= $(VENDOR_PATH)conan.conf

define CONANEXAMPLECONF
Server:
  
  # The hostname or IP address of the server (CONAN_SERVER_HOST)
  # Domain, IP or hostname of the server
  #Host: localhost:8080
  
  # The port of the server (CONAN_SERVER_ADDRESS)
  # Address: localhost
  
  # The port of the server (CONAN_SERVER_PORT)
  # Port: 8080
  
  # 
  Path:
    # The path to the server (CONAN_SERVER_WEB_PATH)  
    Web: web
    
  Watch:
    - Path: src
      Command: /bin/bash -c "npx esbuild --bundle --outfile={{ .WebPath }}/scripts/bundle.js --sourcemap {{ .Path }}"
      Exclude:
        - ~$
        - ^\.
    - Path: web
      Exclude:
        - ~$
        - ^\.
    
  Flags:
    FollowSymlinks: true

endef

export CONANEXAMPLECONF

$(CONAN_CONFIG):
	$(QUIET) $(ECHO) "$$CONANEXAMPLECONF" >> $@