Commit 9e2762b
Add types and exports to package.json (#1857)
* Add types and exports to package.json
Add TypeScript declaration and an explicit exports map. Adds a top-level "types" pointing to dist/core/core.d.ts and an "exports" field mapping the package root to types/import/require paths and exposing ./package.json. This clarifies ESM/CJS entry points and improves TypeScript and module resolution for consumers.
Point package import export to dist/htmlhint.js
Update package.json exports: change the 'import' entry from './dist/core/core.js' to './dist/htmlhint.js'. This aligns the ESM import entry with the CommonJS 'require' entry and ensures consumers import the intended bundled entry point.
Point package import export to dist/htmlhint.js
Update package.json exports: change the 'import' entry from './dist/core/core.js' to './dist/htmlhint.js'. This aligns the ESM import entry with the CommonJS 'require' entry and ensures consumers import the intended bundled entry point.
Document ESM usage and bump version to 2.0.0-beta-1
Update README to clarify programmatic usage for both ESM and CommonJS consumers, adding an ESM example that imports the default export (htmlhint) and extracts HTMLHint. Also bump package.json and package-lock.json version from 1.9.2 to 2.0.0-beta-1.
Document ESM usage and bump version to 2.0.0-beta-1
Update README to clarify programmatic usage for both ESM and CommonJS consumers, adding an ESM example that imports the default export (htmlhint) and extracts HTMLHint. Also bump package.json and package-lock.json version from 1.9.2 to 2.0.0-beta-1.
* Update package.json
Co-authored-by: Sébastien Règne <regseb@gmail.com>
* Update README.md
---------
Co-authored-by: Sébastien Règne <regseb@gmail.com>1 parent e4840fb commit 9e2762b
3 files changed
Lines changed: 24 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
61 | 63 | | |
62 | 64 | | |
63 | 65 | | |
64 | 66 | | |
65 | 67 | | |
66 | 68 | | |
67 | 69 | | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
68 | 79 | | |
69 | 80 | | |
70 | 81 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
26 | | - | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
27 | 34 | | |
28 | 35 | | |
29 | 36 | | |
| |||
0 commit comments