heading-case 0.0.1 → 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.
Files changed (3) hide show
  1. package/README.md +27 -1
  2. package/dist/index.js +22 -8
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # heading-case
2
2
 
3
- Format page titles and section headings in markdown files to use sentence-style capitalization.
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
4
 
5
5
  <p>
6
6
  <a href="https://npmjs.com/package/heading-case">
@@ -10,6 +10,26 @@ Format page titles and section headings in markdown files to use sentence-style
10
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>
11
11
  </p>
12
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
+
13
33
  ## Usage
14
34
 
15
35
  Install:
@@ -18,6 +38,12 @@ Install:
18
38
  npm add heading-case -D
19
39
  ```
20
40
 
41
+ Format all markdown and MDX files in the current directory:
42
+
43
+ ```bash
44
+ npx heading-case
45
+ ```
46
+
21
47
  ## License
22
48
 
23
49
  [MIT](./LICENSE).
package/dist/index.js CHANGED
@@ -2912,21 +2912,35 @@ const dict = [
2912
2912
  ...Object.values(general_namespaceObject),
2913
2913
  ...Object.values(products_namespaceObject),
2914
2914
  ...Object.values(softwares_namespaceObject),
2915
+ 'Create React App',
2916
+ 'CSS Modules',
2917
+ 'Docusaurus Faster',
2915
2918
  'EJS',
2916
- 'Rspack',
2919
+ 'Fast Refresh',
2920
+ 'I',
2921
+ 'Lightning CSS',
2922
+ 'Module Federation',
2923
+ 'Parcel',
2924
+ 'Preact',
2925
+ 'Preact Refresh',
2926
+ 'React',
2927
+ 'React Compiler',
2928
+ 'React Router',
2929
+ 'React Server Components',
2930
+ 'Rollup',
2917
2931
  'Rsbuild',
2918
2932
  'Rsdoctor',
2919
2933
  'Rslib',
2934
+ 'Rspack',
2935
+ 'Rstack',
2936
+ 'Rspack Stack',
2920
2937
  'Rspress',
2921
2938
  'Rstest',
2922
- 'Rollup',
2923
- 'Parcel',
2939
+ 'Solid',
2940
+ 'Server Action',
2924
2941
  'Vite',
2925
- 'Module Federation',
2926
- 'CSS Modules',
2927
2942
  'Web Workers',
2928
- 'Create React App',
2929
- 'React Router'
2943
+ 'Xcode'
2930
2944
  ];
2931
2945
  async function globMarkdownFiles(cwd) {
2932
2946
  return glob([
@@ -2979,7 +2993,7 @@ async function formatFile(filePath) {
2979
2993
  const isChanged = formatted !== content;
2980
2994
  if (isChanged) {
2981
2995
  await __WEBPACK_EXTERNAL_MODULE_node_fs__["default"].promises.writeFile(filePath, formatted);
2982
- logger.success(`${picocolors_default().green('Formatted')} ${picocolors_default().dim(filePath)}`);
2996
+ logger.success(`formatted: ${picocolors_default().dim(filePath)}`);
2983
2997
  }
2984
2998
  return isChanged;
2985
2999
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "heading-case",
3
- "version": "0.0.1",
3
+ "version": "0.1.0",
4
4
  "repository": "https://github.com/rspack-contrib/heading-case",
5
5
  "license": "MIT",
6
6
  "type": "module",