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
Select Git revision
Loading items

Target

Select target project
  • oss/libraries/javascript/monster
1 result
Select Git revision
Loading items
Show changes
Commits on Source (63)
Showing
with 4098 additions and 70 deletions
{}
\ No newline at end of file
{
}
......@@ -2,6 +2,8 @@
.*/playground
.*/node_modules
.*/node_modules/
/node_modules/
[include]
......
image: node:latest
image: node:16
cache:
paths:
......@@ -12,7 +11,7 @@ stages:
test:
stage: test
script:
- apt update && apt install -y jq gawk
- apt-get update && apt-get install -y jq gawk plantuml
- make test
......
## References
<!--
Every merge request needs at least one reference!
Mention the ticket, include links to
further information, processes, etc.
-->
- (no link inserted yet)
## Author's checklist (required)
- [ ] **In the "References" section above**, link to at least one issue, ticket or process.
- [ ] Confirm that your merge request contains an appropriate test case.
- [ ] Confirm that you have followed the [Code Style Guide](https://about.schukai.com/de/intern/handbuch/referenzen/best-practices-code-styleguide/).
- [ ] Confirm that you have documented the change.
- [ ] Confirm that you have followed the [Documentation Style Guide](https://about.schukai.com/de/intern/handbuch/leitfaden/uebersicht/).
## Checklist for the reviewer (if possible)
- [ ] Confirm that the merge request meets the requirements of the linked issues.
- [ ] Confirm that the merge request contains appropriate test cases.
- [ ] Code analysis has been performed.
- [ ] Set the merge request to approved.
## Release Manager Checklist (required)
- [ ] Assign this merge request to a milestone.
- [ ] Record the changes in the changelog (changelog.md).
<!-- Commands -->
/label ~release
......@@ -11,6 +11,7 @@
<option name="recentlyUsedRegions">
<list>
<option value="eu-west-1" />
<option value="eu-central-1" />
</list>
</option>
</component>
......
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="fastRequestCollection">
<option name="detail">
<CollectionDetail>
<option name="childList">
<list>
<CollectionDetail>
<option name="groupId" value="1" />
<option name="id" value="1" />
<option name="name" value="Default Group" />
<option name="type" value="1" />
</CollectionDetail>
</list>
</option>
<option name="groupId" value="-1" />
<option name="id" value="0" />
<option name="name" value="Root" />
<option name="type" value="1" />
</CollectionDetail>
</option>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GitToolBoxProjectSettings">
<option name="commitMessageIssueKeyValidationOverride">
<BoolValueOverride>
<option name="enabled" value="true" />
</BoolValueOverride>
</option>
<option name="commitMessageValidationConfigOverride">
<CommitMessageValidationOverride>
<option name="enabled" value="true" />
</CommitMessageValidationOverride>
</option>
</component>
</project>
\ No newline at end of file
......@@ -32,6 +32,7 @@
<TableSortColumn index="3" isIncluded="false" isDescending="false" isNumeric="false" isNumericLast="false" headerText="description" />
</columns>
<usedInFiles>
<option name="03-dom.md" />
<option name="README.md" />
</usedInFiles>
</TableSortHistoryEntry>
......
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="MarkdownSettings">
<enabledExtensions>
<entry key="MermaidLanguageExtension" value="false" />
<entry key="PlantUMLLanguageExtension" value="true" />
</enabledExtensions>
</component>
</project>
\ No newline at end of file
......@@ -2,10 +2,12 @@
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/../../../../alvine/frontend/alvine.frontend.framework/alvine.frontend.alvine.alvine-frontend-framework.iml" filepath="$PROJECT_DIR$/../../../../alvine/frontend/alvine.frontend.framework/alvine.frontend.alvine.alvine-frontend-framework.iml" />
<module fileurl="file://$PROJECT_DIR$/../../../../alvine/frontend/console/alvine.console/alvine.console.iml" filepath="$PROJECT_DIR$/../../../../alvine/frontend/console/alvine.console/alvine.console.iml" />
<module fileurl="file://$PROJECT_DIR$/../web-components/form/form.iml" filepath="$PROJECT_DIR$/../web-components/form/form.iml" />
<module fileurl="file://$PROJECT_DIR$/monster.iml" filepath="$PROJECT_DIR$/monster.iml" />
<module fileurl="file://$PROJECT_DIR$/../web-components/multiselect/web-components.multiselect.iml" filepath="$PROJECT_DIR$/../web-components/multiselect/web-components.multiselect.iml" />
<module fileurl="file://$PROJECT_DIR$/../web-components/notify/notify.iml" filepath="$PROJECT_DIR$/../web-components/notify/notify.iml" />
<module fileurl="file://$PROJECT_DIR$/../web-components/template/template.iml" filepath="$PROJECT_DIR$/../web-components/template/template.iml" />
<module fileurl="file://$PROJECT_DIR$/../web-components/treemenu/treemenu.iml" filepath="$PROJECT_DIR$/../web-components/treemenu/treemenu.iml" />
</modules>
</component>
</project>
\ No newline at end of file
......@@ -38,7 +38,7 @@ COMMENT := $(YELLOW)
# Output control and standard outputs
MARKER := $(BLUE)[+]$(RESET)
ERRORMARKER := $(RED)[-]$(RESET)
## Deactivate the quite mode by overwriting the value with space
## Deactivate the QUIET mode by overwriting the value with space
ifndef DEBUG
QUIET = @
......@@ -82,9 +82,13 @@ AWS := aws
XARGS := xargs
GREP := grep
NPM := npm
make := make
GIT := git
NPX := npx
NODE := node
# Executable Programs the Installed be have to
EXECUTABLES = $(AWK) $(CP) $(KILL) $(M4) $(MV) rm mkdir $(SED) $(SORT) $(TOUCH) $(WGET) $(CHMOD) $(NPX) $(FIND) $(XARGS) $(GREP) $(NPM)
EXECUTABLES = $(AWK) $(CP) $(KILL) $(M4) $(MV) rm mkdir $(SED) $(SORT) $(TOUCH) $(WGET) $(CHMOD) $(NPX) $(FIND) $(XARGS) $(GREP) $(NPM) $(GIT) $(NPX);
K := $(foreach exec,$(EXECUTABLES),\
$(if $(shell which $(exec)),some string,$(error "Missing $(exec) in PATH; please install")))
......@@ -131,7 +135,8 @@ help:
} \
{ lastLine = $$0 }' $(MAKEFILE_LIST)
@printf "\n${COMMENT}Available arguments:${RESET}\n"
@printf "\n ${INFO}DONTOPENBROWSER${RESET} disable open chrome\n"
@printf "\n ${INFO}DONTOPENBROWSER${RESET} disable open chrome"
@printf "\n ${INFO}NEXTVERSION${RESET} see target release => 0 – major, 1 – minor (default), 2 – patch\n"
@awk '/^(([a-zA-Z\-_0-9\.@]+)\s=)/ { \
helpMessage = match(lastLine, /^## (.*)/); \
if (helpMessage) { \
......@@ -155,9 +160,7 @@ variables:
#############################################################################################
#############################################################################################
SOURCE_PATH := $(THIS_DIR)source/
DIST_PATH := $(THIS_DIR)dist/
TEST_PATH := $(THIS_DIR)test
SCRIPT_PATH := $(THIS_DIR)scripts/
#############################################################################################
#############################################################################################
......@@ -181,10 +184,10 @@ ifeq (, $(shell command -v uuidgen))
$(error "No uuidgen in PATH, consider doing apt-get install uuidgen")
endif
@(QUITE) export BRANCH="MONSTER/$(TAG)/$(shell uuidgen --random)" ; \
git checkout -b $${BRANCH} && \
RESULT=$$(git push origin $$BRANCH 2>&1) && \
RESULT2=$$(git branch --set-upstream-to=origin/$$BRANCH $$BRANCH) && \
$(QUIET) export BRANCH="MONSTER/$(TAG)/$(shell uuidgen --random)" ; \
$(GIT) checkout -b $${BRANCH} && \
RESULT=$$($(GIT) push origin $$BRANCH 2>&1) && \
RESULT2=$$($(GIT) branch --set-upstream-to=origin/$$BRANCH $$BRANCH) && \
GITLABURL=$$(echo "$$RESULT" | tr '\n' '\#' | grep -o 'remote\:\s*https:\/\/gitlab\.schukai\.com[^ ]*' | cut -d " " -f2-9 | sed -e 's/^[ \t]*//') && \
if $(OPENBROWSER) ; then google-chrome --profile-directory="Default" $$GITLABURL ; fi
......@@ -192,20 +195,25 @@ endif
.PHONY: git-to-master
## git checkout master, fetch and merge
git-to-master:
git checkout master && git fetch -pP && git merge
$(GIT) checkout master && $(GIT) fetch -pP && $(GIT) merge
.PHONY: git-push-to-server
## git push changes to server
git-push-to-server:
git add -A
git commit -m"$(MESSAGE)"
git push
$(GIT) add -A
$(GIT) commit -m"$(MESSAGE)"
$(GIT) push
.PHONY: git-push
## git create branch and push changes to server
git-push: git-branch git-push-to-server
.PHONY: git-tag
## git create version tag
git-tag:
$(GIT) tag -a "$(MONSTER_CORE_VERSION)" -m "release $(MONSTER_CORE_VERSION)"
#############################################################################################
#############################################################################################
##
......@@ -217,18 +225,19 @@ git-push: git-branch git-push-to-server
NODE_MODULES_DIR := $(THIS_DIR)node_modules/
NODE_MODULES_BIN_DIR := $(NODE_MODULES_DIR).bin/
BROWSERIFY := $(NODE_MODULES_BIN_DIR)browserify
WEBPACK := $(NODE_MODULES_BIN_DIR)webpack
BABEL := $(NODE_MODULES_BIN_DIR)babel
EXORCIST := $(NODE_MODULES_BIN_DIR)exorcist
UGLIFYJS := $(NODE_MODULES_BIN_DIR)uglifyjs
C8 := $(NODE_MODULES_BIN_DIR)c8
MOCHA := $(NODE_MODULES_BIN_DIR)mocha
NYC := $(NODE_MODULES_BIN_DIR)nyc
JSDOC := $(NODE_MODULES_BIN_DIR)jsdoc
$(NODE_MODULES_DIR): $(THIS_DIR)package.json
$(QUIET) $(NPM) install
$(QUIET) $(NODE) $(THIS_DIR)node_modules/jsdoc-plantuml/fixBrokenNodeJS.js
$(QUIET) $(RM) node_modules/.modified
$(QUIET) $(TOUCH) -m node_modules/.modified
#############################################################################################
## UNTILITIES ###############################################################################
......@@ -261,13 +270,17 @@ MONSTER_DIR := $(THIS_DIR)packages/monster$(SUBPA
MONSTER_TUTORIAL_DIR := $(THIS_DIR)tutorials/
MONSTER_SOURCE_DIR := $(MONSTER_DIR)source/
MONSTER_SOURCE_FILES := $(shell find $(MONSTER_SOURCE_DIR) -name '*.js')
MONSTER_RELATIVE_SOURCE_FILES := $(shell find $(MONSTER_SOURCE_DIR) -name '*.js' -exec realpath --relative-to $(THIS_DIR) {} \; )
MONSTER_DIST_DIR := $(MONSTER_DIR)dist/
MONSTER_DIST_MODULE_DIR := $(MONSTER_DIST_DIR)modules/
MONSTER_DIST_MODULES_FILES := $(subst $(MONSTER_SOURCE_DIR), $(MONSTER_DIST_MODULE_DIR), $(MONSTER_SOURCE_FILES))
MONSTER_TEST_DIR := $(MONSTER_DIR)test/
MONSTER_TEST_CASE_DIR := $(MONSTER_TEST_DIR)cases/
MONSTER_FILES_WITHVERSION := $(shell grep -l -r -E "monster($(SUBPACKAGE))?@[0-9]\.[0-9]\.[0-9]" $(MONSTER_SOURCE_FILES))
MONSTER_TUTORIALS_FILES_WITHVERSION := $(shell grep -l -r -E "monster($(SUBPACKAGE))?@[0-9]\.[0-9]\.[0-9]" $(MONSTER_TUTORIAL_DIR))
MONSTER_BUILD_TEST_BROWSER_DIR := $(SCRIPT_PATH)builds/monster/test-browser/
MONSTER_BUILD_LIB_DIR := $(SCRIPT_PATH)builds/monster/library/
MONSTER_BUILD_LIB_DEV_DIR := $(SCRIPT_PATH)builds/monster/library-dev/
MONSTER_TUTORIALS_FILES_WITHVERSION := $(shell grep -l -r -E "monster($(SUBPACKAGE))?@[0-9]+\.[0-9]+\.[0-9]+" $(MONSTER_TUTORIAL_DIR))
MONSTER_FILES_WITHVERSION := $(shell grep -l -r -E "monster($(SUBPACKAGE))?@[0-9]+\.[0-9]+\.[0-9]+" $(MONSTER_SOURCE_FILES)) $(MONSTER_TEST_CASE_DIR)monster.js $(MONSTER_DIR)README.md $(MONSTER_TUTORIALS_FILES_WITHVERSION) $(MONSTER_SOURCE_DIR)/types/version.js
MONSTER_CORE_VERSION := $(shell jq -r ".version" $(MONSTER_CORE_DIR)package.json)
MONSTER_VERSION := $(shell jq -r ".version" $(MONSTER_DIR)package.json)
......@@ -278,71 +291,74 @@ $(MONSTER_DIST_DIR):
$(QUIET) $(MKDIR) $(MONSTER_DIST_DIR)
.PHONY: version-monster
version-monster: $(MONSTER_TEST_CASE_DIR)monster.js $(MONSTER_DIR)README.md $(MONSTER_FILES_WITHVERSION) $(MONSTER_TUTORIALS_FILES_WITHVERSION)
$(MONSTER_BUILD_TEST_BROWSER_DIR)node_modules/: $(MONSTER_BUILD_TEST_BROWSER_DIR)/package.json
$(QUIET) $(CD) $(MONSTER_BUILD_TEST_BROWSER_DIR) ; $(NPM) install ; $(RM) node_modules/.modified ; $(TOUCH) -m node_modules/.modified; cd -
$(MONSTER_TEST_CASE_DIR)monster.js: $(MONSTER_DIR)package.json $(MONSTER_CORE_DIR)package.json
$(ECHOMARKER) "write test/monster.js version $(MONSTER_VERSION)"
$(QUIET) $(AWK) -i inplace -v start='/**#@+' -v end='/**#@-*/' -v repl=" /**#@+ dont touch, replaced by make with package.json version */\n monsterVersion = new Version('$(MONSTER_VERSION)')\n /**#@-*/" '$$1 == start{del=2} $$1 == end{$$1 = repl; del=0} !del' $(MONSTER_TEST_CASE_DIR)monster.js
$(MONSTER_BUILD_LIB_DIR)node_modules/: $(MONSTER_BUILD_LIB_DIR)/package.json
$(QUIET) $(CD) $(MONSTER_BUILD_LIB_DIR) ; $(NPM) install ; $(RM) node_modules/.modified ; $(TOUCH) -m node_modules/.modified; cd -
$(MONSTER_DIR)README.md: $(MONSTER_DIR)package.json $(MONSTER_CORE_DIR)package.json
$(ECHOMARKER) "write README.md monster version $(MONSTER_VERSION) and monster core version $(MONSTER_CORE_VERSION)"
$(QUITE) $(SED) -i -E "s/(\/monster$(SUBPACKAGE)@)([0-9]+\.[0-9]+\.[0-9]+)\//\1$(MONSTER_VERSION)\//gi" $(MONSTER_DIR)README.md
$(QUITE) $(SED) -i -E "s/(\/monster@)([0-9]+\.[0-9]+\.[0-9]+)\//\1$(MONSTER_CORE_VERSION)\//gi" $(MONSTER_DIR)README.md
$(MONSTER_BUILD_LIB_DEV_DIR)node_modules/: $(MONSTER_BUILD_LIB_DEV_DIR)/package.json
$(QUIET) $(CD) $(MONSTER_BUILD_LIB_DEV_DIR) ; $(NPM) install ; $(RM) node_modules/.modified ; $(TOUCH) -m node_modules/.modified; cd -
$(MONSTER_FILES_WITHVERSION): $(MONSTER_DIR)package.json $(MONSTER_CORE_DIR)package.json
$(ECHOMARKER) "write $@ monster version $(MONSTER_VERSION) and monster core version $(MONSTER_CORE_VERSION)"
$(QUITE) $(SED) -i -E "s/(\/monster$(SUBPACKAGE)@)([0-9]+\.[0-9]+\.[0-9]+)\//\1$(MONSTER_VERSION)\//gi" $@
$(QUITE) $(SED) -i -E "s/(\/monster@)([0-9]+\.[0-9]+\.[0-9]+)\//\1$(MONSTER_CORE_VERSION)\//gi" $@
$(QUIET) $(AWK) -i inplace -v start='/**#@+' -v end='/**#@-*/' -v repl=" /**#@+ dont touch, replaced by make with package.json version */\n monsterVersion = new Version('$(MONSTER_VERSION)')\n /**#@-*/" '$$1 == start{del=2} $$1 == end{$$1 = repl; del=0} !del' $@
.PHONY: version-monster
version-monster: $(MONSTER_TEST_CASE_DIR)monster.js $(MONSTER_SOURCE_DIR)/types/version.js $(MONSTER_DIR)README.md $(MONSTER_FILES_WITHVERSION) $(MONSTER_TUTORIALS_FILES_WITHVERSION)
$(MONSTER_TUTORIALS_FILES_WITHVERSION): $(MONSTER_DIR)package.json $(MONSTER_CORE_DIR)package.json
$(MONSTER_FILES_WITHVERSION): $(MONSTER_DIR)package.json $(MONSTER_CORE_DIR)package.json
$(ECHOMARKER) "write $@ monster version $(MONSTER_VERSION) and monster core version $(MONSTER_CORE_VERSION)"
$(QUITE) $(SED) -i -E "s/(\/monster$(SUBPACKAGE)@)([0-9]+\.[0-9]+\.[0-9]+)\//\1$(MONSTER_VERSION)\//gi" $@
$(QUITE) $(SED) -i -E "s/(\/monster@)([0-9]+\.[0-9]+\.[0-9]+)\//\1$(MONSTER_CORE_VERSION)\//gi" $@
$(QUIET) $(SED) -i -E "s/(\/monster$(SUBPACKAGE)@)([0-9]+\.[0-9]+\.[0-9]+)\//\1$(MONSTER_VERSION)\//gi" $@
$(QUIET) $(SED) -i -E "s/(\/monster@)([0-9]+\.[0-9]+\.[0-9]+)\//\1$(MONSTER_CORE_VERSION)\//gi" $@
$(QUIET) $(SED) -i -E "s/(monsterjs\.org\/en\/doc\/)([0-9]+\.[0-9]+\.[0-9]+)\//\1$(MONSTER_CORE_VERSION)\//gi" $@
$(QUIET) $(AWK) -i inplace -v start='/**#@+' -v end='/**#@-*/' -v repl=" /**#@+ dont touch, replaced by make with package.json version */\n monsterVersion = new Version('$(MONSTER_VERSION)')\n /**#@-*/" '$$1 == start{del=2} $$1 == end{$$1 = repl; del=0} !del' $@
$(MONSTER_DIST_DIR)monster.dev.js: $(MONSTER_SOURCE_FILES)
$(QUIET) $(BROWSERIFY) $(MONSTER_SOURCE_DIR)monster.js -t [ babelify --presets [ @babel/preset-env ] ] --debug | \
$(EXORCIST) $(MONSTER_DIST_DIR)monster.dev.js.map > $(MONSTER_DIST_DIR)monster.dev.js
$(QUIET) if [ -f $(MONSTER_DIST_DIR)monster.dev.js ] ; then $(RM) $(MONSTER_DIST_DIR)monster.dev.js ; fi;
$(QUIET) $(CD) $(MONSTER_BUILD_LIB_DEV_DIR); $(WEBPACK) ; $(CD) -
$(QUIET) $(SED) -i '1 i /** $(LICENSE_C_COMMENT) */' $(MONSTER_DIST_DIR)monster.dev.js
$(MONSTER_DIST_MODULES_FILES): $(MONSTER_SOURCE_FILES)
$(ECHOMARKER) "build monster modules $@"
$(QUIET) $(BABEL) --config-file $(THIS_DIR).babelrc.json --no-comments --out-file $@ --minified --presets @babel/preset-modules $(subst $(MONSTER_DIST_MODULE_DIR), $(MONSTER_SOURCE_DIR), $@)
$(QUIET) $(SED) -i '1 i /** $(LICENSE_C_COMMENT) */' $@
.PHONY: uglifyjs-monster
uglifyjs-monster: $(MONSTER_DIST_MODULES_FILES)
$(ECHOMARKER) "uglifyjs monster modules"
$(QUIET) $(UGLIFYJS) --validate --compress --mangle --comments 'schukai' --in-situ $(MONSTER_DIST_MODULES_FILES)
$(MONSTER_DIST_DIR)monster.js: $(MONSTER_SOURCE_FILES)
$(ECHOMARKER) "build monster"
$(QUIET) echo "/** $(LICENSE_C_COMMENT) */" > $(MONSTER_DIST_DIR)monster.js
$(QUIET) $(BROWSERIFY) $(MONSTER_SOURCE_DIR)monster.js -t [ babelify --presets [ @babel/preset-env ] ] | $(UGLIFYJS) -- >> $(MONSTER_DIST_DIR)monster.js
$(CD) $(MONSTER_BUILD_LIB_DIR); $(WEBPACK) ; $(CD) -
$(QUIET) $(SED) -i '1 i /** $(LICENSE_C_COMMENT) */' $(MONSTER_DIST_DIR)monster.js
.PHONY: build-monster
## create packages
build-monster: version-monster $(NODE_MODULES_DIR) $(MONSTER_DIST_DIR) $(MONSTER_DIST_DIR)monster.js $(MONSTER_DIST_DIR)monster.dev.js $(MONSTER_DIST_MODULES_FILES)
build-monster: $(MONSTER_BUILD_LIB_DEV_DIR)node_modules/ $(MONSTER_BUILD_LIB_DIR)node_modules/ $(NODE_MODULES_DIR) version-monster $(MONSTER_DIST_DIR) $(MONSTER_DIST_DIR)monster.js $(MONSTER_DIST_DIR)monster.dev.js $(MONSTER_DIST_MODULES_FILES)
.PHONY: test-browser-monster
## create test-browser-monster
test-browser-monster:
test-browser-monster: $(MONSTER_BUILD_TEST_BROWSER_DIR)node_modules/ create-polyfill-monster
$(ECHOMARKER) "create browser test and start chrome"
$(QUIET) $(FIND) $(MONSTER_TEST_CASE_DIR) -type f | $(SED) "s|^$(MONSTER_TEST_CASE_DIR)||" > $(MONSTER_TEST_DIR)web/import.js
$(QUIET) $(SED) -i 's|^|import "../cases/|' $(MONSTER_TEST_DIR)web/import.js
$(QUIET) $(SED) -i 's|$$|";|' $(MONSTER_TEST_DIR)web/import.js
$(QUIET) $(SED) -i "1 i SharedArrayBuffer = ArrayBuffer;" $(MONSTER_TEST_DIR)web/import.js
$(QUIET) $(SED) -i "1 i import \"./prepare.js\";" $(MONSTER_TEST_DIR)web/import.js
$(QUIET) $(SED) -i "1 i /** this file was created automatically by the make target test-browser-monster */" $(MONSTER_TEST_DIR)web/import.js
$(QUIET) $(BROWSERIFY) $(MONSTER_TEST_DIR)web/import.js -t [ babelify --presets [ @babel/preset-env ] --plugins [ @babel/plugin-transform-runtime ] ] > $(MONSTER_TEST_DIR)web/tests.js
$(QUIET) if $(OPENBROWSER) ; then google-chrome --profile-directory="Default" $(MONSTER_TEST_DIR)web/test.html ; fi
$(QUIET) $(CD) $(MONSTER_BUILD_TEST_BROWSER_DIR); $(WEBPACK) ; $(CD) -
$(QUIET) $(SED) -i -E "/<h1/s_.*_ <h1 style='margin-bottom: 0.1em;'>Monster $(MONSTER_CORE_VERSION)</h1>_" $(MONSTER_TEST_DIR)web/test.html $(MONSTER_TEST_DIR)web/monster.html $(MONSTER_TEST_DIR)web/monster-dev.html
$(QUIET) $(SED) -i -E "/id=\"lastupdate\"/s_.*_ <div id=\"lastupdate\" style='font-size:0.7em'>last update $(shell date)</div>_" $(MONSTER_TEST_DIR)web/test.html $(MONSTER_TEST_DIR)web/monster.html $(MONSTER_TEST_DIR)web/monster-dev.html
$(QUIET) $(SED) -i -E "s_src=\"([\"]*)\.js.*\"_src=\"\1.js?r=$(shell date +"%T")\"_" $(MONSTER_TEST_DIR)web/test.html $(MONSTER_TEST_DIR)web/monster.html $(MONSTER_TEST_DIR)web/monster-dev.html
$(QUIET) $(SED) -i -E "s_dist/([0-9]+\.[0-9]+\.[0-9]+)*/dist/monster_dist/$(MONSTER_CORE_VERSION)/dist/monster_" $(MONSTER_TEST_DIR)web/monster.html $(MONSTER_TEST_DIR)web/monster-dev.html
#$(QUIET) if $(OPENBROWSER) ; then google-chrome --profile-directory="Default" $(MONSTER_TEST_DIR)web/test.html ; fi
.PHONY: test-monster
## test library
test-monster: build-monster
$(ECHOMARKER) "test monster"
$(QUITE) $(NPX) flow
$(QUIET) $(NPX) flow
$(QUIET) $(MOCHA) --recursive $(MONSTER_TEST_CASE_DIR)**
.PHONY: coverage-monster
## coverage library
coverage-monster: build-monster
coverage-monster: test-monster
$(ECHOMARKER) "coverage monster"
$(QUIET) $(C8) --config=$(MONSTER_DIR).c8rc.json $(MOCHA) $(MONSTER_TEST_CASE_DIR)**
$(QUIET) if $(OPENBROWSER) ; then google-chrome --profile-directory="Default" $(MONSTER_DIR)coverage/index.html ; fi
......@@ -358,42 +374,105 @@ npm-publish-monster: build-monster
.PHONY: clean-monster
## clean repos
clean-monster:
$(QUITE) $(RM) --recursive $(MONSTER_DIST_DIR)
$(QUIET) $(RM) --recursive $(MONSTER_DIST_DIR)
.PHONY: clean-all-monster
## clean repos complete
clean-all-monster:
$(QUIET) $(RM) --recursive $(MONSTER_DIST_DIR)
$(QUIET) $(RM) --recursive $(MONSTER_DIST_MODULES_FILES)
$(QUIET) $(RM) --recursive $(MONSTER_BUILD_TEST_BROWSER_DIR)node_modules/
$(QUIET) $(RM) --recursive $(MONSTER_BUILD_LIB_DIR)node_modules/
$(QUIET) $(RM) --recursive $(MONSTER_BUILD_LIB_DEV_DIR)node_modules/
.PHONY: transfer-monster
## transfer-monster to aws
transfer-monster:
$(ECHOMARKER) "upload aws"
$(QUIET) $(AWS) s3 --only-show-errors cp --recursive $(MONSTER_DIR)/ s3://monsterjs.org/dist/$(MONSTER_CORE_VERSION)/
.PHONY: release-monster
## release monster repos with new version (use NEXTVERSION)
release-monster:
$(ECHOMARKER) "release monster"
$(QUIET) $(MAKE) test-monster
$(QUIET) $(MAKE) clean
$(QUIET) $(SCRIPT_PATH)increase-version.sh "$(MONSTER_CORE_DIR)package.json" $(MONSTER_CORE_VERSION) $(NEXTVERSION)
$(QUIET) $(MAKE) clean
$(QUIET) $(MAKE) build-monster
$(QUIET) $(MAKE) uglifyjs-monster
$(QUIET) $(MAKE) test-monster
$(QUIET) $(MAKE) coverage-monster DONTOPENBROWSER=true
$(QUIET) $(MAKE) test-browser-monster DONTOPENBROWSER=true
$(QUIET) $(MAKE) doc-2-aws
$(QUIET) $(MAKE) doc-build-versions-js
$(QUIET) $(MAKE) git-tag
$(QUIET) $(MAKE) transfer-monster
$(QUIET) $(MAKE) npm-publish-monster
$(QUIET) touch $(MONSTER_CORE_DIR)package.json ; $(MAKE) doc-build-versions-js
.PHONY: create-polyfill-monster
## create polyfill.io url
create-polyfill-monster: $(MONSTER_SOURCE_FILES)
$(ECHOMARKER) "create and replace polyfill"
$(QUIET) $(SCRIPT_PATH)create-polyfill.sh $(MONSTER_RELATIVE_SOURCE_FILES)
#############################################################################################
.PHONY: build
.PHONY: clean
## clean
clean:
$(QUIET) $(RM) --recursive $(THIS_DIR)docs/
make clean-monster
## make clean-monster PACKAGE=dom
$(QUIET) $(RM) --recursive $(THIS_DIR)web/js/doc
$(QUIET) $(MAKE) clean-monster
.PHONY: clean-all
## clean-all
clean-all:
$(QUIET) $(RM) --recursive $(NODE_MODULES_DIR)
$(QUIET) $(RM) --recursive $(THIS_DIR)docs/
$(QUIET) $(MAKE) clean-all-monster
.PHONY: build
## create all packages
build:
make build-monster
$(QUIET) $(MAKE) build-monster
## make build-monster PACKAGE=dom
.PHONY: test
## test all packages
test:
make test-monster
$(QUIET) $(MAKE) test-monster
.PHONY: coverage
## coverage all packages
coverage:
make coverage-monster
$(QUIET) $(MAKE) coverage-monster
# make test-monster PACKAGE=dom
.PHONY: release
## release all packages
release:
$(QUIET) $(MAKE) release-monster
.PHONY: doc
## generate docs
doc: test
doc: test create-polyfill-monster $(THIS_DIR)jsdoc.json
$(ECHOMARKER) "create doc"
$(QUIET) $(JSDOC) --tutorials $(THIS_DIR)tutorials/ -c $(THIS_DIR)jsdoc.json $(THIS_DIR)README.md
# $(QUIET) $(GREP) -rl 'Documentation generated by' $(THIS_DIR)docs/ | $(XARGS) sed -i '/Documentation generated by/d'
doc-2-aws: doc
$(QUIET) $(AWS) s3 cp --recursive $(THIS_DIR)docs/ s3://doc.alvine.io/en/oss/monster/snapshot/
.PHONY: doc-2-aws
doc-2-aws: doc doc-build-versions-js
$(QUIET) $(AWS) s3 --only-show-errors cp --recursive $(THIS_DIR)docs/ s3://monsterjs.org/en/doc/$(MONSTER_CORE_VERSION)/
.PHONY: doc-build-versions-js
## generate versions dropdown and upload to aws
doc-build-versions-js: $(THIS_DIR)web/js/doc/monster-versions.js $(THIS_DIR)web/js/doc/monster-latest-version.js
$(ECHOMARKER) "transfer versions-js"
$(QUIET) $(AWS) s3 --only-show-errors cp $(THIS_DIR)web/js/doc/monster-versions.js s3://monsterjs.org/js/doc/monster-versions.js
$(QUIET) $(AWS) s3 --only-show-errors cp $(THIS_DIR)web/js/doc/monster-latest-version.js s3://monsterjs.org/js/doc/monster-latest-version.js
$(THIS_DIR)web/js/doc/monster-versions.js $(THIS_DIR)web/js/doc/monster-latest-version.js: $(THIS_DIR)package.json $(MONSTER_CORE_DIR)package.json
$(QUIET) $(MKDIR) $(THIS_DIR)web/js/doc
$(QUIET) $(NODE) $(SCRIPT_PATH)build-versions-javascript.js
......@@ -2,7 +2,7 @@
# Monster
![](https://gitlab.schukai.com/oss/libraries/javascript/monster/badges/master/pipeline.svg?style=flat-square) ![](https://badgen.net/npm/v/@schukai/monster)
![](https://gitlab.schukai.com/oss/libraries/javascript/monster/badges/master/pipeline.svg?style=flat-square) ![](https://badgen.net/npm/v/@schukai/monster) ![](https://data.jsdelivr.com/v1/package/npm/@schukai/monster/badge)
**Build fantastic websites!**
......@@ -16,7 +16,8 @@ One first design target is to reach the shiny sun with as little Javascript as p
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).
There is a version in the `/dist` folder that was built via [browserify](https://browserify.org/) and thus supports all browsers that are compatible with ES5.
There is a version in the `/dist` folder that was built via [webpack](https://github.com/webpack/webpack) and
thus supports all browsers that are compatible with [ES5](https://caniuse.com/es5).
## Build & Development
......@@ -42,6 +43,9 @@ make npm-publish-${PACKAGES}
```
to make compatibility with the older browsers [polyfill.io](https://cdn.polyfill.io/v3/url-builder/) is a good choice.
## Packages
| Package | Description | NPM |
......@@ -50,7 +54,7 @@ make npm-publish-${PACKAGES}
## Documentation
To check out docs and examples, visit [doc.alvine.io/en/oss/monster/snapshot/](https://doc.alvine.io/en/oss/monster/snapshot/).
To check out docs and examples, visit [monsterjs.org/en/doc/latest/](https://monsterjs.org/en/doc/latest/).
## Questions
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.