Merge remote-tracking branch 'template/master'
This commit is contained in:
+5
-1
@@ -5,8 +5,12 @@ root = true
|
|||||||
|
|
||||||
[*]
|
[*]
|
||||||
indent_style = space
|
indent_style = space
|
||||||
indent_size = 2
|
indent_size = 4
|
||||||
end_of_line = lf
|
end_of_line = lf
|
||||||
charset = utf-8
|
charset = utf-8
|
||||||
trim_trailing_whitespace = true
|
trim_trailing_whitespace = true
|
||||||
insert_final_newline = true
|
insert_final_newline = true
|
||||||
|
|
||||||
|
[Makefile]
|
||||||
|
indent_style = tab
|
||||||
|
indent_size = 2
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ jobs:
|
|||||||
|
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: eslint
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: oven-sh/setup-bun@v2
|
- uses: oven-sh/setup-bun@v2
|
||||||
|
|||||||
@@ -0,0 +1,40 @@
|
|||||||
|
ifeq ($(shell which bun &>/dev/null && echo 1 || echo 0), 1)
|
||||||
|
NPM ?= bun
|
||||||
|
endif
|
||||||
|
|
||||||
|
NPM ?= npm
|
||||||
|
|
||||||
|
.PHONY: help
|
||||||
|
help: ## show this message
|
||||||
|
@echo "Usage: make [target1] (target2) ..."
|
||||||
|
@echo ""
|
||||||
|
@echo "Commands/Targets:"
|
||||||
|
@grep -E '(^[a-zA-Z0-9_%-]+:.*?##.*$$)|(^##)' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}{printf "\033[32m%-20s\033[0m %s\n", $$1, $$2}' | sed -e 's/\[32m##/[33m/'
|
||||||
|
@echo ""
|
||||||
|
@echo "Environment:"
|
||||||
|
@grep -E '^[a-zA-Z0-9_-]+\s*[?:]?=.*$$' $(MAKEFILE_LIST) | grep -Eo '^[a-zA-Z0-9_-]+' | xargs -I {} make -s print-{}
|
||||||
|
|
||||||
|
.PHONY: print-%
|
||||||
|
print-%:
|
||||||
|
@echo -e '\033[32m$*\033[0m = $($*)'
|
||||||
|
|
||||||
|
build: ## build static site in "dist"
|
||||||
|
@$(NPM) run build
|
||||||
|
|
||||||
|
.PHONY: run
|
||||||
|
def: ## run dev version of static site
|
||||||
|
@$(NPM) run dev
|
||||||
|
|
||||||
|
lint: ## lint code
|
||||||
|
@$(NPM) run lint
|
||||||
|
|
||||||
|
fix: ## fix and reformat code
|
||||||
|
@$(NPM) run format
|
||||||
|
@$(NPM) run lint-fix
|
||||||
|
|
||||||
|
update-template: ## update code from template
|
||||||
|
@(git remote | grep template &>/dev/null) || git remote add template https://github.com/klemek/vue-boilerplate.git
|
||||||
|
git fetch template
|
||||||
|
git merge template/master --allow-unrelated-histories
|
||||||
|
|
||||||
|
|
||||||
+1
-1
@@ -13,7 +13,7 @@
|
|||||||
"build-only": "vite build",
|
"build-only": "vite build",
|
||||||
"type-check": "vue-tsc --build",
|
"type-check": "vue-tsc --build",
|
||||||
"lint": "eslint . --cache",
|
"lint": "eslint . --cache",
|
||||||
"fix": "eslint . --fix --cache",
|
"lint-fix": "eslint . --fix --cache",
|
||||||
"format": "prettier --write --experimental-cli src/"
|
"format": "prettier --write --experimental-cli src/"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
+3
-3
@@ -1,7 +1,7 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted } from "vue";
|
import { ref, onMounted } from "vue";
|
||||||
import LucideIcon from "./components/LucideIcon.vue";
|
import LucideIcon from "./components/LucideIcon.vue";
|
||||||
import CustomButton from "./components/CustomButton.vue"
|
import CustomButton from "./components/CustomButton.vue";
|
||||||
|
|
||||||
const visible = ref<boolean>(false);
|
const visible = ref<boolean>(false);
|
||||||
|
|
||||||
@@ -22,11 +22,11 @@ onMounted(() => {
|
|||||||
<br />
|
<br />
|
||||||
<p>
|
<p>
|
||||||
Fill this page with <i>whatever</i> you're going to develop.
|
Fill this page with <i>whatever</i> you're going to develop.
|
||||||
<br>
|
<br />
|
||||||
<b>Then enjoy!</b>
|
<b>Then enjoy!</b>
|
||||||
</p>
|
</p>
|
||||||
<CustomButton>
|
<CustomButton>
|
||||||
<LucideIcon name="square-arrow-right"/> This is a sample button yay
|
<LucideIcon name="square-arrow-right" /> This is a sample button yay
|
||||||
</CustomButton>
|
</CustomButton>
|
||||||
<br />
|
<br />
|
||||||
<hr />
|
<hr />
|
||||||
|
|||||||
@@ -18,7 +18,10 @@ const props = withDefaults(defineProps<Props>(), {
|
|||||||
function kebab2camel(kebab: string): string {
|
function kebab2camel(kebab: string): string {
|
||||||
return kebab
|
return kebab
|
||||||
.split("-")
|
.split("-")
|
||||||
.map((item) => item.charAt(0).toUpperCase() + item.slice(1).toLowerCase())
|
.map(
|
||||||
|
(item) =>
|
||||||
|
item.charAt(0).toUpperCase() + item.slice(1).toLowerCase(),
|
||||||
|
)
|
||||||
.join("");
|
.join("");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user