heading-case 0.0.0 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +28 -0
- package/bin.js +4 -0
- package/dist/dict.d.ts +1 -0
- package/dist/index.d.ts +4 -1
- package/dist/index.js +3009 -1
- package/package.json +9 -4
- package/dist/index.cjs +0 -7
package/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# heading-case
|
|
2
2
|
|
|
3
|
+
Format page titles and section headings in markdown files to use [sentence-style capitalization](https://learn.microsoft.com/en-us/style-guide/text-formatting/using-type/use-sentence-style-capitalization).
|
|
4
|
+
|
|
3
5
|
<p>
|
|
4
6
|
<a href="https://npmjs.com/package/heading-case">
|
|
5
7
|
<img src="https://img.shields.io/npm/v/heading-case?style=flat-square&colorA=564341&colorB=EDED91" alt="npm version" />
|
|
@@ -8,6 +10,26 @@
|
|
|
8
10
|
<a href="https://npmcharts.com/compare/heading-case?minimal=true"><img src="https://img.shields.io/npm/dm/heading-case.svg?style=flat-square&colorA=564341&colorB=EDED91" alt="downloads" /></a>
|
|
9
11
|
</p>
|
|
10
12
|
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
- Input:
|
|
16
|
+
|
|
17
|
+
```md
|
|
18
|
+
# A New Method for Creating JavaScript Rollovers
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
- Output:
|
|
22
|
+
|
|
23
|
+
```md
|
|
24
|
+
# A new method for creating JavaScript rollovers
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Limitations
|
|
28
|
+
|
|
29
|
+
This package is designed for Rspack's documentation. It follows the writing style of Rspack documentation and may not work well for other projects.
|
|
30
|
+
|
|
31
|
+
There are some edge cases that can not be correctly handled, so the execution result is not completely reliable.
|
|
32
|
+
|
|
11
33
|
## Usage
|
|
12
34
|
|
|
13
35
|
Install:
|
|
@@ -16,6 +38,12 @@ Install:
|
|
|
16
38
|
npm add heading-case -D
|
|
17
39
|
```
|
|
18
40
|
|
|
41
|
+
Format all markdown and MDX files in the current directory:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
npx heading-case
|
|
45
|
+
```
|
|
46
|
+
|
|
19
47
|
## License
|
|
20
48
|
|
|
21
49
|
[MIT](./LICENSE).
|
package/bin.js
ADDED
package/dist/dict.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const dict: string[];
|
package/dist/index.d.ts
CHANGED