Skip to content
Snippets Groups Projects
Verified Commit e18a167c authored by Volker Schukai's avatar Volker Schukai :alien:
Browse files

chore: update makefiles

parent 7ea25cd0
No related branches found
No related tags found
No related merge requests found
Showing
with 172 additions and 118 deletions
......@@ -40,13 +40,20 @@ MAKEFILE_IMPORT_PATH?=$(PROJECT_ROOT)makefiles/
#############################################################################################
include $(MAKEFILE_IMPORT_PATH)directories-standard.mk
#include $(MAKEFILE_IMPORT_PATH)directories-go-lib.mk
#include $(MAKEFILE_IMPORT_PATH)directories-go-utilities.mk
#include $(MAKEFILE_IMPORT_PATH)directories-platform-part.mk
include $(MAKEFILE_IMPORT_PATH)jsdoc.mk
include $(MAKEFILE_IMPORT_PATH)output.mk
include $(MAKEFILE_IMPORT_PATH)placeholder.mk
include $(MAKEFILE_IMPORT_PATH)conan.mk
#include $(MAKEFILE_IMPORT_PATH)bob.mk
include $(MAKEFILE_IMPORT_PATH)s3.mk
#include $(MAKEFILE_IMPORT_PATH)readme-standard.mk
include $(MAKEFILE_IMPORT_PATH)readme-webcomponents.mk
#include $(MAKEFILE_IMPORT_PATH)readme-go-utilities.mk
#include $(MAKEFILE_IMPORT_PATH)readme-go-lib.mk
#include $(MAKEFILE_IMPORT_PATH)readme-platform-part.mk
include $(MAKEFILE_IMPORT_PATH)licenses.mk
include $(MAKEFILE_IMPORT_PATH)license-agpl3.mk
#include $(MAKEFILE_IMPORT_PATH)license-unlicensed.mk
......@@ -70,18 +77,28 @@ include $(MAKEFILE_IMPORT_PATH)target-jsdoc-build.mk
#include $(MAKEFILE_IMPORT_PATH)target-docman.mk
#include $(MAKEFILE_IMPORT_PATH)target-caddy.mk
include $(MAKEFILE_IMPORT_PATH)target-conan.mk
#include $(MAKEFILE_IMPORT_PATH)target-bob.mk
#include $(MAKEFILE_IMPORT_PATH)target-phpunit.mk
#include $(MAKEFILE_IMPORT_PATH)target-jekyll.mk
include $(MAKEFILE_IMPORT_PATH)target-update-makefiles.mk
include $(MAKEFILE_IMPORT_PATH)target-help.mk
#include $(MAKEFILE_IMPORT_PATH)target-go-build.mk
include $(MAKEFILE_IMPORT_PATH)target-node-build.mk
include $(MAKEFILE_IMPORT_PATH)target-node-test.mk
include $(MAKEFILE_IMPORT_PATH)target-npm-publish.mk
#include $(MAKEFILE_IMPORT_PATH)target-npm.mk
include $(MAKEFILE_IMPORT_PATH)target-git.mk
#include $(MAKEFILE_IMPORT_PATH)target-init-standard.mk
#include $(MAKEFILE_IMPORT_PATH)target-init-webcomponent.mk
#include $(MAKEFILE_IMPORT_PATH)target-init-go-utilities.mk
#include $(MAKEFILE_IMPORT_PATH)target-init-go-lib.mk
#include $(MAKEFILE_IMPORT_PATH)target-init-platform-part.mk
include $(MAKEFILE_IMPORT_PATH)target-version.mk
include $(MAKEFILE_IMPORT_PATH)target-variable.mk
include $(MAKEFILE_IMPORT_PATH)terminal-check.mk
#############################################################################################
# include target-project.mk only if it exists
-include $(MAKEFILE_IMPORT_PATH)target-project.mk
......@@ -17,8 +17,10 @@ endif
ifeq ($(GIT_CHGLOG_BIN),)
$(shell $(GO) install github.com/git-chglog/git-chglog/cmd/git-chglog@latest)
GIT_CHGLOG_BIN := $(shell command -v git-chglog 2> /dev/null)
endif
ifneq ($(shell test -d $(GIT_CHGLOG_CONFIG_DIR) && echo -n yes),yes)
$(shell mkdir -p $(GIT_CHGLOG_CONFIG_DIR))
endif
......@@ -95,7 +97,7 @@ endef
export GIT_CHGLOG_CONFIG_FILE
$(GIT_CHGLOG_CONFIG_DIR)/config.yml:
$(QUITE) $(ECHO) "$$GIT_CHGLOG_CONFIG_FILE" >> $@
$(QUIET) $(ECHO) "$$GIT_CHGLOG_CONFIG_FILE" >> $@
define GIT_CHGLOG_CONFIG_TEMPLATE
{{ range .Versions }}
......@@ -131,7 +133,7 @@ export GIT_CHGLOG_CONFIG_TEMPLATE
$(GIT_CHGLOG_CONFIG_DIR)/CHANGELOG.tpl.md:
$(QUITE) $(ECHO) "$$GIT_CHGLOG_CONFIG_TEMPLATE" >> $@
$(QUIET) $(ECHO) "$$GIT_CHGLOG_CONFIG_TEMPLATE" >> $@
## location of CHANGELOG.md file
CHANGELOG_FILE ?= $(PROJECT_ROOT)CHANGELOG.md
......
......@@ -47,5 +47,5 @@ endef
export CONANEXAMPLECONF
$(CONAN_CONFIG):
$(QUITE) $(ECHO) "$$CONANEXAMPLECONF" >> $@
$(QUIET) $(ECHO) "$$CONANEXAMPLECONF" >> $@
......@@ -26,7 +26,8 @@ SCRIPTS_PATH ?= $(DEVELOPMENT_PATH)script/
DEVELOPMENT_SCRIPTS_PATH ?= $(DEVELOPMENT_PATH)script/
BUILD_PATH ?= $(DEPLOYMENT_PATH)build/
VENDOR_PATH ?= $(DEPLOYMENT_PATH)vendor/
TEST_PATH ?= $(DEVELOPMENT_PATH)test/
ALVINE_VENDOR_PATH ?= $(VENDOR_PATH)alvine/
TEST_PATH ?= $(DEVELOPMENT_PATH)tests/
DEPLOYMENT_SCRIPTS_PATH ?= $(DEPLOYMENT_PATH)script/
LICENSE_PATH ?= $(PROJECT_ROOT)
......@@ -38,6 +39,8 @@ PROJECT_DIRECTORIES := $(PROJECT_DIRECTORIES) \
$(WEB_PATH) \
$(DEPLOYMENT_PATH) \
$(VENDOR_PATH) \
$(ALVINE_VENDOR_PATH) \
$(TEST_PATH) \
$(DEVELOPMENT_PATH) \
$(DEVELOPMENT_SCRIPTS_PATH) \
$(DEPLOYMENT_SCRIPTS_PATH) \
......
......@@ -523,8 +523,8 @@ tags
endef
export GITIGNOREDS
.gitignore:
$(QUITE) $(ECHO) "$$GITIGNOREDS" >> $@
$(PROJECT_ROOT).gitignore:
$(QUIET) $(ECHO) "$$GITIGNOREDS" >> $@
......@@ -14,3 +14,14 @@ EXECUTABLES = $(EXECUTABLES:-) $(GO);
ifeq ($(shell command -v $(GO) 2> /dev/null),)
$(error "go is not installed. Please install go <https://go.dev/doc/install>")
endif
GOPATH=$(shell go env GOPATH)
ifeq ($(GOPATH),)
DIRS := bin pkg src
GOPATH=$(DEPLOYMENT_PATH)/go/
$(shell mkdir -p $(GOPATH))
$(shell $(foreach entry,$(DIRS),mkdir -p "$(GOPATH)$(entry)";))
export PATH=$(PATH):$(GOPATH)/bin
endif
......@@ -112,4 +112,4 @@ endef
export JSDOCJSON
$(DEPLOYMENT_PATH)jsdoc.json:
$(QUITE) $(ECHO) "$$JSDOCJSON" >> $@
\ No newline at end of file
$(QUIET) $(ECHO) "$$JSDOCJSON" >> $@
\ No newline at end of file
......@@ -21,49 +21,32 @@ COPYRIGHT_OWNER ?= schukai GmbH
COPYRIGHT_URL ?= [LICENSE](https://www.schukai.com/)
define LICENSE_FILE_CONTENT
# End User Licence Agreement (EULA)
The schukai Enterprise License (the "Enterprise License").
Copyright © 2022 schukai GmbH.
This End User Licence Agreement ("EULA") is a legal agreement between you and schukai GmbH.
Regarding this Software, schukai GmbH is the licensor and you are the licensee.
This EULA governs your purchase and use of our software ("Software") directly from schukai GmbH or indirectly through a reseller or distributor authorized by schukai GmbH (a "Reseller").
By using the Software, you agree to all the terms and conditions set forth below.
Please read this EULA carefully before completing the installation process and using the software. It contains a licence to use the software, as well as warranty information and disclaimers.
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.
If you register for a free trial version of the software, this EULA also applies to that trial version. By clicking "Accept" or installing and/or using the software, you acknowledge that you accept the Software and agree to be bound by the terms of this EULA.
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.
If you are entering into this EULA on behalf of a company or other legal entity, you represent that you have the authority to bind that company and its affiliates to these terms. If you do not have such authority or do not agree to the terms of this EULA, you may not install or use the Software and you are not required to accept this EULA.
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.
This EULA applies only to the Software supplied by schukai GmbH herewith, whether other software is referred to or described herein. The Terms also apply to all updates, supplements, internet-based services and support services provided by schukai GmbH for the Software, unless different terms and conditions are attached to those items at the time of delivery. Where this is the case, these Terms shall apply.
## Grant of Licence
schukai GmbH hereby grants you a personal, non-transferable, non-exclusive licence to use the software on your Devices in accordance with the terms of this EULA.
You are authorized to download the software onto a device (e.g. PC, laptop, mobile phone or tablet) that is under your control. You are responsible for ensuring that your device meets the minimum requirements of the software.
**In addition, you are not permitted to:**
* Edit, alter, modify, adapt, translate or otherwise change the Software in whole or in part, nor allow the Software to be combined with or incorporated into other software in whole or in part, nor decompile, disassemble or reverse engineer the Software or attempt to do any such things reproduce, copy, distribute, resell or otherwise use the Software for commercial purposes
* Allow any third party to use the Software on behalf of or for any third party
* Use the Software in a manner that violates any applicable local, national or international law use the Software for any purpose that, in the opinion of schukai GmbH, constitutes a breach of this EULA.
## Intellectual Property and Proprietary Rights
schukai GmbH shall at all times retain ownership of the Software originally downloaded by you and of any subsequent downloads of the Software by you.
The Software (and the copyright and other intellectual property rights of any kind in the Software, including any modifications made thereto) are and shall remain the property of schukai GmbH.
schukai GmbH reserves the right to license the use of the Software to third parties.
## Termination
This EULA is effective from the date you first use the Software and shall remain in effect until terminated. You may terminate it at any time by giving written notice to schukai GmbH.
It will also terminate immediately if you fail to comply with any of the terms of this EULA. Upon such termination, the licences granted by this EULA shall immediately terminate, and you agree to cease all access to and use of the Software. The provisions that by their nature continue and survive shall survive any termination of this EULA.
## Governing Law
This EULA and any dispute arising out of or in connection with this EULA shall be governed by and construed in accordance with the laws of Germany.
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
......
......@@ -2,46 +2,3 @@
.PHONY: create-polyfill-monster
## create polyfill.io url
create-polyfill-monster: $(MONSTER_SOURCE_FILES)
$(ECHOMARKER) "create and replace polyfill"
$(QUIET) $(DEVELOPMENT_SCRIPTS_PATH)create-polyfill.sh $(MJS_RELATIVE_SOURCE_FILES)
.PHONY: test-browser-monster
## create test-browser-monster
test-browser-monster: create-polyfill-monster
$(ECHOMARKER) "create browser test and start chrome"
$(QUIET) $(FIND) $(TEST_PATH)cases -type f | $(SED) "s|^$(TEST_PATH)cases||" > $(TEST_PATH)web/import.js
$(QUIET) $(SED) -i 's|^|import "../cases|' $(TEST_PATH)web/import.js
$(QUIET) $(SED) -i 's|$$|";|' $(TEST_PATH)web/import.js
$(QUIET) $(SED) -i "1 i import \"./prepare.js\";" $(TEST_PATH)web/import.js
$(QUIET) $(SED) -i "1 i /** this file was created automatically by the make target test-browser-monster */" $(TEST_PATH)web/import.js
$(ESBUILD) --platform=browser --sourcemap=inline --external:ws --external:jsdom --external:process --external:crypto --bundle $(TEST_PATH)web/import.js --outfile=$(TEST_PATH)web/tests.js
# $(QUIET) $(CD) $(MONSTER_BUILD_TEST_BROWSER_DIR); $(WEBPACK) ; $(CD) -
# $(QUIET) $(SED) -i -E "/<h1/s_.*_ <h1 style='margin-bottom: 0.1em;'>Monster $(PROJECT_VERSION)</h1>_" $(TEST_PATH)web/test.html $(TEST_PATH)web/monster.html $(TEST_PATH)web/monster-dev.html
# $(QUIET) $(SED) -i -E "/id=\"lastupdate\"/s_.*_ <div id=\"lastupdate\" style='font-size:0.7em'>last update $(shell date)</div>_" $(TEST_PATH)web/test.html $(TEST_PATH)web/monster.html $(TEST_PATH)web/monster-dev.html
# $(QUIET) $(SED) -i -E "s_src=\"([\"]*)\.js.*\"_src=\"\1.js?r=$(shell date +"%T")\"_" $(TEST_PATH)web/test.html $(TEST_PATH)web/monster.html $(TEST_PATH)web/monster-dev.html
# $(QUIET) $(SED) -i -E "s_dist/([0-9]+\.[0-9]+\.[0-9]+)*/dist/monster_dist/$(PROJECT_VERSION)/dist/monster_" $(TEST_PATH)web/monster.html $(TEST_PATH)web/monster-dev.html
# #$(QUIET) if $(OPENBROWSER) ; then google-chrome --profile-directory="Default" $(TEST_PATH)web/test.html ; fi
## -> eigenes repos für monsterjs.org
#.PHONY: web-to-s3
### transfer web to s3
#web-to-s3:
# $(ECHOMARKER) "transfer web to s3"
# $(QUIET) $(AWS) s3 --recursive --only-show-errors cp $(DEPLOYMENT_PATH)web/assets/ s3://monsterjs.org/assets/
# $(QUIET) $(AWS) s3 --recursive --only-show-errors cp $(DEPLOYMENT_PATH)web/vendor/ s3://monsterjs.org/vendor/
# $(QUIET) $(AWS) s3 --only-show-errors cp $(DEPLOYMENT_PATH)web/index.html s3://monsterjs.org/index.html
# $(QUIET) $(AWS) s3 --only-show-errors cp $(DEPLOYMENT_PATH)web/error.html s3://monsterjs.org/error.html
.PHONY: doc-to-s3
## transfer doc to s3
doc-to-s3: jsdoc-build
$(ECHOMARKER) "transfer doc to s3"
$(QUIET) $(AWS) s3 --recursive --only-show-errors cp $(BUILD_PATH)docs s3://monsterjs.org/en/doc/monster/
......@@ -26,23 +26,15 @@ To check out docs and examples, visit [monsterjs.org/en/doc/$(COMPONENT_SLUG)/](
## Installation
`npm install @schukai/$(COMPONENT_SLUG)`, `yarn install @schukai/$(COMPONENT_SLUG)` or `pnpm install @schukai/$(COMPONENT_SLUG)`
`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 Monster. We create a small file `index.mjs`.
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
const button = document.createElement('monster-button');
button.setOption('labels.button', 'click me');
button.setOption('actions.click', (e) => {
document.getElementById('example-result').innerText = "clicked!";
setTimeout(() => {
document.getElementById('example-result').innerText = "";
}, 2000)
})
// example
```
To integrate this function into a website it is recommended to use a bundler like [esbuild](https://esbuild.github.io/).
......@@ -58,7 +50,7 @@ We can now integrate that into our website.
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Monster</title>
<title>$(COMPONENT_NAME)</title>
<script src="dist.js"></script>
</head>
<body>
......
......@@ -11,11 +11,17 @@ ifeq ($(GO),)
endif
GO_MOD_FILE := $(SOURCE_PATH)go.mod
GO_LICENSES_BIN := $(shell command -v go-licenses)
ifeq ($(GO_LICENSES_BIN),)
$(shell $(GO) install github.com/google/go-licenses@latest)
GO_LICENSES_BIN := $(shell command -v go-licenses 2> /dev/null)
EXECUTABLES = $(EXECUTABLES:-) go-licenses;
endif
ifeq ($(shell test -e $(GO_MOD_FILE) && echo -n yes),yes)
GO_CURRENT_MODULE := $(shell cat $(GO_MOD_FILE) | head -n1 | cut -d" " -f2)
# go install github.com/google/go-licenses@latest
EXECUTABLES = $(EXECUTABLES:-) go-licenses;
endif
.PHONY: go-fetch-licenses
......
......@@ -18,7 +18,7 @@ $(PROJECT_DIRECTORIES):
$(shell $(MKDIR) -p $(path)))
## init standard project
init-standard: $(PROJECT_DIRECTORIES) .gitignore $(PROJECT_ROOT)README.md $(LICENSE_PATH)LICENSE
init-standard: $(PROJECT_DIRECTORIES) $(PROJECT_ROOT).gitignore $(PROJECT_ROOT)README.md $(LICENSE_PATH)LICENSE
$(ECHOMARKER) "Run init-standard"
$(ECHO) "Done"
......@@ -32,7 +32,7 @@ init-standard: $(PROJECT_DIRECTORIES) .gitignore $(PROJECT_ROOT)README.md $(LIC
export LICENSE_FILE_CONTENT
$(LICENSE_PATH)LICENSE:
$(QUITE) $(ECHO) "$$LICENSE_FILE_CONTENT" >> $@
$(QUIET) $(ECHO) "$$LICENSE_FILE_CONTENT" >> $@
#############################################################################################
#############################################################################################
......@@ -44,6 +44,6 @@ $(LICENSE_PATH)LICENSE:
export README_FILE_CONTENT
$(PROJECT_ROOT)README.md:
$(QUITE) $(ECHO) "$$README_FILE_CONTENT" >> $@
$(QUIET) $(ECHO) "$$README_FILE_CONTENT" >> $@
......@@ -18,7 +18,7 @@ $(PROJECT_DIRECTORIES):
$(shell $(MKDIR) -p $(path)))
## init standard project
init-webcomponent: $(PROJECT_DIRECTORIES) .gitignore $(DEVELOPMENT_PATH)package.json $(APPLICATION_PATH)package.json $(PROJECT_ROOT)README.md $(LICENSE_PATH)LICENSE $(APPLICATION_PATH)LICENSE
init-webcomponent: $(PROJECT_DIRECTORIES) $(PROJECT_ROOT).gitignore $(DEVELOPMENT_PATH)package.json $(APPLICATION_PATH)package.json $(PROJECT_ROOT)README.md $(LICENSE_PATH)LICENSE $(APPLICATION_PATH)LICENSE
$(ECHOMARKER) "Run init-webcomponent"
$(ECHO) "Done"
......@@ -32,11 +32,11 @@ init-webcomponent: $(PROJECT_DIRECTORIES) .gitignore $(DEVELOPMENT_PATH)package.
export LICENSE_FILE_CONTENT
$(LICENSE_PATH)LICENSE:
$(QUITE) $(ECHO) "$$LICENSE_FILE_CONTENT" >> $@
$(QUIET) $(ECHO) "$$LICENSE_FILE_CONTENT" >> $@
export LICENSE_AGPL_FILE_CONTENT
$(APPLICATION_PATH)LICENSE:
$(QUITE) $(ECHO) "$$LICENSE_AGPL_FILE_CONTENT" >> $@
$(QUIET) $(ECHO) "$$LICENSE_AGPL_FILE_CONTENT" >> $@
#############################################################################################
#############################################################################################
......@@ -48,7 +48,7 @@ $(APPLICATION_PATH)LICENSE:
export README_FILE_CONTENT
$(PROJECT_ROOT)README.md:
$(QUITE) $(ECHO) "$$README_FILE_CONTENT" >> $@
$(QUIET) $(ECHO) "$$README_FILE_CONTENT" >> $@
#############################################################################################
......@@ -101,7 +101,7 @@ endef
export WEBCOMPONENTS_PACKAGE_CONTENT
$(APPLICATION_PATH)package.json:
$(QUITE) $(ECHO) "$$WEBCOMPONENTS_PACKAGE_CONTENT" >> $@
$(QUIET) $(ECHO) "$$WEBCOMPONENTS_PACKAGE_CONTENT" >> $@
#############################################################################################
#############################################################################################
......@@ -162,6 +162,6 @@ endef
export WEBCOMPONENTS_BUILD_PACKAGE_CONTENT
$(DEVELOPMENT_PATH)package.json:
$(QUITE) $(ECHO) "$$WEBCOMPONENTS_BUILD_PACKAGE_CONTENT" >> $@
$(QUIET) $(ECHO) "$$WEBCOMPONENTS_BUILD_PACKAGE_CONTENT" >> $@
######
#############################################################################################
#############################################################################################
##
## JEKYLL-TARGETS
##
#############################################################################################
#############################################################################################
JEKYLL_VERSION := snapshot
JEKYLL_BIN := $(ALVINE_VENDOR_PATH)jekyll-$(JEKYLL_VERSION).phar
JEKYLL_PUBKEY := $(JEKYLL_BIN).pubkey
$(JEKYLL_PUBKEY):
$(MKDIR) -p $(ALVINE_VENDOR_PATH)
$(WGET) -O $(JEKYLL_PUBKEY) http://download.alvine.io/phar/jekyll-$(JEKYLL_VERSION).phar.pubkey
$(JEKYLL_BIN): $(JEKYLL_PUBKEY)
$(MKDIR) -p $(ALVINE_VENDOR_PATH)
$(WGET) -O $(JEKYLL_BIN) http://download.alvine.io/phar/jekyll-$(JEKYLL_VERSION).phar
$(CHMOD) u+x $(JEKYLL_BIN)
.PHONY: run-jekyll
## run jekyll
run-jekyll: init $(JEKYLL_BIN) $(JEKYLL_PUBKEY) $(TEMP_PATH)jekyll.lock
$(ECHOMARKER) "Jekyll finished"
.PHONY: run-jekyll-force
## run jekyll (-f)
run-jekyll-force: init $(JEKYLL_BIN) $(JEKYLL_PUBKEY)
$(RM) $(TEMP_PATH)jekyll.lock
$(MAKE) run-jekyll
$(ECHOMARKER) "Jekyll finished"
$(TEMP_PATH)jekyll.lock: $(THIS_DIR).jekyll
$(ECHOMARKER) "Run Jekyll"
$(JEKYLL_BIN) fetch --force
$(JEKYLL_BIN) update
touch $(TEMP_PATH)jekyll.lock
\ No newline at end of file
......@@ -19,5 +19,6 @@ node-build: $(NODE_MODULES_MODIFIED) $(NODE_PACKAGES)
$(QUIET) $(JQ) '.version = "$(PROJECT_VERSION)"' $(PACKAGE_JSON) | $(SPONGE) $(PACKAGE_JSON)
$(QUIET) for p in $(NODE_PACKAGES); do $(JQ) '.version = "$(PROJECT_VERSION)"' $${p} | $(SPONGE) $${p}; done
$(QUIET) $(SCRIPTS_PATH)update-version.sh
$(QUIET) $(NPM) --prefix $(NODE_ROOT_DIR) run --if-present build
.PHONY: create-polyfill-monster
## create polyfill.io url
create-polyfill-monster: $(MONSTER_SOURCE_FILES)
$(ECHOMARKER) "create and replace polyfill"
$(QUIET) $(DEVELOPMENT_SCRIPTS_PATH)create-polyfill.sh $(MJS_RELATIVE_SOURCE_FILES)
.PHONY: test-browser-monster
## create test-browser-monster
test-browser-monster: create-polyfill-monster
$(ECHOMARKER) "create browser test and start chrome"
$(QUIET) $(FIND) $(TEST_PATH)cases -type f | $(SED) "s|^$(TEST_PATH)cases||" > $(TEST_PATH)web/import.js
$(QUIET) $(SED) -i 's|^|import "../cases|' $(TEST_PATH)web/import.js
$(QUIET) $(SED) -i 's|$$|";|' $(TEST_PATH)web/import.js
$(QUIET) $(SED) -i "1 i import \"./prepare.js\";" $(TEST_PATH)web/import.js
$(QUIET) $(SED) -i "1 i /** this file was created automatically by the make target test-browser-monster */" $(TEST_PATH)web/import.js
$(ESBUILD) --platform=browser --sourcemap=inline --external:ws --external:jsdom --external:process --external:crypto --bundle $(TEST_PATH)web/import.js --outfile=$(TEST_PATH)web/tests.js
# $(QUIET) $(CD) $(MONSTER_BUILD_TEST_BROWSER_DIR); $(WEBPACK) ; $(CD) -
# $(QUIET) $(SED) -i -E "/<h1/s_.*_ <h1 style='margin-bottom: 0.1em;'>Monster $(PROJECT_VERSION)</h1>_" $(TEST_PATH)web/test.html $(TEST_PATH)web/monster.html $(TEST_PATH)web/monster-dev.html
# $(QUIET) $(SED) -i -E "/id=\"lastupdate\"/s_.*_ <div id=\"lastupdate\" style='font-size:0.7em'>last update $(shell date)</div>_" $(TEST_PATH)web/test.html $(TEST_PATH)web/monster.html $(TEST_PATH)web/monster-dev.html
# $(QUIET) $(SED) -i -E "s_src=\"([\"]*)\.js.*\"_src=\"\1.js?r=$(shell date +"%T")\"_" $(TEST_PATH)web/test.html $(TEST_PATH)web/monster.html $(TEST_PATH)web/monster-dev.html
# $(QUIET) $(SED) -i -E "s_dist/([0-9]+\.[0-9]+\.[0-9]+)*/dist/monster_dist/$(PROJECT_VERSION)/dist/monster_" $(TEST_PATH)web/monster.html $(TEST_PATH)web/monster-dev.html
# #$(QUIET) if $(OPENBROWSER) ; then google-chrome --profile-directory="Default" $(TEST_PATH)web/test.html ; fi
## -> eigenes repos für monsterjs.org
#.PHONY: web-to-s3
### transfer web to s3
#web-to-s3:
# $(ECHOMARKER) "transfer web to s3"
# $(QUIET) $(AWS) s3 --recursive --only-show-errors cp $(DEPLOYMENT_PATH)web/assets/ s3://monsterjs.org/assets/
# $(QUIET) $(AWS) s3 --recursive --only-show-errors cp $(DEPLOYMENT_PATH)web/vendor/ s3://monsterjs.org/vendor/
# $(QUIET) $(AWS) s3 --only-show-errors cp $(DEPLOYMENT_PATH)web/index.html s3://monsterjs.org/index.html
# $(QUIET) $(AWS) s3 --only-show-errors cp $(DEPLOYMENT_PATH)web/error.html s3://monsterjs.org/error.html
.PHONY: doc-to-s3
## transfer doc to s3
doc-to-s3: jsdoc-build
$(ECHOMARKER) "transfer doc to s3"
$(QUIET) $(AWS) s3 --recursive --only-show-errors cp $(BUILD_PATH)docs s3://monsterjs.org/en/doc/monster/
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment