From 20cadc8521d4b144b11e7b22089231c74a8dde5d Mon Sep 17 00:00:00 2001 From: aleidk Date: Mon, 30 Dec 2024 16:07:48 -0300 Subject: [PATCH 1/6] fix: add dummy publish script for website --- .forgejo/workflows/publish.yaml | 20 +++++--------------- cog.toml | 5 ++++- packages/website/package.json | 3 ++- 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/.forgejo/workflows/publish.yaml b/.forgejo/workflows/publish.yaml index d2ead27..0f6ce94 100644 --- a/.forgejo/workflows/publish.yaml +++ b/.forgejo/workflows/publish.yaml @@ -34,21 +34,11 @@ jobs: - name: Install dependencies run: "bun install" - - name: Setup Cog + - name: Bump version and publish uses: https://github.com/eshepelyuk/cocogitto-diya@v1 - with: - release: false - git-user: 'Cog Bot' - git-user-email: 'cog@alecodes.page' - - - name: Create release - id: bump env: NPM_REGISTRY_TOKEN: ${{ secrets.NPM_TOKEN_FORGEJO }} - run: "cog bump --auto" - - - name: Summary - run: | - echo "Bun executable chache found: ${{ steps.setup_bun.outputs.cache-hit }}"; - echo "Bun dependencies chache found: ${{ steps.cache.outputs.cache-hit }}"; - echo "Package published: ${{ steps.publish.outputs.version }}"; + with: + release: true + git-user: 'Cog Bot' + git-user-email: 'cog@alecodes.page' diff --git a/cog.toml b/cog.toml index 5c6d532..e62b659 100644 --- a/cog.toml +++ b/cog.toml @@ -8,7 +8,10 @@ branch_whitelist = [] skip_ci = "[skip ci]" skip_untracked = false pre_bump_hooks = [] -post_bump_hooks = [] +post_bump_hooks = [ + "git push", + "git push origin {{version_tag}}", +] pre_package_bump_hooks = [ "echo 'bump package {{package}} to {{version}}'", "sed -E -i 's/(\"version\":) \"[0-9.]{5}\"/\\1 \"{{version}}\"/gi' package.json", diff --git a/packages/website/package.json b/packages/website/package.json index d0f6772..3014521 100644 --- a/packages/website/package.json +++ b/packages/website/package.json @@ -5,7 +5,8 @@ "link-dependencies": "bun run _scripts/link-dependencies.ts", "prebuild": "bun run _scripts/build.ts", "watch-deps": "bun run --watch _scripts/build.ts", - "dev": "zola serve --port 3000 --fast --open" + "dev": "zola serve --port 3000 --fast --open", + "ci:publish": "echo 'dummy publish script'" }, "dependencies": { "@mini-strap/core": "workspace:*", From f17fab7a04f9ee00122b4c32ec315c00eb3dd23d Mon Sep 17 00:00:00 2001 From: Cog Bot Date: Mon, 30 Dec 2024 19:31:35 +0000 Subject: [PATCH 2/6] chore(version): v0.1.0 --- CHANGELOG.md | 26 ++++++++++++++++++++++++ packages/components/CHANGELOG.md | 20 ++++++++++++++++++ packages/components/package.json | 2 +- packages/core/CHANGELOG.md | 29 ++++++++++++++++++++++++++ packages/core/package.json | 2 +- packages/website/CHANGELOG.md | 35 ++++++++++++++++++++++++++++++++ 6 files changed, 112 insertions(+), 2 deletions(-) create mode 100644 CHANGELOG.md create mode 100644 packages/components/CHANGELOG.md create mode 100644 packages/core/CHANGELOG.md create mode 100644 packages/website/CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..0485eed --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,26 @@ +# Changelog +All notable changes to this project will be documented in this file. See [conventional commits](https://www.conventionalcommits.org/) for commit guidelines. + +- - - +## v0.1.0 - 2024-12-30 +### Package updates +- @mini-strap/core bumped to @mini-strap/core-v0.1.0 +- @mini-strap/components bumped to @mini-strap/components-v0.1.0 +- @mini-strap/website bumped to @mini-strap/website-v0.1.0 +### Global changes +#### Bug Fixes +- add dummy publish script for website - (20cadc8) - aleidk +#### Build system +- fix build setup - (8442bbb) - aleidk +#### Features +- **(core)** add styles for vanilla form elements - (e754e40) - aleidk +- **(website)** add build script for frontend dependencies - (698294c) - aleidk +#### Miscellaneous Chores +- **(website)** add docosaurus as SSG - (85660ac) - Alexander Navarro +- **(website)** migrate from docosaurus to zola SSG - (7e8dc4e) - aleidk +- setup ci workflow - (c1c1cdb) - aleidk +- allow merge commits - (e75f0bb) - aleidk + +- - - + +Changelog generated by [cocogitto](https://github.com/cocogitto/cocogitto). \ No newline at end of file diff --git a/packages/components/CHANGELOG.md b/packages/components/CHANGELOG.md new file mode 100644 index 0000000..18e7970 --- /dev/null +++ b/packages/components/CHANGELOG.md @@ -0,0 +1,20 @@ +# Changelog +All notable changes to this project will be documented in this file. See [conventional commits](https://www.conventionalcommits.org/) for commit guidelines. + +- - - +## @mini-strap/components-v0.1.0 - 2024-12-30 +#### Bug Fixes +- **(components)** replace initialization of components to prevent overrides - (8cbd097) - aleidk +- **(components)** properly export html components - (48cafe8) - aleidk +#### Features +- **(components)** allow to only hide offcanvas on breakpoint - (37a1551) - aleidk +- **(components)** add offcanvas component - (c47a2ef) - aleidk +- **(components)** add the accordion component - (e0ed5a5) - aleidk +- **(components)** add basic components - (d4a1114) - aleidk +- **(core)** add styles for vanilla form elements - (e754e40) - aleidk +#### Miscellaneous Chores +- setup ci workflow - (c1c1cdb) - aleidk + +- - - + +Changelog generated by [cocogitto](https://github.com/cocogitto/cocogitto). \ No newline at end of file diff --git a/packages/components/package.json b/packages/components/package.json index 1b172f0..3788988 100644 --- a/packages/components/package.json +++ b/packages/components/package.json @@ -1,6 +1,6 @@ { "name": "@mini-strap/components", - "version": "0.0.1", + "version": "0.1.0", "type": "module", "scripts": { "ci:publish": "bun publish --production --frozen-lockfile" diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md new file mode 100644 index 0000000..0aeae28 --- /dev/null +++ b/packages/core/CHANGELOG.md @@ -0,0 +1,29 @@ +# Changelog +All notable changes to this project will be documented in this file. See [conventional commits](https://www.conventionalcommits.org/) for commit guidelines. + +- - - +## @mini-strap/core-v0.1.0 - 2024-12-30 +#### Bug Fixes +- **(core)** update old css variables names - (9c6d935) - aleidk +- remove deprecation warnings from sass - (b452baa) - aleidk +#### Build system +- fix build setup - (8442bbb) - aleidk +#### Features +- **(components)** allow to only hide offcanvas on breakpoint - (37a1551) - aleidk +- **(components)** add offcanvas component - (c47a2ef) - aleidk +- **(components)** add basic components - (d4a1114) - aleidk +- **(website)** add offcanvas documentation - (c0a20f8) - aleidk +- **(website)** add build script for frontend dependencies - (698294c) - aleidk +#### Miscellaneous Chores +- setup ci workflow - (c1c1cdb) - aleidk + +- - - + +## v0.0.0 - 2024-12-30 +#### Features +- **(core)** add styles for vanilla tables - (cf0b401) - aleidk +- **(core)** add styles for vanilla form elements - (e754e40) - aleidk + +- - - + +Changelog generated by [cocogitto](https://github.com/cocogitto/cocogitto). \ No newline at end of file diff --git a/packages/core/package.json b/packages/core/package.json index 751adda..ce77f34 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@mini-strap/core", - "version": "0.0.1", + "version": "0.1.0", "type": "module", "exports": { ".": "./src/style.scss", diff --git a/packages/website/CHANGELOG.md b/packages/website/CHANGELOG.md new file mode 100644 index 0000000..a8d8084 --- /dev/null +++ b/packages/website/CHANGELOG.md @@ -0,0 +1,35 @@ +# Changelog +All notable changes to this project will be documented in this file. See [conventional commits](https://www.conventionalcommits.org/) for commit guidelines. + +- - - +## @mini-strap/website-v0.1.0 - 2024-12-30 +#### Bug Fixes +- **(components)** replace initialization of components to prevent overrides - (8cbd097) - aleidk +- add dummy publish script for website - (20cadc8) - aleidk +#### Build system +- fix build setup - (8442bbb) - aleidk +#### Features +- **(components)** allow to only hide offcanvas on breakpoint - (37a1551) - aleidk +- **(components)** add offcanvas component - (c47a2ef) - aleidk +- **(components)** add the accordion component - (e0ed5a5) - aleidk +- **(components)** add basic components - (d4a1114) - aleidk +- **(website)** add accordion documentation - (319d56d) - aleidk +- **(website)** add offcanvas documentation - (c0a20f8) - aleidk +- **(website)** add content structure files - (7af58fe) - aleidk +- **(website)** add html components imports to build script - (e9db7de) - aleidk +- **(website)** add build script for frontend dependencies - (698294c) - aleidk +#### Miscellaneous Chores +- **(website)** migrate from docosaurus to zola SSG - (7e8dc4e) - aleidk +- **(website)** add docosaurus as SSG - (85660ac) - Alexander Navarro +- setup ci workflow - (c1c1cdb) - aleidk + +- - - + +## v0.0.0 - 2024-12-30 +#### Features +- **(core)** add styles for vanilla tables - (cf0b401) - aleidk +- **(core)** add styles for vanilla form elements - (e754e40) - aleidk + +- - - + +Changelog generated by [cocogitto](https://github.com/cocogitto/cocogitto). \ No newline at end of file From 812e55e13a6b5e6732c6502a7ca34609b6fb2de8 Mon Sep 17 00:00:00 2001 From: aleidk Date: Fri, 14 Feb 2025 15:05:46 -0300 Subject: [PATCH 3/6] chore: update build script --- .forgejo/workflows/publish.yaml | 3 ++- cog.toml | 7 ++----- packages/core/package.json | 4 ++-- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/.forgejo/workflows/publish.yaml b/.forgejo/workflows/publish.yaml index 0f6ce94..5f1ea52 100644 --- a/.forgejo/workflows/publish.yaml +++ b/.forgejo/workflows/publish.yaml @@ -35,10 +35,11 @@ jobs: run: "bun install" - name: Bump version and publish - uses: https://github.com/eshepelyuk/cocogitto-diya@v1 + uses: https://github.com/cocogitto/cocogitto-action@v3.10 env: NPM_REGISTRY_TOKEN: ${{ secrets.NPM_TOKEN_FORGEJO }} with: release: true + check-latest-tag-only: true git-user: 'Cog Bot' git-user-email: 'cog@alecodes.page' diff --git a/cog.toml b/cog.toml index e62b659..a38f600 100644 --- a/cog.toml +++ b/cog.toml @@ -8,16 +8,13 @@ branch_whitelist = [] skip_ci = "[skip ci]" skip_untracked = false pre_bump_hooks = [] -post_bump_hooks = [ - "git push", - "git push origin {{version_tag}}", -] +post_bump_hooks = ["git push", "git push origin {{version_tag}}"] pre_package_bump_hooks = [ "echo 'bump package {{package}} to {{version}}'", "sed -E -i 's/(\"version\":) \"[0-9.]{5}\"/\\1 \"{{version}}\"/gi' package.json", "bun run ci:publish", ] -post_package_bump_hooks = [] +post_package_bump_hooks = ["git push", "git push origin {{version_tag}}"] [git_hooks] diff --git a/packages/core/package.json b/packages/core/package.json index ce77f34..72fe5e0 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -7,8 +7,8 @@ "./mixins": "./src/_mixins.scss" }, "scripts": { - "build": "bun sass --style compressed src/style.scss dist/style.css", - "ci:publish": "bun run build && bun publish --production --frozen-lockfile --silent" + "build": "bun sass --style compressed src/style.scss", + "ci:publish": "bun run build dist/style.css && bun publish --production --frozen-lockfile --silent" }, "devDependencies": { "@types/bun": "latest", From 93da2ccbad45e22fbe5d94151609729f47d6abbd Mon Sep 17 00:00:00 2001 From: aleidk Date: Fri, 14 Feb 2025 15:54:46 -0300 Subject: [PATCH 4/6] chore(version): @mini-strap/core-v0.1.1 --- packages/core/CHANGELOG.md | 6 ++++++ packages/core/package.json | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md index 0aeae28..537ea3e 100644 --- a/packages/core/CHANGELOG.md +++ b/packages/core/CHANGELOG.md @@ -2,6 +2,12 @@ All notable changes to this project will be documented in this file. See [conventional commits](https://www.conventionalcommits.org/) for commit guidelines. - - - +## @mini-strap/core-v0.1.1 - 2025-02-14 +#### Miscellaneous Chores +- update build script - (812e55e) - aleidk + +- - - + ## @mini-strap/core-v0.1.0 - 2024-12-30 #### Bug Fixes - **(core)** update old css variables names - (9c6d935) - aleidk diff --git a/packages/core/package.json b/packages/core/package.json index 72fe5e0..4a88f45 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@mini-strap/core", - "version": "0.1.0", + "version": "0.1.1", "type": "module", "exports": { ".": "./src/style.scss", From e80fa615dcffef17454c1f9e2d6d88a8a5cfc697 Mon Sep 17 00:00:00 2001 From: aleidk Date: Fri, 14 Feb 2025 16:45:25 -0300 Subject: [PATCH 5/6] fix: build binary of core --- packages/core/build.ts | 99 ++++++++++++++++++++++++++++++++++++++ packages/core/package.json | 7 ++- 2 files changed, 104 insertions(+), 2 deletions(-) create mode 100644 packages/core/build.ts diff --git a/packages/core/build.ts b/packages/core/build.ts new file mode 100644 index 0000000..6182e2d --- /dev/null +++ b/packages/core/build.ts @@ -0,0 +1,99 @@ +#!/usr/bin/env bun + +import type { BuildConfig, BunPlugin, PluginBuilder } from "bun"; +import { parseArgs } from "node:util"; +import type { FileImporter } from "sass"; + +const { values, positionals } = parseArgs({ + args: Bun.argv, + options: { + production: { + type: "boolean", + short: "p", + default: true, + }, + filter: { + type: "string", + short: "f", + default: "all", + }, + }, + strict: true, + allowPositionals: true, +}); + +const outdir = positionals.at(2); + +if (!outdir) { + throw new Error("No outdir provided!"); +} + +const nodeModuleImporter: FileImporter<"async"> = { + findFileUrl(url) { + if (url.startsWith("@")) { + return new URL(import.meta.resolve(url)); + } + + return null; + }, +}; + +const sassPlugin: BunPlugin = { + name: "Sass Loader", + async setup(build: PluginBuilder) { + const sass = await import("sass"); + build.onLoad({ filter: /\.scss$/ }, async ({ path }) => { + // read and compile it with the sass compiler + const result = await sass.compileAsync(path, { + importers: [nodeModuleImporter], + }); + + return { + loader: "css", + contents: result.css, + }; + }); + }, +}; + +const assets: BuildConfig[] = []; + +const filter = values.filter ?? "all"; + +if (["all", "sass"].includes(filter)) { + assets.push({ + entrypoints: ["./src/style.scss"], + outdir: `${outdir}/css`, + naming: "[name].css", + plugins: [sassPlugin], + minify: values.production, + + // On by default in Bun v1.2+ + html: true, + experimentalCss: true, + }); +} + +// if (["all", "js", "ts"].includes(filter)) { +// assets.push({ +// entrypoints: ["./js/index.ts"], +// outdir: `${outdir}/js`, +// target: "browser", +// splitting: values.production, +// minify: values.production, +// }); +// } + +await Promise.all( + assets.map(async (item) => { + const result = await Bun.build(item); + + if (!result.success) { + throw new AggregateError(result.logs, "Build failed"); + } + + return result; + }), +); + +console.log(`${Bun.color("#a6da95", "ansi")}Assets succesfully build!\x1b[0m`); diff --git a/packages/core/package.json b/packages/core/package.json index 4a88f45..f740cb5 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -6,9 +6,12 @@ ".": "./src/style.scss", "./mixins": "./src/_mixins.scss" }, + "bin": { + "@mini-strap/core": "build.ts" + }, "scripts": { - "build": "bun sass --style compressed src/style.scss", - "ci:publish": "bun run build dist/style.css && bun publish --production --frozen-lockfile --silent" + "build": "bun sass --style compressed src/style.scss dist/style.css", + "ci:publish": "bun run build && bun publish --production --frozen-lockfile --silent" }, "devDependencies": { "@types/bun": "latest", From f571f2e663fdb7e1abcd986ea10d0de1cf6408bc Mon Sep 17 00:00:00 2001 From: Cog Bot Date: Fri, 14 Feb 2025 19:46:00 +0000 Subject: [PATCH 6/6] chore(version): v0.1.1 --- CHANGELOG.md | 9 +++++++++ packages/core/CHANGELOG.md | 6 ++++++ packages/core/package.json | 2 +- 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0485eed..da42681 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,15 @@ All notable changes to this project will be documented in this file. See [conventional commits](https://www.conventionalcommits.org/) for commit guidelines. - - - +## v0.1.1 - 2025-02-14 +### Package updates +- @mini-strap/core bumped to @mini-strap/core-v0.1.2 +### Global changes +#### Miscellaneous Chores +- update build script - (812e55e) - aleidk + +- - - + ## v0.1.0 - 2024-12-30 ### Package updates - @mini-strap/core bumped to @mini-strap/core-v0.1.0 diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md index 537ea3e..8b2cab0 100644 --- a/packages/core/CHANGELOG.md +++ b/packages/core/CHANGELOG.md @@ -2,6 +2,12 @@ All notable changes to this project will be documented in this file. See [conventional commits](https://www.conventionalcommits.org/) for commit guidelines. - - - +## @mini-strap/core-v0.1.2 - 2025-02-14 +#### Bug Fixes +- build binary of core - (e80fa61) - aleidk + +- - - + ## @mini-strap/core-v0.1.1 - 2025-02-14 #### Miscellaneous Chores - update build script - (812e55e) - aleidk diff --git a/packages/core/package.json b/packages/core/package.json index f740cb5..097ffae 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@mini-strap/core", - "version": "0.1.1", + "version": "0.1.2", "type": "module", "exports": { ".": "./src/style.scss",