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

chore: update makefiles

parent dcbeb572
No related branches found
No related tags found
No related merge requests found
...@@ -11,9 +11,12 @@ BOB_BIN ?= $(VENDOR_PATH)bob ...@@ -11,9 +11,12 @@ BOB_BIN ?= $(VENDOR_PATH)bob
#BOB_SNIPPED_CONFIG ?= $(VENDOR_PATH)bob/snippet.yaml #BOB_SNIPPED_CONFIG ?= $(VENDOR_PATH)bob/snippet.yaml
BOB_SYNC_CONFIG ?= $(VENDOR_PATH)bob/sync.yaml BOB_SYNC_CONFIG ?= $(VENDOR_PATH)bob/sync.yaml
BOB_BUILD_PATH ?= $(BUILD_PATH)bob/build/ BOB_SOURCE_PATH ?= $(SOURCE_PATH)
BOB_DIST_PATH ?= $(DIST_PATH)bob/dist/ BOB_DIST_PATH ?= $(DIST_PATH)bob/dist/
BOB_HTML_TEMPLATES_PATH ?= $(BUILD_PATH)bob/build/
BOB_DATA_FILE ?= data.yaml
define SYNCEXAMPLECONF define SYNCEXAMPLECONF
sync: sync:
......
...@@ -10,3 +10,6 @@ ...@@ -10,3 +10,6 @@
JSDOC ?= $(NODE_MODULES_BIN_DIR)jsdoc JSDOC ?= $(NODE_MODULES_BIN_DIR)jsdoc
EXECUTABLES = $(EXECUTABLES:-) $(JSDOC); EXECUTABLES = $(EXECUTABLES:-) $(JSDOC);
FIXBROKENPLANTUML ?= $(NODE_MODULES_DIR)jsdoc-plantuml/fixBrokenNodeJS.js
DOCUMENTATION_S3_PATH ?= s3://doc.alvine.io/en/oss/$(COMPONENT_SLUG)/
\ No newline at end of file
...@@ -10,8 +10,8 @@ ifeq ($(BOB_BIN),) ...@@ -10,8 +10,8 @@ ifeq ($(BOB_BIN),)
$(error $(ERRORMARKER) Bob is not defined, check your Makefile if bob.mk is included) $(error $(ERRORMARKER) Bob is not defined, check your Makefile if bob.mk is included)
endif endif
ifndef BOB_BUILD_PATH ifndef BOB_HTML_TEMPLATES_PATH
$(error $(ERRORMARKER) BOB_BUILD_PATH is not defined, check your Makefile if bob.mk is included) $(error $(ERRORMARKER) BOB_HTML_TEMPLATES_PATH is not defined, check your Makefile if bob.mk is included)
endif endif
ifndef BOB_DIST_PATH ifndef BOB_DIST_PATH
...@@ -37,26 +37,34 @@ endif ...@@ -37,26 +37,34 @@ endif
$(ECHOMARKER) "Sync structure of pages" $(ECHOMARKER) "Sync structure of pages"
$(QUIET) $(BOB_BIN) html sync --specification $(BOB_SYNC_CONFIG) $(QUIET) $(BOB_BIN) html sync --specification $(BOB_SYNC_CONFIG)
$(BOB_HTML_TEMPLATES_PATH):
$(BOB_BUILD_PATH): $(ECHOMARKER) "Create template directory for bob"
$(ECHOMARKER) "Create build directory for bob" $(QUIET) $(MKDIR) -p $(BOB_HTML_TEMPLATES_PATH)
$(QUIET) $(MKDIR) -p $(BOB_BUILD_PATH)
$(BOB_DIST_PATH): $(BOB_DIST_PATH):
$(ECHOMARKER) "Create dist directory for bob" $(ECHOMARKER) "Create dist directory for bob"
$(QUIET) $(MKDIR) -p $(BOB_DIST_PATH) $(QUIET) $(MKDIR) -p $(BOB_DIST_PATH)
.PHONY: generate-html .PHONY: generate-html
## Build the project ## Build the project with Bob
generate-html: $(BOB_BIN) $(BOB_BUILD_PATH) $(BOB_DIST_PATH) generate-html: $(BOB_BIN) $(BOB_HTML_TEMPLATES_PATH) $(BOB_DIST_PATH)
$(ECHOMARKER) "Generate html" $(ECHOMARKER) "Generate html"
$(QUIET) $(BOB_BIN) html generate --input $(BOB_BUILD_PATH) --output $(BOB_DIST_PATH) $(QUIET) $(BOB_BIN) html generate --input $(BOB_HTML_TEMPLATES_PATH) --output $(BOB_DIST_PATH)
.PHONY: prepare-template .PHONY: prepare-template
## Prepare template ## Prepare template with Bob
prepare-template: $(BOB_BIN) $(BOB_BUILD_PATH) prepare-template: $(BOB_BIN) $(BOB_HTML_TEMPLATES_PATH)
$(ECHOMARKER) "Generate templates"
$(QUIET) $(BOB_BIN) template prepare --input $(BOB_SOURCE_PATH) --output $(BOB_HTML_TEMPLATES_PATH) --data-file=$(BOB_DATA_FILE)
.PHONY: init-template
## Init templates if not exist with Bob
init-template: $(BOB_BIN) $(BOB_HTML_TEMPLATES_PATH)
$(ECHOMARKER) "Generate templates" $(ECHOMARKER) "Generate templates"
$(QUIET) find $(SOURCE_PATH) -name "*.yaml" -exec $(BOB_BIN) template prepare --input $(SOURCE_PATH) --output $(BOB_BUILD_PATH) --data-file={} \; $(QUIET) $(BOB_BIN) template prepare --input $(BOB_SOURCE_PATH) --output $(BOB_HTML_TEMPLATES_PATH) --data-file=en.yaml
...@@ -83,8 +83,9 @@ define WEBCOMPONENTS_PACKAGE_CONTENT ...@@ -83,8 +83,9 @@ define WEBCOMPONENTS_PACKAGE_CONTENT
"monster" "monster"
], ],
"dependencies": { "dependencies": {
"@popperjs/core": "^2.9.2", "@popperjs/core": "^2.11.6",
"@schukai/monster": "^2.0.8" "@schukai/component-style": "^0.27.1",
"@schukai/monster": "^3.10.1"
}, },
"main": "source/component.mjs", "main": "source/component.mjs",
"module": "source/component.mjs", "module": "source/component.mjs",
...@@ -123,39 +124,64 @@ define WEBCOMPONENTS_BUILD_PACKAGE_CONTENT ...@@ -123,39 +124,64 @@ define WEBCOMPONENTS_BUILD_PACKAGE_CONTENT
"test": "npx mocha --recursive test/cases/", "test": "npx mocha --recursive test/cases/",
"web-test": "script/web-test.sh", "web-test": "script/web-test.sh",
"publish": "script/release-and-publish.sh", "publish": "script/release-and-publish.sh",
"build-doc": "script/build-doc.sh" "build-doc": "script/build-doc.sh",
"build-style": "node script/build-stylesheets.cjs ."
}, },
"type": "module", "type": "module",
"author": "schukai GmbH", "author": "schukai GmbH",
"license": "see LICENSE file", "license": "see LICENSE file",
"dependencies": { "dependencies": {
"@popperjs/core": "^2.11.2", "@popperjs/core": "^2.11.6",
"@schukai/monster": "^2.0.8" "@schukai/component-style": "^0.27.1",
"@schukai/monster": "^3.10.1"
}, },
"devDependencies": { "devDependencies": {
"@peculiar/webcrypto": "^1.4.0", "@oss/web-components-build-tools": "^1.2.8",
"@peculiar/webcrypto": "^1.4.1",
"autoprefixer": "^10.4.13",
"browserslist": "^4.21.5",
"btoa": "^1.2.1", "btoa": "^1.2.1",
"c8": "^7.12.0", "c8": "^7.12.0",
"chai": "^4.3.6", "chai": "^4.3.7",
"chai-dom": "^1.11.0", "chai-dom": "^1.11.0",
"clean-jsdoc-theme": "^4.1.6", "clean-jsdoc-theme": "^4.2.3",
"create-polyfill-service-url": "^2.2.6", "create-polyfill-service-url": "^2.2.6",
"crypt": "^0.0.2", "crypt": "^0.0.2",
"esbuild": "^0.14.53", "cssnano": "^5.1.14",
"flow-bin": "^0.184.0", "esbuild": "^0.17.5",
"fs": "^0.0.1-security", "flow-bin": "^0.199.1",
"fs": "0.0.1-security",
"glob": "^8.1.0",
"graphviz": "^0.0.9", "graphviz": "^0.0.9",
"jsdoc": "^3.6.11", "jsdoc": "^4.0.0",
"jsdoc-external-example": "github:volker-schukai/jsdoc-external-example", "jsdoc-external-example": "github:volker-schukai/jsdoc-external-example",
"jsdoc-plantuml": "^1.0.2", "jsdoc-plantuml": "^1.0.2",
"jsdom": "^19.0.0", "jsdom": "^21.1.0",
"jsdom-global": "^3.0.2", "jsdom-global": "^3.0.2",
"mocha": "^10.0.0", "mocha": "^10.2.0",
"node-plantuml": "^0.9.0", "node-plantuml": "^0.9.0",
"sinon": "^14.0.0", "postcss": "^8.4.21",
"postcss-fluid": "^1.4.2",
"postcss-for": "^2.1.1",
"postcss-import": "^15.1.0",
"postcss-load-config": "^4.0.1",
"postcss-mixins": "^9.0.4",
"postcss-nested": "^6.0.0",
"postcss-nesting": "^11.1.0",
"postcss-normalize": "^10.0.1",
"postcss-responsive-type": "^1.0.0",
"postcss-rtlcss": "^4.0.1",
"postcss-strip-units": "^2.0.1",
"rome": "^11.0.0",
"sinon": "^15.0.1",
"url": "^0.11.0", "url": "^0.11.0",
"url-exist": "3.0.0", "url-exist": "3.0.1",
"util": "^0.12.4" "util": "^0.12.5",
"vite": "^4.1.1",
"vite-plugin-banner": "^0.7.0",
"vite-plugin-list-directory-contents": "^1.4.5",
"vite-plugin-minify": "^1.5.2",
"vite-plugin-mkcert": "^1.12.0"
} }
} }
endef endef
......
############################################################################################# #############################################################################################
############################################################################################# #############################################################################################
## ##
...@@ -7,7 +6,13 @@ ...@@ -7,7 +6,13 @@
############################################################################################# #############################################################################################
############################################################################################# #############################################################################################
FIXBROKENPLANTUML := $(NODE_MODULES_DIR)jsdoc-plantuml/fixBrokenNodeJS.js ifndef DOCUMENTATION_S3_PATH
$(error $(ERRORMARKER) DOCUMENTATION_S3_PATH is not defined, check your Makefile if jsdoc.mk is included)
endif
ifndef FIXBROKENPLANTUML
$(error $(ERRORMARKER) FIXBROKENPLANTUML is not defined, check your Makefile if jsdoc.mk is included)
endif
.PHONY: jsdoc-build .PHONY: jsdoc-build
## generate js api docs ## generate js api docs
...@@ -21,3 +26,12 @@ $(FIXBROKENPLANTUML).fixed: ...@@ -21,3 +26,12 @@ $(FIXBROKENPLANTUML).fixed:
$(QUIET) chmod u+x $(FIXBROKENPLANTUML) $(QUIET) chmod u+x $(FIXBROKENPLANTUML)
$(QUIET) $(NODE) $(FIXBROKENPLANTUML) $(QUIET) $(NODE) $(FIXBROKENPLANTUML)
$(QUIET) $(TOUCH) $(FIXBROKENPLANTUML).fixed $(QUIET) $(TOUCH) $(FIXBROKENPLANTUML).fixed
.PHONY: jsdoc-to-s3
## transfer doc to s3
jsdoc-to-s3: jsdoc-build
$(ECHOMARKER) "transfer doc to s3"
$(QUIET) $(AWS) s3 --recursive --only-show-errors cp $(BUILD_PATH)docs $(DOCUMENTATION_S3_PATH)
...@@ -10,6 +10,14 @@ SPONGE ?= sponge ...@@ -10,6 +10,14 @@ SPONGE ?= sponge
EXECUTABLES = $(EXECUTABLES:-) $(SPONGE); EXECUTABLES = $(EXECUTABLES:-) $(SPONGE);
.PHONY: node-create-polyfill
## create polyfill.io url
node-create-polyfill: $(MJS_RELATIVE_SOURCE_FILES) $(NODE_PACKAGES)
$(ECHOMARKER) "create and replace polyfill"
$(QUIET) $(DEVELOPMENT_SCRIPTS_PATH)create-polyfill.sh $(MJS_RELATIVE_SOURCE_FILES)
.PHONY: node-build .PHONY: node-build
## Build Node Components ## Build Node Components
node-build: $(NODE_MODULES_MODIFIED) $(NODE_PACKAGES) node-build: $(NODE_MODULES_MODIFIED) $(NODE_PACKAGES)
......
#############################################################################################
#############################################################################################
##
## RUN PLAYGROUND
##
#############################################################################################
#############################################################################################
.PHONY: node-run-playground
## run playground (vite)
node-run-playground:
$(ECHOMARKER) "run playground"
$(QUIET) cd $(DEVELOPMENT_PATH)playground; npx vite;
...@@ -29,6 +29,6 @@ npm-preview: ...@@ -29,6 +29,6 @@ npm-preview:
.PHONY: npm-update-all .PHONY: npm-update-all
## Update Node Components ## Update Node Components
npm-update-all: npm-update-all:
$(ECHOMARKER) "Search and Update recursive all node_modules (npm and pnpm" $(ECHOMARKER) "Search and Update recursive all node_modules (npm and pnpm)"
$(QUIET) $(FIND) . -type f ! -path '*node_modules*' -iname pnpm-lock.yaml -exec bash -c 'cd $$(dirname {} ) ; pwd; pnpm update -Lr ; cd - ' \; $(QUIET) $(FIND) . -type f ! -path '*node_modules*' -iname pnpm-lock.yaml -exec bash -c 'cd $$(dirname {} ) ; pwd; pnpm update -Lr ; cd - ' \;
$(QUIET) $(FIND) . -type f ! -path '*node_modules*' -iname package-lock.json -exec bash -c 'cd $$(dirname {} ) ; pwd; npm install -g npm-check-updates; npx npm-check-updates; npm install ; cd -' \; $(QUIET) $(FIND) . -type f ! -path '*node_modules*' -iname package-lock.json -exec bash -c 'cd $$(dirname {} ) ; pwd; npm install -D npm-check-updates; npx npm-check-updates -u; npm install ; cd -' \;
...@@ -57,7 +57,7 @@ $(PHPUNIT_SCRIPT_PATH)/unittests.sh: ...@@ -57,7 +57,7 @@ $(PHPUNIT_SCRIPT_PATH)/unittests.sh:
$(PHPUNIT_BIN): $(PHPUNIT_BIN):
$(MKDIR) -p $(PHPUNIT_PATH) $(MKDIR) -p $(PHPUNIT_PATH)
$(WGET) -O $(PHPUNIT_BIN) https://phar.phpunit.de/phpunit-9.phar $(WGET) -O $(PHPUNIT_BIN) https://phar.phpunit.de/phpunit-10.phar
$(CHMOD) u+x $(PHPUNIT_BIN) $(CHMOD) u+x $(PHPUNIT_BIN)
$(CHMOD) u+x $(PHPUNIT_SCRIPT_PATH)/unittests.sh $(CHMOD) u+x $(PHPUNIT_SCRIPT_PATH)/unittests.sh
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment