Skip to content

Commit

Permalink
feat: script update content
Browse files Browse the repository at this point in the history
  • Loading branch information
Faelayis committed Sep 9, 2023
1 parent c27b453 commit 70a2cbf
Show file tree
Hide file tree
Showing 12 changed files with 1,101 additions and 318 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Update
on:
workflow_dispatch:
push:

jobs:
update:
name: Update Content
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup PNPM
uses: pnpm/action-setup@v2
with:
run_install: false
version: 8

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 16
cache: pnpm

- name: Install Dependencies
run: pnpm install --ignore-scripts

- name: Run Script
run: pnpm script:run

- name: Automatically Commit Changed
uses: stefanzweifel/git-auto-commit-action@v4
with:
push_options: "--force"
commit_options: "--no-verify"
commit_message: "chore(script): update content"
skip_checkout: true
11 changes: 11 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# github
.github

# dependency directories
node_modules

# ignore files for PNPM
pnpm-lock.yaml

# script update content
*/*/*.md
9 changes: 9 additions & 0 deletions COM-1308/metedata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"$schema": "../schema/metedata.json",
"coursecode": "COM-1308",
"name": "หลักการออกแบบและการเขียนโปรแกรม",
"preview": {
"enable": true,
"files": ["c"]
}
}
66 changes: 53 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,31 +1,71 @@
{
"name": "cmru-lab-learn",
"license": "apache-2.0",
"packageManager": "pnpm@8.6.12",
"author": "Faelayis <48393914+Faelayis@users.noreply.github.com>",
"type": "module",
"license": "apache-2.0",
"engines": {
"node": ">=16",
"pnpm": ">=8"
},
"scripts": {
"preinstall": "npx only-allow pnpm",
"prettier": "prettier --write . --ignore-unknown && pnpm prettier:json",
"prettier:json": "pnpm prettier-package-json --write **/package.json --use-tabs false"
"prettier": "prettier --write . --ignore-unknown",
"script:run": "pnpm tsm ./script/index.ts"
},
"devDependencies": {
"@trivago/prettier-plugin-sort-imports": "4.2.0",
"@types/node": "20.6.0",
"fast-glob": "3.3.1",
"prettier": "3.0.3",
"prettier-package-json": "2.8.0",
"prettier-plugin-sort-json": "3.0.1"
},
"engines": {
"node": ">=16",
"pnpm": ">=8"
"prettier-plugin-pkgsort": "0.2.1",
"prettier-plugin-sort-json": "3.0.1",
"tslib": "2.6.2",
"tsm": "2.3.0",
"typescript": "4.6.4"
},
"prettier": {
"bracketSameLine": true,
"bracketSpacing": true,
"plugins": [
"prettier-plugin-sort-json"
],
"printWidth": 180,
"semi": true,
"singleQuote": false,
"tabWidth": 4,
"trailingComma": "all",
"useTabs": true
"useTabs": true,
"overrides": [
{
"files": [
"*.ts",
"*.d.ts"
],
"options": {
"plugins": [
"@trivago/prettier-plugin-sort-imports"
],
"importOrderSeparation": true,
"importOrderSortSpecifiers": true
}
},
{
"files": "*.json",
"excludeFiles": [
"package.json"
],
"options": {
"plugins": [
"prettier-plugin-sort-json"
]
}
},
{
"files": "package.json",
"options": {
"plugins": [
"prettier-plugin-pkgsort"
]
}
}
]
}
}
Loading

0 comments on commit 70a2cbf

Please sign in to comment.