From 38736c957ae3c6cd3794f11a1a96e62b659d16b1 Mon Sep 17 00:00:00 2001 From: Brayen Gavilanes Date: Sun, 13 Oct 2024 12:15:53 +0000 Subject: [PATCH 1/3] make: replicate ci workflow into a makefile This is to help local development. As of now, default behaviour is to git push to origin -- as default remote -- from current branch. --- Makefile | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..54f8c6a --- /dev/null +++ b/Makefile @@ -0,0 +1,24 @@ +CURRENT_GIT_BRANCH=$(shell git branch --show-current) +DEFAULT_GIT_REMOTE=origin + +default: push + +install: package.json pnpm-lock.yaml + pnpm install --frozen-lockfile + +check: install + pnpm run check + +lint: check + pnpm run lint || pnpm run format + +build: lint + pnpm run build + +clean: + find build -type f -exec rm {} \+; + +build_clean: clean build + +push: lint + git push ${DEFAULT_GIT_REMOTE} ${CURRENT_GIT_BRANCH} From e963170580503a3b1f1f0f9a99ce1777b1ab79a6 Mon Sep 17 00:00:00 2001 From: Brayen Gavilanes Date: Sun, 13 Oct 2024 13:55:43 +0000 Subject: [PATCH 2/3] make: commit files change by pnpm run format --- Makefile | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 54f8c6a..e720b70 100644 --- a/Makefile +++ b/Makefile @@ -1,24 +1,37 @@ -CURRENT_GIT_BRANCH=$(shell git branch --show-current) -DEFAULT_GIT_REMOTE=origin +# Define constants at the top +CURRENT_GIT_BRANCH := $(shell git branch --show-current) +DEFAULT_GIT_REMOTE := origin +# Default target default: push - -install: package.json pnpm-lock.yaml + +# Install dependencies +install: pnpm install --frozen-lockfile +# Check and lint code check: install pnpm run check lint: check - pnpm run lint || pnpm run format + pnpm run lint || \ + ( prettier_list=$$(mktemp) ; \ + pnpx prettier . -l >$${prettier_list} ; \ + pnpm run format && \ + xargs git commit -m "pnpm: pnpm run format" <$${prettier_list} && \ + rm $${prettier_list} ) +# Build project build: lint pnpm run build +# Clean build artifacts clean: - find build -type f -exec rm {} \+; + find build -type f -exec rm {} \+ +# Build and clean build_clean: clean build +# Push changes to remote repository push: lint - git push ${DEFAULT_GIT_REMOTE} ${CURRENT_GIT_BRANCH} + git push $(DEFAULT_GIT_REMOTE) $(CURRENT_GIT_BRANCH) From c5c0d0bb049702581d8f8497ee833f0467913131 Mon Sep 17 00:00:00 2001 From: Brayen Gavilanes Date: Sun, 13 Oct 2024 14:29:30 +0000 Subject: [PATCH 3/3] pnpm: pnpm run format --- src/lib/components/Event.svelte | 2 +- src/lib/components/Tag.svelte | 2 +- src/lib/data/events.json | 40 +++++++++++++------------- src/routes/events/cliweek/+page.svelte | 39 ++++++++++++------------- 4 files changed, 40 insertions(+), 43 deletions(-) diff --git a/src/lib/components/Event.svelte b/src/lib/components/Event.svelte index f256041..314b541 100644 --- a/src/lib/components/Event.svelte +++ b/src/lib/components/Event.svelte @@ -28,7 +28,7 @@ {place} - + diff --git a/src/lib/components/Tag.svelte b/src/lib/components/Tag.svelte index 19d561c..77d122a 100644 --- a/src/lib/components/Tag.svelte +++ b/src/lib/components/Tag.svelte @@ -7,7 +7,7 @@ {category} diff --git a/src/lib/data/events.json b/src/lib/data/events.json index 68a340e..efd4095 100644 --- a/src/lib/data/events.json +++ b/src/lib/data/events.json @@ -1,22 +1,22 @@ { - "events": [ - { - "name": "HacktoberfestGYE 2024", - "description": "Colabora en una variedad de proyectos de código abierto, mejorando tus habilidades y contribuyendo a la comunidad global de desarrolladores.", - "date": "10/10/2024", - "time": "9 AM - 5 PM", - "place": "Universidad Católica Santiago de Guayaquil", - "category": "Hackathon", - "route": "/events/hacktoberfest" - }, - { - "name": "CLI Week 2024", - "description": "A week to celebrate the versatility and develop CLI tools with friends. We'll also have workshops and talks!", - "date": "11/11/2024 - 15/11/2024", - "time": "All day", - "place": "Online", - "category": "Hackathon/Workshops", - "route": "/events/cliweek" - } - ] + "events": [ + { + "name": "HacktoberfestGYE 2024", + "description": "Colabora en una variedad de proyectos de código abierto, mejorando tus habilidades y contribuyendo a la comunidad global de desarrolladores.", + "date": "10/10/2024", + "time": "9 AM - 5 PM", + "place": "Universidad Católica Santiago de Guayaquil", + "category": "Hackathon", + "route": "/events/hacktoberfest" + }, + { + "name": "CLI Week 2024", + "description": "A week to celebrate the versatility and develop CLI tools with friends. We'll also have workshops and talks!", + "date": "11/11/2024 - 15/11/2024", + "time": "All day", + "place": "Online", + "category": "Hackathon/Workshops", + "route": "/events/cliweek" + } + ] } diff --git a/src/routes/events/cliweek/+page.svelte b/src/routes/events/cliweek/+page.svelte index 2e03388..04a60c2 100644 --- a/src/routes/events/cliweek/+page.svelte +++ b/src/routes/events/cliweek/+page.svelte @@ -13,22 +13,22 @@

- Welcome to the CLI Week! This is a week dedicated to the celebration of command line tools - in which we'll have talks and workshops and participants will compete to develop their own - CLI tool. + Welcome to the CLI Week! This is a week dedicated to the celebration of command line tools in + which we'll have talks and workshops and participants will compete to develop their own CLI + tool.

How to participate?

- You can participate either as a speaker or by building a CLI tool. Check out the links below for the corresponding - registration link. + You can participate either as a speaker or by building a CLI tool. Check out the links below for + the corresponding registration link.

- For speakers, you'll find a link to a registration form below where you can specify the topic you'd like to - talk about and you tentative dates. We'll then get in touch with you to coordinate your awesome - talk :). + For speakers, you'll find a link to a registration form below where you can specify the topic + you'd like to talk about and you tentative dates. We'll then get in touch with you to coordinate + your awesome talk :).

@@ -40,17 +40,17 @@ .

-
-

Register

-
+
+

Register

+ @@ -59,20 +59,17 @@

Sponsorship

- We are a non-profit organization and have limited resources, so if you'd like to help make this - event even cooler for our participants and act as a sponsor, please contact us at our email + We are a non-profit organization and have limited resources, so if you'd like to help make + this event even cooler for our participants and act as a sponsor, please contact us at our + email kokoa.espol.ec@gmail.com.

Speakers

-

- There are no speakers yet! Why don't you become the first one? -

+

There are no speakers yet! Why don't you become the first one?

-
- See you there! -
+
See you there!