Skip to content

Commit

Permalink
Merge pull request #30 from brklntmhwk/28-tweak
Browse files Browse the repository at this point in the history
refactor(overall): ✨ tweak some code
  • Loading branch information
brklntmhwk authored Aug 8, 2024
2 parents 2c77bc3 + a2bfce3 commit 7ade714
Show file tree
Hide file tree
Showing 18 changed files with 193 additions and 194 deletions.
8 changes: 4 additions & 4 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
"unifiedjs.vscode-mdx",
"github.vscode-github-actions",
"eliostruyf.vscode-front-matter",
"ms-azuretools.vscode-docker"
"ms-azuretools.vscode-docker",
"tamasfe.even-better-toml",
"redhat.vscode-yaml"
]
}
},
Expand All @@ -24,9 +26,7 @@
"onAutoForward": "openBrowserOnce"
}
},
"forwardPorts": [
4321
],
"forwardPorts": [4321],
"overrideCommand": true,
"postCreateCommand": "/bin/sh .devcontainer/postCreateCommand.sh"
}
6 changes: 2 additions & 4 deletions .github/ISSUE_TEMPLATE/01_basic.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,11 @@ assignees: brklntmhwk
- xxxxx

## As-is

The as-is around this issue
<!-- The as-is around this issue -->

- xxxxx

## To-be

The to-be as a result of upcoming changes
<!-- The to-be as a result of upcoming changes -->

- xxxxx
5 changes: 2 additions & 3 deletions .github/ISSUE_TEMPLATE/03_tweak.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
---
name: Tweak
about: Use this when you want to make tweaks around
title: 'tweak A, B and C'
title: 'tweak'
labels: 'tweak'
assignees: brklntmhwk
---

## Tweaks to be made

Specify what to tweak below.
<!-- Specify what to tweak as much as you're planning at the moment. (List all tweaks later in a pull request) -->

- xxxxx
9 changes: 3 additions & 6 deletions .github/PULL_REQUEST_TEMPLATE/01_basic.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
## Changes

List up changes you've made below.
<!-- List up changes you've made below. -->

- xxxxx

## Checklist

Let team members know what to check in the peer review process.
<!-- Let team members know what to check in the peer review process. -->

- xxxxx

## Notes

Add whatever you want to let team members know about the changes. Write "Nothing" if you have nothing special.
<!-- Add whatever you want to let team members know about the changes. Write "Nothing" if you have nothing special. -->

- xxxxx
9 changes: 3 additions & 6 deletions .github/PULL_REQUEST_TEMPLATE/02_content.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
## Changes

List up changes you've made below.
<!-- List up changes you've made below. -->

- Add/Update/Delete an article
- The title: xxxxx

## Checklist

Let team members know what to check in the peer review process.
<!-- Let team members know what to check in the peer review process. -->

- Typos in the article
- Missing info
- Accuracy in the info provided in the article

## Notes

Add whatever you want to let team members know about the changes. Write "Nothing" if you have nothing special.
<!-- Add whatever you want to let team members know about the changes. Write "Nothing" if you have nothing special. -->

- xxxxx
9 changes: 3 additions & 6 deletions .github/PULL_REQUEST_TEMPLATE/03_tweak.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
## Changes

List up changes you've made below.
<!-- List up changes you've made below. -->

- xxxxx

## Checklist

Let team members know what to check in the peer review process.
<!-- Let team members know what to check in the peer review process. -->

- Potential side-effects arisen from the changes

## Notes

Add whatever you want to let team members know about the changes. Write "Nothing" if you have nothing special.
<!-- Add whatever you want to let team members know about the changes. Write "Nothing" if you have nothing special. -->

- xxxxx
5 changes: 5 additions & 0 deletions .github/workflows/danger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ on:
pull_request:
types: [edited, opened, reopened, synchronize]

permissions:
contents: read
pull-requests: write
statuses: write

