importmapify 1.1.0 → 1.1.1
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 +5 -6
- package/deno.json +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -97,9 +97,8 @@ resolved against `root` and accepts a relative path, an absolute path, or a `fil
|
|
|
97
97
|
automatically against `out`'s directory, so a nested `out` (for example `.cache/maps/import_map.json`) still produces
|
|
98
98
|
targets that resolve correctly from the map's own location.
|
|
99
99
|
|
|
100
|
-
`defineConfig` returns its argument unchanged; it exists only to type
|
|
101
|
-
annotation.
|
|
102
|
-
helps only for a config used locally rather than exported.
|
|
100
|
+
`defineConfig` returns its argument unchanged; it exists only to type a config object for export and reuse without a
|
|
101
|
+
manual annotation.
|
|
103
102
|
|
|
104
103
|
### Recipes
|
|
105
104
|
|
|
@@ -113,10 +112,10 @@ writeImportMap({
|
|
|
113
112
|
root: import.meta.dirname,
|
|
114
113
|
packages: {
|
|
115
114
|
dreamcli: 'jsr:@kjanat/dreamcli@^3',
|
|
116
|
-
|
|
115
|
+
ansispeck: 'npm:ansispeck@^0.2',
|
|
117
116
|
},
|
|
118
117
|
});
|
|
119
|
-
// dreamcli, dreamcli/ -> jsr:/@kjanat/dreamcli@^3/,
|
|
118
|
+
// dreamcli, dreamcli/ -> jsr:/@kjanat/dreamcli@^3/, ansispeck, ansispeck/ -> npm:/ansispeck@^0.2/
|
|
120
119
|
```
|
|
121
120
|
|
|
122
121
|
Restrict pattern expansion to importable files with `extensions`, so a bare `./src/*` skips `.md`, `.json`, and other
|
|
@@ -142,7 +141,7 @@ Type a reusable config with `defineConfig` and share it across calls:
|
|
|
142
141
|
```ts
|
|
143
142
|
import { createImportMap, defineConfig, writeImportMap } from 'importmapify';
|
|
144
143
|
|
|
145
|
-
const config = defineConfig({ root: import.meta.dirname, packages: {
|
|
144
|
+
const config = defineConfig({ root: import.meta.dirname, packages: { ansispeck: 'npm:ansispeck@^0.2' } });
|
|
146
145
|
const map = createImportMap(config);
|
|
147
146
|
const written = writeImportMap(config);
|
|
148
147
|
```
|
package/deno.json
CHANGED