Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • oss/utilities/webservice-echoserver
1 result
Show changes
Showing
with 1596 additions and 0 deletions
#############################################################################################
#############################################################################################
##
## INSTALL jsdoc.json
##
#############################################################################################
#############################################################################################
define JSDOCJSON
{
"tags": {
"allowUnknownTags": true
},
"source": {
"include": "$(SOURCE_PATH)",
"includePattern": "\\.js$$",
"excludePattern": ""
},
"plugins": [
"plugins/markdown",
"jsdoc-plantuml"
],
"opts": {
"template": "node_modules/clean-jsdoc-theme",
"encoding": "utf8",
"destination": "$(BUILD_PATH)/docs/",
"recurse": true,
"verbose": true,
"theme_opts": {
"theme": "light",
"title": "$(COMPONENT_NAME)",
"meta": [
{
"name": "author",
"content": "schukai GmbH"
},
{
"name": "description",
"content": "javascript library for ..."
}
],
"search": true,
"add_style_path": [
{
"href": "https://monsterjs.org/assets/prettify.css",
"crossorigin": "anonymous",
"rel": "stylesheet"
}
],
"add_script_path": [
{
"src": "https://code.jquery.com/jquery-3.5.1.js",
"integrity": "sha256-QWo7LDvxbWT2tbbQ97B53yJnYU3WhH/C8ycbRAkjPDc=",
"crossorigin": "anonymous"
},
],
"footer": "<a href='https://about.schukai.com/de/impressum/'>Imprint</a>",
"overlay_scrollbar": {
"options": {
}
},
"resizeable": {
"navbar": {
"min": "300",
"max": "600"
}
},
"codepen": {
"enable_for": [
"examples"
],
"options": {
"title": "javascript library by schukai GmbH",
"description": "the example ...",
"editors": "0012"
}
},
"sections": [
"Tutorials",
"Namespaces",
"Classes",
"Modules",
"Externals",
"Events",
"Mixins",
"Interfaces",
"Global",
"Menu"
]
}
},
"templates": {
"cleverLinks": true,
"monospaceLinks": false,
"default": {
"outputSourceFiles": false
}
},
"plantuml": {
"puml": {
"create": true,
"destination": "$(BUILD_PATH)/docs/puml"
},
"images": {
"create": true,
"destination": "$(BUILD_PATH)/docs/images",
"defaultFormat": "svg"
}
}
}
endef
export JSDOCJSON
$(DEPLOYMENT_PATH)jsdoc.json:
$(QUIET) $(ECHO) "$$JSDOCJSON" >> $@
\ No newline at end of file
#############################################################################################
#############################################################################################
##
## COMMANDS JSDOC
##
#############################################################################################
#############################################################################################
# path and binaries
JSDOC ?= $(NODE_MODULES_BIN_DIR)jsdoc
EXECUTABLES = $(EXECUTABLES:-) $(JSDOC);
\ No newline at end of file
This diff is collapsed.
#############################################################################################
#############################################################################################
##
## AGPL 3.0 LICENSE
##
#############################################################################################
#############################################################################################
## License used in the project
LICENSE_TEXT ?= All rights reserved
## The spdx license identifier
SPDX_LICENSE_ID ?=
## Copyright holder of the project
COPYRIGHT_TEXT ?= © schukai GmbH, $(LICENSE_TEXT).
## The owner of the project
COPYRIGHT_OWNER ?= schukai GmbH
COPYRIGHT_URL ?= [LICENSE](https://www.schukai.com/)
define LICENSE_FILE_CONTENT
The schukai Enterprise License (the "Enterprise License").
Copyright © 2022 schukai GmbH.
Regarding this Software, schukai GmbH is the licensor and you are the licensee.
By using the Software, you agree to all the terms and conditions set forth below.
This software and associated documentation files (the "Software") may be used in production only if you (and any company
you represent) have a valid Enterprise License corresponding to your use. Subject to the preceding sentence, you are free
to modify this Software and to release patches for the Software. You agree that schukai and/or its licensors (as applicable)
retain all right, title and interest in and to all such modifications and/or patches, and that all such modifications
and/or patches may be used, copied, modified, displayed, distributed or otherwise exploited only with a valid Enterprise
License for the appropriate use. Notwithstanding the foregoing, you may copy and modify the Software for development and
testing purposes without requiring a subscription.
You agree that schukai and/or its licensors (if applicable) retain all right, title and interest in and to all such
modifications. No additional rights are granted to you beyond those expressly set forth herein. Subject to the foregoing,
you may not copy, merge, publish, distribute, sublicense and/or sell the Software.
THE SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIMS, DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, ARISING OUT
OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE.
For any third-party components incorporated into schukai's software, such components are licensed under the original license
provided by the owner of the applicable component.
endef
#############################################################################################
#############################################################################################
##
## UNLICENSED
##
#############################################################################################
#############################################################################################
## License used in the project
LICENSE_TEXT ?= UNLICENSED
## The spdx license identifier
SPDX_LICENSE_ID ?=
## Copyright holder of the project
COPYRIGHT_TEXT ?= © schukai GmbH, $(LICENSE_TEXT).
COPYRIGHT_URL ?= [LICENSE](https://www.schukai.com/)
## The owner of the project
COPYRIGHT_OWNER ?= schukai GmbH
#############################################################################################
#############################################################################################
##
## LICENSE
##
#############################################################################################
#############################################################################################
ifneq "$(wildcard $(SOURCE_PATH) )" ""
## Files wich should be checked for license headers
LICENSE_FILE_PATTERN ?= $(shell find $(SOURCE_PATH) -type f \( -iname \*.go -o -iname \*.php -o -iname \*.js -o -iname \*.mjs -o -iname \*.cjs \) )
endif
# https://spdx.github.io/spdx-spec/v2.3/SPDX-license-list/
ADDLICENSE_BIN ?= addlicense
ifeq ($(shell command -v $(ADDLICENSE_BIN) 2> /dev/null),)
$(shell $(GO) install github.com/google/addlicense@latest)
EXECUTABLES = $(EXECUTABLES:-) $(ADDLICENSE_BIN);
endif
EXECUTABLES = $(EXECUTABLES:-) $(ADDLICENSE_BIN)
#############################################################################################
#############################################################################################
##
## COMMANDS NODEJS
##
#############################################################################################
#############################################################################################
# path and binaries
NODEJS ?= node
NODE ?= node
NPM ?= pnpm
EXECUTABLES = $(EXECUTABLES:-) $(NPM);
NODE_PACKAGES := $(shell find $(PROJECT_ROOT) -type f -name 'package.json' -not -path '*/node_modules/*')
NODE_MODULES := $(shell find $(PROJECT_ROOT) -type d -name 'node_modules' -prune)
NODE_MODULES_MODIFIED := $(shell find $(PROJECT_ROOT) -type f -name 'package.json' -not -path '*/node_modules/*' -exec sh -c 'F=$$(dirname {}); echo $${F}/node_modules/.modified' \;)
$(NODE_MODULES_MODIFIED): $(NODE_PACKAGES)
$(ECHOMARKER) "Updating node modules..."
$(QUIET) for p in $(NODE_PACKAGES); do \
DIR=$$(dirname $$p); \
echo "Updating package: $${DIR}" ;\
$(NPM) install --prefix $${DIR} ;\
if [ -d $${DIR}/node_modules/ ]; then \
touch $${DIR}/node_modules/.modified ;\
fi ;\
done
## Main Develpoment Node Repos
NODE_ROOT_DIR ?= $(DEVELOPMENT_PATH)
NODE_MODULES_DIR ?= $(NODE_ROOT_DIR)node_modules/
NODE_PACKAGE_PATH ?= $(NODE_ROOT_DIR)package.json
NODE_MODULES_BIN_DIR ?= $(NODE_MODULES_DIR).bin/
ESBUILD ?= $(NODE_MODULES_BIN_DIR)esbuild
WEBPACK ?= $(NODE_MODULES_BIN_DIR)webpack
BABEL ?= $(NODE_MODULES_BIN_DIR)babel
UGLIFYJS ?= $(NODE_MODULES_BIN_DIR)uglifyjs
C8 ?= $(NODE_MODULES_BIN_DIR)c8
MOCHA ?= $(NODE_MODULES_BIN_DIR)mocha
PACKAGE_JSON ?= $(NODE_ROOT_DIR)package.json
ifneq "$(wildcard $(SOURCE_PATH) )" ""
MJS_SOURCE_FILES := $(shell find $(SOURCE_PATH) -name '*.mjs')
MJS_RELATIVE_SOURCE_FILES := $(shell find $(SOURCE_PATH) -name '*.mjs' -exec realpath --relative-to $(PROJECT_ROOT) {} \; )
JS_SOURCE_FILES := $(shell find $(SOURCE_PATH) -name '*.js')
JS_RELATIVE_SOURCE_FILES := $(shell find $(SOURCE_PATH) -name '*.js' -exec realpath --relative-to $(PROJECT_ROOT) {} \; )
endif
#############################################################################################
#############################################################################################
##
## COLORS
##
#############################################################################################
#############################################################################################
INFO := $(GREEN)
COMMENT := $(YELLOW)
#############################################################################################
#############################################################################################
##
## OUTPUT CONTROL AND STANDARD OUTPUTS
##
#############################################################################################
#############################################################################################
MARKER := $(BLUE)[+]$(RESET)
ERRORMARKER := $(RED)[-]$(RESET)
#############################################################################################
#############################################################################################
##
## DEACTIVATE THE QUIET MODE BY OVERWRITING THE VALUE WITH SPACE
##
#############################################################################################
#############################################################################################
ifndef DEBUG
QUIET = @
else
QUIET =
endif
ifndef DONTOPENBROWSER
OPENBROWSER = false
else
OPENBROWSER = true
endif
#############################################################################################
#############################################################################################
##
## COMMANDS
##
#############################################################################################
#############################################################################################
ECHO := @echo
ECHOMARKER := @echo "$(MARKER) $0"
ECHOERRORMARKER := @echo "$(ERRORMARKER) $0"
#############################################################################################
#############################################################################################
##
## PLACEHOLDER
##
#############################################################################################
#############################################################################################
COMPONENT_SLUG := $(shell echo "$(COMPONENT_NAME)" | tr '[:upper:]' '[:lower:]')
#############################################################################################
#############################################################################################
##
## README
##
#############################################################################################
#############################################################################################
define README_FILE_CONTENT
# $(COMPONENT_NAME)
$(COMPONENT_NAME) is ...
## Documentation
To check out docs and examples, visit ....
## Installation
```shell
go get $(shell git config --get remote.origin.url | sed -E 's/^\s*.*:\/\///g')
```
**Note:** This library uses [Go Modules](https://github.com/golang/go/wiki/Modules) to manage dependencies.
## Usage
## Contributing
Merge requests are welcome. For major changes, please open an issue first to discuss what
you would like to change. **Please make sure to update tests as appropriate.**
Versioning is done with [SemVer](https://semver.org/).
Changelog is generated with [git-chglog](https://github.com/git-chglog/git-chglog#git-chglog)
Commit messages should follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification.
Messages are started with a type, which is one of the following:
- **feat**: A new feature
- **fix**: A bug fix
- **doc**: Documentation only changes
- **refactor**: A code change that neither fixes a bug nor adds a feature
- **perf**: A code change that improves performance
- **test**: Adding missing or correcting existing tests
- **chore**: Other changes that don't modify src or test files
The footer would be used for a reference to an issue or a breaking change.
A commit that has a footer `BREAKING CHANGE:`, or appends a ! after the type/scope,
introduces a breaking API change (correlating with MAJOR in semantic versioning).
A BREAKING CHANGE can be part of commits of any type.
the following is an example of a commit message:
```text
feat: add 'extras' field
```
## Questions
For questions and commercial support, please contact [schukai GmbH](https://www.schukai.com/).
The issue list of this repo is exclusively for bug reports and feature requests.
## Issues
Please make sure to read the Issue Reporting Checklist before opening an
issue. Issues not conforming to the guidelines may be closed immediately.
## License
$(COPYRIGHT_TEXT)
$(COPYRIGHT_URL)
You can also purchase a commercial license.
endef
#############################################################################################
#############################################################################################
##
## README
##
#############################################################################################
#############################################################################################
define README_FILE_CONTENT
# $(COMPONENT_NAME)
$(COMPONENT_NAME) is ...
## Documentation
To check out docs and examples, visit ....
## Installation
```shell
go get $(shell git config --get remote.origin.url | sed -E 's/^\s*.*:\/\///g')
```
**Note:** This library uses [Go Modules](https://github.com/golang/go/wiki/Modules) to manage dependencies.
## Usage
## Contributing
Merge requests are welcome. For major changes, please open an issue first to discuss what
you would like to change. **Please make sure to update tests as appropriate.**
Versioning is done with [SemVer](https://semver.org/).
Changelog is generated with [git-chglog](https://github.com/git-chglog/git-chglog#git-chglog)
Commit messages should follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification.
Messages are started with a type, which is one of the following:
- **feat**: A new feature
- **fix**: A bug fix
- **doc**: Documentation only changes
- **refactor**: A code change that neither fixes a bug nor adds a feature
- **perf**: A code change that improves performance
- **test**: Adding missing or correcting existing tests
- **chore**: Other changes that don't modify src or test files
The footer would be used for a reference to an issue or a breaking change.
A commit that has a footer `BREAKING CHANGE:`, or appends a ! after the type/scope,
introduces a breaking API change (correlating with MAJOR in semantic versioning).
A BREAKING CHANGE can be part of commits of any type.
the following is an example of a commit message:
```text
feat: add 'extras' field
```
## Questions
For questions and commercial support, please contact [schukai GmbH](https://www.schukai.com/).
The issue list of this repo is exclusively for bug reports and feature requests.
## Issues
Please make sure to read the Issue Reporting Checklist before opening an
issue. Issues not conforming to the guidelines may be closed immediately.
## License
$(COPYRIGHT_TEXT)
$(COPYRIGHT_URL)
You can also purchase a commercial license.
endef
#############################################################################################
#############################################################################################
##
## README
##
#############################################################################################
#############################################################################################
define README_FILE_CONTENT
# $(COMPONENT_NAME)
$(COMPONENT_NAME) is a part of the Alvine/Agenor project.
This app is built with ES6 modules and uses [import](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Statements/import)
and [export](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/export).
For some functions, you need additional [polyfills](#polyfill).
## Documentation
To check out docs and examples, visit [doc.alvine.io](https://doc.alvine.io).
## Installation
`pnpm install @oss/$(COMPONENT_SLUG)`
## Usage
A simple example of the use of functionality from $(COMPONENT_NAME). We create a small file `index.mjs`.
The `m` in `.mjs` stands for module. In the example we want to make substitutions in a string.
```js
// script
```
To integrate this function into a website it is recommended to use a bundler like [esbuild](https://esbuild.github.io/).
```sh
esbuild index.mjs --outfile dist.js
```
We can now integrate that into our website.
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>$(COMPONENT_NAME)</title>
<script src="dist.js"></script>
</head>
<body>
```
Voila!
### Polyfill
We do try to work around some browser bugs, but on the whole we don't use polyfills and feature detection.
However, many functions can be mapped via [polyfill.io](https://polyfill.io/) and thus the compatibility can be increased.
```js
<script id="polyfill" src="https://polyfill.io/v3/polyfill.min.js?..."
crossorigin="anonymous"
referrerpolicy="no-referrer"></script>
```
## Questions
For questions and commercial support, please contact [schukai GmbH](https://www.schukai.com/).
The issue list of this repo is exclusively for bug reports and feature requests.
## Issues
Please make sure to read the Issue Reporting Checklist before opening an
issue. Issues not conforming to the guidelines may be closed immediately.
## License
$(COPYRIGHT_TEXT)
$(COPYRIGHT_URL)
## Changelog
Detailed changes for each release are documented in the CHANGELOG.
endef
#############################################################################################
#############################################################################################
##
## README
##
#############################################################################################
#############################################################################################
define README_FILE_CONTENT
# $(COMPONENT_NAME)
$(COMPONENT_NAME) is ...
## Documentation
To check out docs and examples, visit ....
## Installation
## Usage
## Questions
For questions and commercial support, please contact [schukai GmbH](https://www.schukai.com/).
The issue list of this repo is exclusively for bug reports and feature requests.
## Issues
Please make sure to read the Issue Reporting Checklist before opening an
issue. Issues not conforming to the guidelines may be closed immediately.
## License
$(COPYRIGHT_TEXT)
$(COPYRIGHT_URL)
You can also purchase a commercial license.
endef
#############################################################################################
#############################################################################################
##
## README
##
#############################################################################################
#############################################################################################
define README_FILE_CONTENT
# $(COMPONENT_NAME)
$(COMPONENT_NAME) is a lightweight, robust and easy-to-use form library with modest ambitions.
The component easily integrates with your existing websites without taking over everything.
One design target is to reach the shiny sun with as little JavaScript as possible.
Monster was built with ES6 modules and uses [import](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Statements/import)
and [export](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/export).
For some functions, you need additional [polyfills](#polyfill).
## Documentation
To check out docs and examples, visit [monsterjs.org/en/doc/$(COMPONENT_SLUG)/](https://monsterjs.org/en/doc/$(COMPONENT_SLUG)/).
## Installation
`npm install @schukai/component-$(COMPONENT_SLUG)`, `yarn install @schukai/component-$(COMPONENT_SLUG)` or `pnpm install @schukai/component-$(COMPONENT_SLUG)`
## Usage
A simple example of the use of functionality from $(COMPONENT_NAME). We create a small file `index.mjs`.
The `m` in `.mjs` stands for module. In the example we want to make substitutions in a string.
```js
// example
```
To integrate this function into a website it is recommended to use a bundler like [esbuild](https://esbuild.github.io/).
```sh
esbuild index.mjs --outfile dist.js
```
We can now integrate that into our website.
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>$(COMPONENT_NAME)</title>
<script src="dist.js"></script>
</head>
<body>
```
Voila!
### Polyfill
We do try to work around some browser bugs, but on the whole we don't use polyfills and feature detection.
However, many functions can be mapped via [polyfill.io](https://polyfill.io/) and thus the compatibility can be increased.
```js
<script id="polyfill" src="https://polyfill.io/v3/polyfill.min.js?..."
crossorigin="anonymous"
referrerpolicy="no-referrer"></script>
```
## Questions
For questions and commercial support, please contact [schukai GmbH](https://www.schukai.com/).
The issue list of this repo is exclusively for bug reports and feature requests.
## Issues
Please make sure to read the Issue Reporting Checklist before opening an
issue. Issues not conforming to the guidelines may be closed immediately.
## License
$(COPYRIGHT_TEXT)
$(COPYRIGHT_URL)
You can also purchase a commercial license.
## Changelog
Detailed changes for each release are documented in
the [CHANGELOG](https://gitlab.schukai.com/oss/libraries/javascript/web-components/$(COMPONENT_SLUG)).
endef
#############################################################################################
#############################################################################################
##
## REQMAN
##
#############################################################################################
#############################################################################################
REQMAN_BIN ?= $(VENDOR_PATH)reqman
#############################################################################################
#############################################################################################
##
## AMAZON S3
##
#############################################################################################
#############################################################################################
# path and binaries
AWS ?= aws
EXECUTABLES = $(EXECUTABLES:-) $(AWS)
## Set AWS profile
AWS_PROFILE ?= schukai
#############################################################################################
#############################################################################################
##
## ADD SPDX LICENSES
##
## For commercial projects, it is not necessary to add the SPDX license identifier.
## The license header in each file is only for open-source projects, for example under
## the AGPL 3.0 license.
##
#############################################################################################
#############################################################################################
ifeq ($(ADDLICENSE_BIN),)
$(error "addlicense is not installed. Please check your makefile and include the licenses.mk")
endif
.PHONY: add-licenses
## Add license headers to all go files
add-licenses:
$(ECHOMARKER) "Add license headers to all sourche files"
ifeq ($(LICENSE_FILE_PATTERN),)
$(error "LICENSE_FILE_PATTERN is not set. Please check your makefile and include the licenses.mk")
endif
ifndef SPDX_LICENSE_ID
$(error "SPDX_LICENSE_ID is not defined. Please check your makefile and include the licenses.mk")
endif
$(QUIET) $(ADDLICENSE_BIN) -c "$(COPYRIGHT_OWNER)" -s -l "$(SPDX_LICENSE_ID)" $(LICENSE_FILE_PATTERN)
\ No newline at end of file
#############################################################################################
#############################################################################################
##
## SERVER BOB
##
#############################################################################################
#############################################################################################
ifeq ($(BOB_BIN),)
$(error $(ERRORMARKER) Bob is not defined, check your Makefile if bob.mk is included)
endif
ifndef BOB_BUILD_PATH
$(error $(ERRORMARKER) BOB_BUILD_PATH is not defined, check your Makefile if bob.mk is included)
endif
ifndef BOB_DIST_PATH
$(error $(ERRORMARKER) BOB_DIST_PATH is not defined, check your Makefile if bob.mk is included)
endif
ifndef SOURCE_PATH
$(error $(ERRORMARKER) SOURCE_PATH is not defined, check your Makefile if bob.mk is included)
endif
$(BOB_BIN):
$(QUIET) $(MKDIR) -p $(VENDOR_PATH)
$(QUIET) $(WGET) -O $(BOB_BIN) http://download.schukai.com/tools/bob/bob-$(shell uname -s | tr [:upper:] [:lower:])-$(shell echo `uname -m | sed s/aarch64/arm64/ | sed s/x86_64/amd64/`)
$(QUIET) $(CHMOD) u+x $(BOB_BIN)
.PHONY: sync-pages
## Sync structure of pages
sync-pages: $(BOB_BIN)
ifeq ($(BOB_SYNC_CONFIG),)
$(ECHOMARKER) "BOB_SYNC_CONFIG is not set, check your Makefile if the variable is set"
endif
$(ECHOMARKER) "Sync structure of pages"
$(QUIET) $(BOB_BIN) html sync --specification $(BOB_SYNC_CONFIG)
$(BOB_BUILD_PATH):
$(ECHOMARKER) "Create build directory for bob"
$(QUIET) $(MKDIR) -p $(BOB_BUILD_PATH)
$(BOB_DIST_PATH):
$(ECHOMARKER) "Create dist directory for bob"
$(QUIET) $(MKDIR) -p $(BOB_DIST_PATH)
.PHONY: generate-html
## Build the project
generate-html: $(BOB_BIN) $(BOB_BUILD_PATH) $(BOB_DIST_PATH)
$(ECHOMARKER) "Generate html"
$(QUIET) $(BOB_BIN) html generate --input $(BOB_BUILD_PATH) --output $(BOB_DIST_PATH)
.PHONY: prepare-template
## Prepare template
prepare-template: $(BOB_BIN) $(BOB_BUILD_PATH)
$(ECHOMARKER) "Generate templates"
$(QUIET) find $(SOURCE_PATH) -name "*.yaml" -exec $(BOB_BIN) template prepare --input $(SOURCE_PATH) --output $(BOB_BUILD_PATH) --data-file={} \;
#############################################################################################
#############################################################################################
##
## SERVER CADDY
##
#############################################################################################
#############################################################################################
CADDY_VENDOR_PATH ?= $(VENDOR_PATH)caddy/
CADDY_BIN ?= $(CADDY_VENDOR_PATH)caddy
CADDY_CONFIG ?= $(CADDY_VENDOR_PATH)caddy.conf
CADDY_PIDFILE ?= $(shell mktemp -d)/caddy.pid
$(CADDY_BIN):
$(QUIET) $(MKDIR) -p $(CADDY_VENDOR_PATH)
$(QUIET) $(WGET) -O $(CADDY_BIN) "https://caddyserver.com/api/download?os=linux&arch=amd64&idempotency=75143981108035"
$(QUIET) $(CHMOD) u+x $(CADDY_BIN)
.PHONY: run-caddy
## run caddy webserver
run-caddy: $(CADDY_BIN)
$(QUIET) $(CADDY_BIN) run -config $(CADDY_CONFIG) -pidfile $(CADDY_PIDFILE) -watch
#############################################################################################
#############################################################################################
##
## SERVER CONAN
##
#############################################################################################
#############################################################################################
ifeq ($(CONAN_BIN),)
$(error $(ERRORMARKER) Conan is not defined, check your Makefile if conan.mk is included)
endif
$(CONAN_BIN):
$(QUIET) $(MKDIR) -p $(VENDOR_PATH)
$(QUIET) $(WGET) -O $(CONAN_BIN) http://download.schukai.com/tools/conan/conan-$(shell uname -s | tr [:upper:] [:lower:])-$(shell echo `uname -m | sed s/aarch64/arm64/ | sed s/x86_64/amd64/`)
$(QUIET) $(CHMOD) u+x $(CONAN_BIN)
.PHONY: run-conan
## run conan webserver
run-conan: $(CONAN_BIN) $(CONAN_CONFIG)
$(QUIET) $(CONAN_BIN) server serve --config $(CONAN_CONFIG)