jobs:
danger:
name: Run Danger JS on Pull Request
Expand Down
21 changes: 14 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,9 @@ This project adopts Issue-driven Development.
> - After peer code reviews and passing your team's conventional rules, changes are finally merged into the main branch
1. On [the issue page](https://github.com/brklntmhwk/younagi.dev/issues), create an issue
- Preferably add a label that matches the purpose of your issue
- Select a template that matches the purpose of your issue
- Add a label that describes the purpose well on an as-needed basis
- Some templates has the default setting so you don't have to do so
- In your issue, clarify the following points
- The purpose
- As-is
Expand All @@ -91,20 +93,21 @@ This project adopts Issue-driven Development.
- Hereafter, you're supposed to be at the project root
4. Execute `git pull origin [[the branch name]]` to keep your local up to date
5. Start coding!
1. [Setup](#setup-for-coding)
1. [Setup outside the container](#setup-for-coding)
2. Open the VSCode command palette
3. Select "Dev Containers: Reopen Container"
- It starts rebuilding the container if needed
- It might take longer the first time
4. [Setup](#setup-for-coding)
4. [Setup inside the container](#setup-for-coding)
6. After you're finished coding, execute `git add .` > `git cz`, add commit info answering prompts, and then execute `git push origin [[the branch name]]`
7. Go to [the project's repo](https://github.com/brklntmhwk/younagi.dev) and create a pull request for changes you've made
- The title of pull requests must be in this format: `<type>(<scope>): detailed descriptions here...`
- Check the changelog config or dangerfile for allowed types & scopes
- e.g., "feat(ui): 🆕 add a likes button"
- In your pull request, clarify the following points:
- Changes
- Checklist
- Use a template by hitting the URL like below
- `https://github.com/brklntmhwk/younagi.dev/compare/main...${BRANCH_NAME}?template=${TEMPLATE_NAME}`
- For the `TEMPLATE_NAME`, see under the ".github/PULL_REQUEST_TEMPLATE/" directory
- e.g., `...?template=01_basic.md`
8. Fix your code over the course of peer code review on an as-needed basis
- Once the whole team gives you the green light, changes you've made will be merged into the main branch
9. Confirm if the merge is done without any problem and then delete the remote branch from [this page](https://github.com/brklntmhwk/younagi.dev/branches)
Expand All @@ -122,4 +125,8 @@ This project adopts Issue-driven Development.

1. Set the `LOCAL_DB_PATH` var looking up the dir ".wrangler/state/v3/d1/miniflare-D1DatabaseObject/"
2. Run `bun dev --host` to start the dev server
3. Go to "http://localhost:4321/"
3. Access the localhost URL shown

## License

This project is licensed under the MIT License, see the [LICENSE](./LICENSE) file for more details.
68 changes: 34 additions & 34 deletions astro.config.ts
Original file line number Diff line number Diff line change
@@ -1,42 +1,42 @@
import { defineConfig, passthroughImageService } from 'astro/config'
import cloudflare from '@astrojs/cloudflare'
import mdx from '@astrojs/mdx'
import sitemap from '@astrojs/sitemap'
import solidJs from '@astrojs/solid-js'
import purgecss from 'astro-purgecss'
import browserslist from 'browserslist'
import { browserslistToTargets } from 'lightningcss'
import { vanillaExtractPlugin } from '@vanilla-extract/vite-plugin'
import { h } from 'hastscript'
import remarkGfm from 'remark-gfm'
import remarkMath from 'remark-math'
import rehypeKatex from 'rehype-katex'
import cloudflare from '@astrojs/cloudflare';
import mdx from '@astrojs/mdx';
import sitemap from '@astrojs/sitemap';
import solidJs from '@astrojs/solid-js';
import { vanillaExtractPlugin } from '@vanilla-extract/vite-plugin';
import purgecss from 'astro-purgecss';
import { defineConfig, passthroughImageService } from 'astro/config';
import browserslist from 'browserslist';
import { h } from 'hastscript';
import { browserslistToTargets } from 'lightningcss';
import rehypeAutolinkHeadings, {
type Options as RehypeAutoLinkHeadingsOptions,
} from 'rehype-autolink-headings'
import rehypeSlug from 'rehype-slug'
} from 'rehype-autolink-headings';
import rehypeKatex from 'rehype-katex';
import rehypePrettyCode, {
type Options as RehypePrettyCodeOptions,
} from 'rehype-pretty-code'
import rehypeImageFigure from './src/plugins/rehype-image-figure'
import rehypePagefindIgnore from './src/plugins/rehype-pagefind-ignore'
import remarkCallout from './src/plugins/remark-callout'
import remarkAstroImageAssets from './src/plugins/remark-astro-image-assets'
import remarkFootnote from './src/plugins/remark-footnote'
import remarkLinkCard from './src/plugins/remark-link-card'
import remarkLineBreaks from './src/plugins/remark-line-breaks'
} from 'rehype-pretty-code';
import rehypeSlug from 'rehype-slug';
import remarkGfm from 'remark-gfm';
import remarkMath from 'remark-math';
import { iconNameTypes } from './src/lib/astro-integrations/icon-name-type';
import { pagefind } from './src/lib/astro-integrations/pagefind';
import { SITE_URL } from './src/lib/consts';
import rehypeImageFigure from './src/plugins/rehype-image-figure';
import rehypePagefindIgnore from './src/plugins/rehype-pagefind-ignore';
import remarkAstroImageAssets from './src/plugins/remark-astro-image-assets';
import remarkCallout from './src/plugins/remark-callout';
import remarkEmbed, {
type RemarkEmbedOptions,
} from './src/plugins/remark-embed'
} from './src/plugins/remark-embed';
import remarkFootnote from './src/plugins/remark-footnote';
import remarkLineBreaks from './src/plugins/remark-line-breaks';
import remarkLinkCard from './src/plugins/remark-link-card';
import {
canvaTransformer,
googleSlidesTransformer,
youTubeTransformer,
oEmbedTransformer,
} from './src/plugins/transformers'
import { SITE_URL } from './src/lib/consts'
import { pagefind } from "./src/lib/astro-integrations/pagefind"
import { iconNameTypes } from "./src/lib/astro-integrations/icon-name-type"
youTubeTransformer,
} from './src/plugins/transformers';

// https://astro.build/config
export default defineConfig({
Expand All @@ -59,7 +59,7 @@ export default defineConfig({
}),
sitemap(),
iconNameTypes(),
pagefind()
pagefind(),
],
prefetch: {
defaultStrategy: 'viewport',
Expand Down Expand Up @@ -91,8 +91,8 @@ export default defineConfig({
server: {
watch: {
usePolling: true,
interval: 1000
}
interval: 1000,
},
},
ssr: {
external: ['node:fs', 'unfurl.js'],
Expand Down Expand Up @@ -139,7 +139,7 @@ export default defineConfig({
{
title: 'Anchor link',
},
['#']
['#'],
),
} satisfies RehypeAutoLinkHeadingsOptions,
],
Expand All @@ -156,4 +156,4 @@ export default defineConfig({
rehypePagefindIgnore,
],
},
})
});
76 changes: 49 additions & 27 deletions changelog.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -14,41 +14,63 @@ module.exports = {
],
maxMessageLength: 72,
minMessageLength: 3,
questions: ['type', 'scope', 'subject', 'body', 'breaking', 'issues', 'lerna'],
scopes: ['api', "cms", 'config', 'contents', 'db', 'deps', 'docker', 'i18n', 'none', 'ui', "utils"],
questions: [
'type',
'scope',
'subject',
'body',
'breaking',
'issues',
'lerna',
],
scopes: [
'api',
'cms',
'config',
'contents',
'db',
'deps',
'docker',
'i18n',
'none',
'overall',
'ui',
'utils',
],
types: {
chore: {
description: "Build process or auxiliary tool changes",
emoji: "🤖",
value: "chore",
description: 'Build process or auxiliary tool changes',
emoji: '🤖',
value: 'chore',
},
ci: {
description: "CI related changes",
emoji: "🎡",
value: "ci",
description: 'CI related changes',
emoji: '🎡',
value: 'ci',
},
docs: {
description: "Doc or article tweaks only",
emoji: "📖",
value: "docs",
description: 'Doc or article tweaks only',
emoji: '📖',
value: 'docs',
},
feat: {
description: "A new feature",
emoji: "🆕",
value: "feat",
description: 'A new feature',
emoji: '🆕',
value: 'feat',
},
fix: {
description: "A bug fix",
emoji: "🐛",
value: "fix",
description: 'A bug fix',
emoji: '🐛',
value: 'fix',
},
perf: {
description: "A code tweak for performance enhancement",
emoji: "⚡️",
value: "perf",
description: 'A code tweak for performance enhancement',
emoji: '⚡️',
value: 'perf',
},
refactor: {
description: 'A code tweak that neither fixes a bug or adds a new feature(rename a variable etc...)',
description:
'A code tweak that neither fixes a bug or adds a new feature(rename a variable etc...)',
emoji: '✨',
value: 'refactor',
},
Expand All @@ -59,14 +81,14 @@ module.exports = {
},
style: {
description:
"Formatting tweaks(Markup, white-space, missing semi-colons etc...)",
emoji: "💄",
value: "style",
'Formatting tweaks(Markup, white-space, missing semi-colons etc...)',
emoji: '💄',
value: 'style',
},
test: {
description: "Tweaks for tests",
emoji: "✒️",
value: "test",
description: 'Tweaks for tests',
emoji: '✒️',
value: 'test',
},
},
};
Loading

0 comments on commit 7ade714

Please sign in to comment.