Skip to content

Commit

Permalink
release: 0.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
blurfx committed Aug 6, 2023
1 parent d9e794f commit 63a0972
Show file tree
Hide file tree
Showing 10 changed files with 94 additions and 81 deletions.
6 changes: 0 additions & 6 deletions .changeset/itchy-chefs-help.md

This file was deleted.

6 changes: 6 additions & 0 deletions .changeset/nice-papayas-trade.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@calor/highlighter': patch
'@calor/core': patch
---

Support JavaScript, TypeScript and Golang
46 changes: 0 additions & 46 deletions .github/workflows/changeset.yml

This file was deleted.

37 changes: 37 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Lint

on:
pull_request:
branches: [ main ]
types: [ opened, reopened, synchronize ]
push:
branches:
- main

jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: pnpm/action-setup@v2
name: Install pnpm
id: pnpm-install
with:
version: 8
run_install: false
- uses: actions/setup-node@v3
with:
node-version: 18.x
cache: 'pnpm'
- uses: actions/cache@v1
with:
path: ~/.pnpm-store
key: pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: pnpm-
- name: Install Dependencies
run: pnpm i --frozen-lockfile
- name: Lint
run: pnpm lint
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"pre-commit": "pnpm run --filter \"@calor/*\" pre-commit",
"ci:version": "changeset version && pnpm install --no-frozen-lockfile",
"ci:publish": "pnpm build && changeset publish && pnpm install",
"lint": "pnpm run --filter \"@calor/*\" build && pnpm run --filter \"@calor/*\" lint",
"ci:version": "changeset version",
"ci:publish": "pnpm run --filter \"@calor/*\" build && changeset publish",
"prepare": "husky install"
},
"keywords": [],
Expand Down
8 changes: 7 additions & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,19 @@
"build": "tsup",
"test": "vitest",
"pre-commit": "lint-staged",
"typecheck": "tsc --noEmit --project ."
"typecheck": "tsc --noEmit --project .",
"dry:eslint": "eslint --ext .ts,.tsx ./src ./tests",
"dry:prettier": "prettier --check ./src ./tests",
"lint": "pnpm run typecheck && pnpm run dry:eslint && pnpm run dry:prettier"
},
"devDependencies": {
"eslint-config-calor": "workspace:*",
"tsup": "^6.7.0",
"typescript": "^5.0.2",
"vite": "^4.3.2",
"vitest": "^0.31.0"
},
"publishConfig": {
"access": "public"
}
}
1 change: 1 addition & 0 deletions packages/highlighter/.lintstagedrc.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export default {
'src/**/*.{ts,tsx}': () => 'pnpm typecheck',
'src/**/*.{js,jsx,ts,tsx}': ['prettier --write', 'eslint --fix'],
'src/**/*.{css}': ['prettier --write'],
};
8 changes: 7 additions & 1 deletion packages/highlighter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@
"scripts": {
"build": "tsup",
"pre-commit": "lint-staged",
"typecheck": "tsc --noEmit --project ."
"typecheck": "tsc --noEmit --project .",
"dry:eslint": "eslint --ext .ts,.tsx ./src",
"dry:prettier": "prettier --check ./src",
"lint": "pnpm run typecheck && pnpm run dry:eslint && pnpm run dry:prettier"
},
"keywords": [],
"author": "",
Expand All @@ -27,5 +30,8 @@
},
"peerDependencies": {
"@calor/core": "^0.0.1"
},
"publishConfig": {
"access": "public"
}
}
30 changes: 17 additions & 13 deletions packages/highlighter/src/themes/github-dark.css
Original file line number Diff line number Diff line change
@@ -1,32 +1,36 @@
.calor-wrapper {
background-color: #0d1117;
background-color: #0d1117;
}

.calor-plain, .calor-symbol {
color: #e6edf3;
.calor-plain,
.calor-symbol {
color: #e6edf3;
}

.calor-keyword, .calor-bool, .calor-operator {
color: #ff7b72;
.calor-keyword,
.calor-bool,
.calor-operator {
color: #ff7b72;
}

.calor-number, .calor-function {
color: #79c0ff;
.calor-number,
.calor-function {
color: #79c0ff;
}

.calor-comment {
color: #8b949e;
font-style: italic;
color: #8b949e;
font-style: italic;
}

.calor-type {
color: #f89859;
color: #f89859;
}

.calor-class {
color: #d2a8ff;
color: #d2a8ff;
}

.calor-string {
color: #a5d6ff;
}
color: #a5d6ff;
}
28 changes: 16 additions & 12 deletions packages/highlighter/src/themes/github-light.css
Original file line number Diff line number Diff line change
@@ -1,32 +1,36 @@
.calor-wrapper {
background-color: #fff;
background-color: #fff;
}

.calor-plain, .calor-symbol {
color: #24292e;
.calor-plain,
.calor-symbol {
color: #24292e;
}

.calor-keyword, .calor-bool, .calor-operator {
color: #cf222e;
.calor-keyword,
.calor-bool,
.calor-operator {
color: #cf222e;
}

.calor-number, .calor-function {
color: #0550ae;
.calor-number,
.calor-function {
color: #0550ae;
}

.calor-comment {
color: #6e7781;
font-style: italic;
color: #6e7781;
font-style: italic;
}

.calor-type {
color: #e36209;
color: #e36209;
}

.calor-class {
color: #8250df;
color: #8250df;
}

.calor-string {
color: #4d804e;
color: #4d804e;
}

0 comments on commit 63a0972

Please sign in to comment.