Skip to content

Commit

Permalink
chore: init
Browse files Browse the repository at this point in the history
  • Loading branch information
KermanX committed Feb 1, 2024
0 parents commit 9cc6458
Show file tree
Hide file tree
Showing 14 changed files with 1,967 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
dist
test/output
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 _Kerman

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
32 changes: 32 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# prettier-plugin-slidev

A [Prettier](https://prettier.io/) plugin for [Slidev](https://sli.dev/).

## Install

```bash
npm i -D prettier prettier-plugin-slidev
```

### Activate the plugin

Create or modify your [prettier configuration file](https://prettier.io/docs/en/configuration) to activate the plugin:

```json
{
"plugins": ["prettier-plugin-slidev"]
}
```

If only some of the Markdown files are the slides, you can configure the plugin to only format the slides:

```json
{
"overrides": [
{
"files": "slides/*.md",
"options": { "parser": "slidev" }
}
]
}
```
49 changes: 49 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"name": "prettier-plugin-slidev",
"version": "0.0.1",
"description": "A prettier plugin for Slidev",
"main": "./dist/index.js",
"types": "./dist/index.d.mts",
"type": "module",
"keywords": [
"slidev",
"prettier",
"plugin",
"prettier-plugin",
"format"
],
"files": [
"dist",
"LICENSE",
"README.md"
],
"exports": {
".": {
"default": "./dist/index.js",
"import": "./dist/index.js",
"types": "./dist/index.d.mts"
}
},
"scripts": {
"build": "tsup ./src/index.ts",
"dev": "tsup ./src/index.ts --watch ./src --watch ./test/input --watch ./test/index.js"
},
"author": {
"name": "_Kerman",
"email": "[email protected]",
"url": "https://github.com/kermanx"
},
"license": "MIT",
"peerDependencies": {
"prettier": "^3.2.4"
},
"dependencies": {
"@slidev/parser": "^0.46.3",
"js-yaml": "^4.1.0"
},
"devDependencies": {
"@slidev/types": "^0.46.3",
"@types/js-yaml": "^4.0.9",
"tsup": "^8.0.1"
}
}
Loading

0 comments on commit 9cc6458

Please sign in to comment.