Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(alpine): add new package #14

Merged
merged 18 commits into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 15 additions & 5 deletions .github/copilot-instruction.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ As an advanced web developer, prioritize code maintainability, readability, and
- Utilize in-ecosystem packages developed by our team.
- Use the NoSQL database developed by our team.
- Alpine Store for state management.
- Use FSM for state machines by our team for many part of client-side logics.
- Use FSM for state machines by our team for many parts of client-side logic.
- Use logger for logging by our team for each function.

## Commenting
Expand All @@ -34,11 +34,21 @@ As an advanced web developer, prioritize code maintainability, readability, and
7. Include links to external references where helpful.
8. Add comments when fixing bugs.
9. Use comments to mark incomplete implementations.
10. minimize usage of jsdoc comments.
10. Minimize usage of JSDoc comments.

## Other

1. call me `bro`.
1. Call me `bro`.
2. Please consider the logic and if my opinion is against your opinion, please don't accept it immediately and just check it again and give reasons.
3. Do not speak too formally and sloppily, Feel like you're talking to your friend.
4. Explain with simple english.
3. Do not speak too formally and sloppily, feel like you're talking to your friend.
4. Explain with simple English.

## Document Rules

1. **Be Concise**: Write documents that are to the point, clear, and concise. Avoid unnecessary details or fluff.
2. **Structure the Document Well**: Use headings, subheadings, bullet points, and numbered lists to organize information logically. Make it easy to navigate.
3. **Clarity and Simplicity**: The document should be understandable by anyone, even those unfamiliar with the specific topic. Use simple language and define technical terms.
4. **Include Examples**: Provide practical examples wherever possible. Show how things are done rather than just explaining concepts.
5. **Focus on the Audience**: Tailor the document to the intended audience. If it’s for developers, focus on technical details. If it’s for a broader audience, simplify the language and provide context.
6. **Be Consistent**: Ensure consistency in style, format, and terminology throughout the document. Follow a specific style guide if applicable.
7. **Document Limitations and Known Issues**: Be transparent about any known limitations or issues. This helps set expectations and avoids confusion.
75 changes: 75 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json

name: Build & Lint & Test & Release

on:
workflow_dispatch:

env:
NODE_VERSION: lts/*
GPG_KEY_ID: ${{ vars.GPG_KEY_ID }}

jobs:
main:
name: Build & Lint & Test & Release
runs-on: ubuntu-latest

permissions:
contents: write

steps:
- name: ⤵️ Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: 🙂‍↔️ Import GPG key
run: |
echo "${{ secrets.GPG_PRIVATE_KEY }}" | gpg --batch --import
echo -e "5\ny\n" | gpg --batch --yes --command-fd 0 --edit-key ${{ env.GPG_KEY_ID }} trust quit
env:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}

- name: 🫡 Setup Git
run: |
git config --global user.name "njfamirm-bot"
git config --global user.email "bot@njfamirm.ir"
git config --global user.signingkey ${{ env.GPG_KEY_ID }}
git config --global commit.gpgsign true

- name: 🏗 Setup nodejs
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}

- name: 🏗 Setup nodejs corepack
run: corepack enable

- name: 🏗 Get yarn config
id: yarn_config
run: echo "cache_folder=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT

- name: 🏗 Cache Layer
uses: actions/cache@v4
with:
path: ${{ steps.yarn_config.outputs.cache_folder }}
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-

- name: 🏗 Install dependencies
run: yarn install --immutable

- name: 🚀 Build Typescript
run: yarn build

- name: 🚀 Run ESLint
run: yarn lint

- name: 🧪 Run Test
run: yarn test

- name: 🤖 Get Release
run: yarn release -y
env:
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }}
2 changes: 1 addition & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
checksumBehavior: update
# checksumBehavior: update

enableTelemetry: false

Expand Down
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ This repository contains numerous small utility packages. These packages serve v

Here is a brief overview of the included libraries:

1. [`element`](./packages/element#readme): Lit based utils.
1. [`element`](./packages/element): Utility functions and mixins for building high-performance web components with Lit.
2. [`alpine`](./packages/alpine): Utility functions to enhance Alpine.js usage with backup support.
3. [`typescript-config`](./packages/typescript-config): Base TypeScript configuration for Nexim projects.
4. [`prettier-config`](./packages/prettier-config): Base Prettier configuration for Nexim projects.
5. [`eslint-config`](./packages/eslint-config): Base Eslint configuration for Nexim projects.

For more detailed information and guidelines on how to use each package, please refer to each package's README.

Expand Down
3 changes: 2 additions & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@
},
{
"type": "chore",
"section": "Miscellaneous Chores"
"section": "Miscellaneous Chores",
"hidden": true
},
{
"type": "docs",
Expand Down
Loading
Loading