Skip to content

Commit f633293

Browse files
committed
chore: Simplify package.json#exports
1 parent 98a704f commit f633293

File tree

4 files changed

+18
-45
lines changed

4 files changed

+18
-45
lines changed

README.md

+11-11
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ This is a monorepo with packages to **boost the [DX]** of working with [AST] _(u
2121

2222
In order to work with AST, the following processes are recognized:
2323

24+
1. [Analyzing](#analyze) the [AST] object(s).
2425
1. [Building](#build) programmatically the [AST] node(s), or an entire object.
2526
1. [Parsing](#parse) _stringified_ code syntax into [AST] object.
2627
1. [Traversing](#traverse) the [AST] object.
27-
1. [Analyzing](#analyze) the [AST] object(s).
2828
1. [Printing](#print) the [AST] object back into _stringified_ code syntax.
2929

3030
> [!IMPORTANT]
@@ -35,6 +35,16 @@ In order to work with AST, the following processes are recognized:
3535
>
3636
> Not all of these packages are part of this monorepo.
3737
38+
### Analyze
39+
40+
Analyze the received [AST] object(s). Contains type-guards and utilities.
41+
42+
| Name | Languages | In this repository? |
43+
| ---------------------- | ---------------------------------- | ------------------- |
44+
| [`js-ast-analyze`] | ![icon-js] ||
45+
| [`ts-ast-analyze`] | ![icon-js]![icon-ts] ||
46+
| [`svelte-ast-analyze`] | ![icon-js]![icon-ts]![icon-svelte] ||
47+
3848
### Build
3949

4050
Sometimes you need to do some code transformation...
@@ -62,16 +72,6 @@ In other words, _walk_ on the AST object.
6272
| --------------- | ---------------------------------- | ------------------- |
6373
| [`zimmerframe`] | ![icon-js]![icon-ts]![icon-svelte] ||
6474

65-
### Analyze
66-
67-
Analyze the received [AST] object(s). Contains type-guards and utilities.
68-
69-
| Name | Languages | In this repository? |
70-
| ---------------------- | ---------------------------------- | ------------------- |
71-
| [`js-ast-analyze`] | ![icon-js] ||
72-
| [`ts-ast-analyze`] | ![icon-js]![icon-ts] ||
73-
| [`svelte-ast-analyze`] | ![icon-js]![icon-ts]![icon-svelte] ||
74-
7575
### Print
7676

7777
Print the [AST] object or nodes into stringified code syntax.

pkgs/svelte-ast-print/package.json

+5-25
Original file line numberDiff line numberDiff line change
@@ -37,31 +37,11 @@
3737
},
3838
"files": ["dist/"],
3939
"exports": {
40-
".": {
41-
"development": "./src/lib.ts",
42-
"types": "./dist/lib.d.ts",
43-
"default": "./dist/lib.js"
44-
},
45-
"./css": {
46-
"development": "./src/css/mod.ts",
47-
"types": "./dist/css/mod.d.ts",
48-
"default": "./dist/css/mod.js"
49-
},
50-
"./html": {
51-
"development": "./src/html/mod.ts",
52-
"types": "./dist/html/mod.d.ts",
53-
"default": "./dist/html/mod.js"
54-
},
55-
"./js": {
56-
"development": "./src/js/mod.ts",
57-
"types": "./dist/js/mod.d.ts",
58-
"default": "./dist/js/mod.js"
59-
},
60-
"./template": {
61-
"development": "./src/css/template.ts",
62-
"types": "./dist/template/mod.d.ts",
63-
"default": "./dist/template/mod.js"
64-
},
40+
".": "./dist/lib.js",
41+
"./css": "./dist/css/mod.js",
42+
"./html": "./dist/html/mod.js",
43+
"./js": "./dist/js/mod.js",
44+
"./template": "./dist/template/mod.js",
6545
"./package.json": "./package.json"
6646
},
6747
"scripts": {

pkgs/ts-ast-analyze/package.json

+1-4
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,7 @@
3737
},
3838
"files": ["dist/"],
3939
"exports": {
40-
".": {
41-
"types": "./dist/lib.d.ts",
42-
"default": "./dist/lib.js"
43-
},
40+
".": "./dist/lib.js",
4441
"./package.json": "./package.json"
4542
},
4643
"scripts": {

pkgs/ts-ast-build/package.json

+1-5
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,7 @@
3737
},
3838
"files": ["dist/"],
3939
"exports": {
40-
".": {
41-
"development": "./src/lib.ts",
42-
"types": "./dist/lib.d.ts",
43-
"default": "./src/lib.js"
44-
},
40+
".": "./src/lib.js",
4541
"./package.json": "./package.json"
4642
},
4743
"scripts": {

0 commit comments

Comments
 (0)