Skip to content
This repository has been archived by the owner on Jan 10, 2024. It is now read-only.

Commit

Permalink
chore: update repo
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Jul 4, 2023
1 parent 06f6cff commit 1881485
Show file tree
Hide file tree
Showing 11 changed files with 1,828 additions and 714 deletions.
15 changes: 15 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
root = true

[*]
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
charset = utf-8

[*.js]
indent_style = space
indent_size = 2

[{package.json,*.yml,*.cjson}]
indent_style = space
indent_size = 2
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
dist
node_modules
9 changes: 9 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"extends": ["eslint-config-unjs"],
"rules": {
"unicorn/no-null": 0,
"@typescript-eslint/no-non-null-assertion": 0,
"unicorn/prevent-abbreviations": 0,
"no-unused-expressions": 0
}
}
1 change: 1 addition & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

# shiki-es

Standalone build of [shiki](https://github.com/shikijs/shiki) fully compatible with all ESM environments.
Expand All @@ -8,6 +7,9 @@ Standalone build of [shiki](https://github.com/shikijs/shiki) fully compatible w
Install:

```sh
#pnpm
pnpm i shiki-es

# npm
npm i shiki-es

Expand All @@ -16,11 +18,11 @@ yarn add shiki-es
```

```js
import { getHighlighter } from 'shiki-es'
import { getHighlighter } from "shiki-es";

const highlighter = await getHighlighter({ theme: 'nord' })
const highlighter = await getHighlighter({ theme: "nord" });

console.log(highlighter.codeToHtml(`console.log('shiki');`, { lang: 'js' }))
console.log(highlighter.codeToHtml(`console.log('shiki');`, { lang: "js" }));
```

## License
Expand Down
12 changes: 9 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,20 @@
"scripts": {
"build": "unbuild",
"prepack": "unbuild",
"test": "pnpm build && node ./test/test.mjs",
"release": "standard-version && npm publish && git push --follow-tags"
"lint": "eslint --ext .ts && prettier -c src test",
"lint:fix": "eslint --ext .ts --fix && prettier -w src test",
"test": "pnpm lint && pnpm build && node ./test/test.mjs",
"release": "pnpm test && pnpm build && changelogen --release --publish && git push --follow-tags"
},
"devDependencies": {
"changelogen": "^0.5.4",
"eslint": "^8.44.0",
"eslint-config-unjs": "^0.2.1",
"fs-extra": "^11.1.1",
"node-fetch": "^3.3.1",
"prettier": "^2.8.8",
"shiki": "^0.14.3",
"standard-version": "^9.5.0",
"typescript": "^5.1.6",
"unbuild": "^1.2.1"
}
}

0 comments on commit 1881485

Please sign in to comment.