Skip to content

Commit

Permalink
Add local development documentation and enable corepack
Browse files Browse the repository at this point in the history
  • Loading branch information
carbonrobot committed Jan 2, 2025
1 parent 67c7fbc commit 557ee6d
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 9 deletions.
25 changes: 17 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ _(If you just want to use your Prism CSS-file themes, that's also no problem)_
- [`useTokenize`](#usetokenize)
- [Theming](#theming)
- [Upgrading from v1 to v2](#upgrade)
- [Local Development](#development)
- [LICENSE](#license)
- [Maintenance Status](#maintenance-status)

Expand Down Expand Up @@ -341,15 +342,13 @@ import { Highlight, themes } from 'prism-react-renderer';

These themes are JSON-based and are heavily inspired by VSCode's theme format.

Their syntax, expressed in Flow looks like the following:

```js
{
plain: StyleObj,
```ts
export type PrismTheme = {
plain: PrismThemeEntry
styles: Array<{
types: string[],
languages?: string[],
style: StyleObj
types: string[]
style: PrismThemeEntry
languages?: Language[]
}>
}
```
Expand Down Expand Up @@ -420,6 +419,16 @@ await import("prismjs/components/prism-applescript")
require("prismjs/components/prism-applescript")
```
## Development
Local development setup can be run with the following commands running Node 18.x. This project uses corepack to specify its package manager version and you should have it enabled locally using `corepack enable`.
```
$ pnpm install
$ pnpm build
$ pnpm test
```
## LICENSE
MIT
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,6 @@
"patchedDependencies": {
"[email protected]": "patches/[email protected]"
}
}
},
"packageManager": "[email protected]+sha512.7f6fda6e5e86c9cc4b815650b56036cc124a31772fd8bf3a1c6470278aa74b4da05732e0b457a00b6e6a58a16d52e9c263be06530c6ad80ef2180244c8eb8262"
}
1 change: 1 addition & 0 deletions packages/demo-nextjs
Submodule demo-nextjs added at a849b6

0 comments on commit 557ee6d

Please sign in to comment.