Skip to content

Commit

Permalink
test: add check dist css
Browse files Browse the repository at this point in the history
  • Loading branch information
YunYouJun committed Dec 29, 2024
1 parent 921ba14 commit 73d3773
Show file tree
Hide file tree
Showing 8 changed files with 585 additions and 21 deletions.
25 changes: 16 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,25 @@ jobs:
- name: Typecheck
run: pnpm run typecheck

build:
runs-on: ubuntu-latest
test:
runs-on: ${{ matrix.os }}

strategy:
matrix:
node-version: [lts/*]
os: [ubuntu-latest]
fail-fast: false

steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
- uses: actions/setup-node@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: lts/*
node-version: ${{ matrix.node-version }}
registry-url: https://registry.npmjs.org/
cache: pnpm

- name: Install
run: pnpm install

- name: Build SCSS
run: pnpm run build
- run: pnpm install
- run: pnpm run build
- run: pnpm run test
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
[![npm](https://img.shields.io/npm/dt/star-markdown-css.svg)](https://npm-stat.com/charts.html?package=star-markdown-css)
![npm bundle size (minified + gzip)](https://img.shields.io/bundlephobia/minzip/star-markdown-css.svg)
![npm bundle size (minified)](https://img.shields.io/bundlephobia/min/star-markdown-css.svg)
[![jsDelivr hits (npm)](https://img.shields.io/jsdelivr/npm/hm/star-markdown-css)](https://cdn.jsdelivr.net/npm/star-markdown-css/dist/yun/yun-markdown.min.css)
[![jsDelivr hits (npm)](https://img.shields.io/jsdelivr/npm/hm/star-markdown-css)](https://cdn.jsdelivr.net/npm/star-markdown-css/dist/yun/markdown.min.css)

- [Demo](https://yunyoujun.github.io/star-markdown-css/)

Expand All @@ -28,8 +28,8 @@

### CDN

- JSDELIVR: <https://cdn.jsdelivr.net/npm/star-markdown-css/dist/planet/planet-markdown.min.css>
- unpkg: <https://unpkg.com/star-markdown-css/dist/planet/planet-markdown.min.css>
- JSDELIVR: <https://cdn.jsdelivr.net/npm/star-markdown-css/dist/planet/markdown.min.css>
- unpkg: <https://unpkg.com/star-markdown-css/dist/planet/markdown.min.css>

### Yarn Or NPM

Expand All @@ -49,7 +49,7 @@ npm install star-markdown-css
Just use css with link tag.

```html
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/star-markdown-css/dist/planet/planet-markdown.min.css" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/star-markdown-css/dist/planet/markdown.min.css" />
```

#### Example In HTML
Expand All @@ -59,7 +59,7 @@ In html.
```html
<html>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/star-markdown-css/dist/planet/planet-markdown.min.css" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/star-markdown-css/dist/planet/markdown.min.css" />
<style>
.markdown-body {
box-sizing: border-box;
Expand Down
1 change: 1 addition & 0 deletions config/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const themes = ['yun', 'planet', 'blood', 'earth'] as const
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"planet",
"blood"
],
"main": "dist/planet/planet-markdown.min.css",
"main": "dist/yun/markdown.min.css",
"files": [
"dist/**/*.css",
"src/**/*.scss"
Expand All @@ -32,7 +32,8 @@
"dev": "pnpm -C demo run dev",
"lint": "eslint .",
"release": "bumpp --commit --push --tag",
"typecheck": "vue-tsc --noEmit"
"typecheck": "vue-tsc --noEmit",
"test": "vitest"
},
"devDependencies": {
"@antfu/eslint-config": "^3.12.1",
Expand All @@ -53,6 +54,7 @@
"tsx": "^4.19.2",
"typescript": "^5.7.2",
"unbuild": "^3.2.0",
"vitest": "^2.1.8",
"vue-tsc": "^2.2.0"
}
}
Loading

0 comments on commit 73d3773

Please sign in to comment.