Skip to content

Commit

Permalink
[migrate] replace MarkCell with Parcel MDX transformer
Browse files Browse the repository at this point in the history
[migrate] replace Yarn with PNPM to reduce Disk Usage
[add] GitHub actions of Vercel preview
[optimize] upgrade Upstream packages
  • Loading branch information
TechQuery committed Jan 24, 2024
1 parent f40a554 commit 97528b6
Show file tree
Hide file tree
Showing 13 changed files with 8,174 additions and 8,719 deletions.
35 changes: 25 additions & 10 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,39 @@ name: CI & CD
on:
push:
branches:
- master
- main
jobs:
Build-and-Deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v2
- uses: actions/checkout@v3

- uses: pnpm/action-setup@v2
with:
node-version: 14
cache: yarn
- name: Install & build
run: yarn && yarn build
- name: Deploy
version: 8
- uses: actions/setup-node@v3
with:
node-version: 18
cache: pnpm
- name: Install & Build
run: |
pnpm i --frozen-lockfile
pnpm build
- name: Deploy to GitHub pages
uses: peaceiris/actions-gh-pages@v3
with:
publish_dir: ./dist
cname: bootstrap.web-cell.dev
personal_token: ${{ secrets.GITHUB_TOKEN }}
force_orphan: true

- name: Deploy to Vercel
uses: amondnet/vercel-action@v25
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }}
github-token: ${{ secrets.GITHUB_TOKEN }}
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
working-directory: ./dist
vercel-args: --prod
36 changes: 36 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Commit preview
on:
push:
branches-ignore:
- main
jobs:
Build-and-Deploy:
env:
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v3
with:
node-version: 18
cache: pnpm
- name: Install & Build
run: |
pnpm i --frozen-lockfile
pnpm build
- name: Deploy to Vercel
uses: amondnet/vercel-action@v25
if: ${{ env.VERCEL_TOKEN && env.VERCEL_ORG_ID && env.VERCEL_PROJECT_ID }}
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }}
github-token: ${{ secrets.GITHUB_TOKEN }}
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
working-directory: ./dist
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package-lock.json
yarn.lock
node_modules/
dist/
.cache/
.vscode/
.parcel-cache/
.vscode/settings.json
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
auto-install-peers = false
7 changes: 7 additions & 0 deletions .parcelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"extends": "@parcel/config-default",
"transformers": {
"*.{ts,tsx}": ["@parcel/transformer-typescript-tsc"],
"*.{md,mdx}": ["parcel-transformer-mdx"]
}
}
10 changes: 4 additions & 6 deletions ReadMe.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
# BootCell document

Re-implemented Official **Document site** of [BootStrap][1] & [FontAwesome][2]
based on [WebCell][3], [BootCell][4] & [MarkCell][5]
based on [WebCell][3], [BootCell][4] & [MDX][5]

[![NPM Dependency](https://david-dm.org/EasyWebApp/BootCell-document.svg)][6]
[![CI & CD](https://github.com/EasyWebApp/BootCell-document/workflows/CI%20&%20CD/badge.svg)][7]
[![CI & CD](https://github.com/EasyWebApp/WebCell/actions/workflows/main.yml/badge.svg)][6]

[1]: https://getbootstrap.com/
[2]: https://fontawesome.com/
[3]: https://web-cell.dev/
[4]: https://web-cell.dev/BootCell/
[5]: https://github.com/EasyWebApp/MarkCell
[6]: https://david-dm.org/EasyWebApp/BootCell-document
[7]: https://github.com/EasyWebApp/BootCell-document/actions
[5]: https://mdxjs.com/
[6]: https://github.com/EasyWebApp/BootCell-document/actions/workflows/main.yml
70 changes: 32 additions & 38 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,39 +3,41 @@
"version": "1.0.0",
"description": "Re-implemented Official Document site of BootStrap & FontAwesome based on WebCell, BootCell & MarkCell",
"dependencies": {
"@nuintun/qrcode": "^3.1.1",
"boot-cell": "^1.9.5",
"cell-router": "~2.0.4",
"classnames": "^2.3.1",
"github-web-widget": "^3.0.0-beta.9",
"iterable-observer": "1.0.0-rc.0",
"koajax": "^0.7.1",
"@nuintun/qrcode": "^3.4.0",
"boot-cell": "^2.0.0-beta.9",
"cell-router": "^3.0.0-rc.5",
"classnames": "^2.5.1",
"dom-renderer": "^2.0.6",
"github-web-widget": "^4.0.0-rc.1",
"iterable-observer": "^1.0.1",
"koajax": "^0.9.6",
"lodash.groupby": "^4.6.0",
"markdown-ime": "^1.0.3",
"marked": "^4.0.12",
"mobx": "^5.15.7",
"mobx-web-cell": "^0.3.5",
"marked": "^11.1.1",
"mobx": "^6.12.0",
"quill": "^1.3.7",
"quill-image-uploader": "^1.2.2",
"turndown": "^7.1.1",
"quill-image-uploader": "^1.3.0",
"turndown": "^7.1.2",
"turndown-plugin-gfm": "^1.0.2",
"web-cell": "~2.3.0",
"web-utility": "^3.0.0"
"web-cell": "^3.0.0-rc.8",
"web-utility": "^4.1.3"
},
"devDependencies": {
"@octokit/openapi-types": "^11.2.0",
"@types/classnames": "^2.3.1",
"@types/lodash.groupby": "^4.6.6",
"autoprefixer": "^9.8.8",
"husky": "^7.0.4",
"less": "^4.1.2",
"lint-staged": "^12.3.3",
"mark-cell": "^0.4.9",
"parcel-bundler": "^1.12.5",
"postcss-modules": "^3.2.2",
"prettier": "^2.5.1",
"typescript": "~4.3.5",
"workbox-cli": "^6.4.2"
"@octokit/openapi-types": "^19.1.0",
"@parcel/config-default": "~2.11.0",
"@parcel/packager-raw-url": "~2.11.0",
"@parcel/transformer-less": "~2.11.0",
"@parcel/transformer-typescript-tsc": "~2.11.0",
"@parcel/transformer-webmanifest": "~2.11.0",
"@types/lodash.groupby": "^4.6.9",
"@types/mdx": "^2.0.10",
"husky": "^8.0.3",
"lint-staged": "^15.2.0",
"parcel": "~2.11.0",
"parcel-transformer-mdx": "^0.3.0",
"prettier": "^3.2.4",
"typescript": "~5.3.3",
"workbox-cli": "^7.0.0"
},
"prettier": {
"singleQuote": true,
Expand All @@ -46,19 +48,11 @@
"lint-staged": {
"*.{html,md,mdx,less,json,yml,ts,tsx}": "prettier --write"
},
"postcss": {
"modules": true,
"plugins": {
"autoprefixer": {
"grid": true
}
}
},
"scripts": {
"test": "lint-staged",
"pack-mdx": "mark-cell document/source -p web-cell -f createCell",
"clean": "rm -rf .parcel-cache/ dist/",
"pack-tsx": "parcel build source/index.html --public-url .",
"build": "rm -rf dist/ document/dist/ && npm run pack-mdx && npm run pack-tsx && workbox generateSW",
"start": "npm run pack-mdx && parcel source/index.html --open"
"build": "npm run clean && npm run pack-tsx && workbox generateSW",
"start": "npm run clean && parcel source/index.html --open"
}
}
Loading

1 comment on commit 97528b6

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deploy preview for bootcell-document ready!

✅ Preview
https://bootcell-document-axm06wcfr-techquery.vercel.app

Built with commit 97528b6.
This pull request is being automatically deployed with vercel-action

Please sign in to comment.