1.3.15 • Published 17 days ago
@shgysk8zer0/importmap v1.3.15
@shgysk8zer0/importmap
Front-End dependencies based on <script type="importmap">
Intended for use with rollup
and @shgysk8zer0/rollup-import
.
Installation
npm i @shgysk8zer0/importmap
Example
// rollup.config.js
import { rollupImport } from '@shgysk8zer0/rollup-import';
import { imports } from '@shgysk8zer0/importmap';
export default {
input: 'index.js',
output: {
file: 'index.min.js',
format: 'iife',
sourcemap: true,
},
plugins: [rollupImport({ imports })],
};
For <script type="importmap">
The module exports getImportMapScript()
, which can be used to generate the
required importmap <script>
:
import { getImportMapScript } from '@shgysk8zer0/importmap';
getImportMapScript();
Which results in:
<script type="importmap" integrity="sha384-...">{"imports": {}, "scope": {}}</script>
CLI
Create / update local importmap JSON or YAML files.
Usage: importmap-utils [options]
CLI utility for updating importmap files
Options:
-V, --version output the version number
-i, --input [input] local JSON or YAML importmap file
-e, --encoding [encoding] encoding (default: "utf8")
-f, --format [format] output format
-o, --output <output> output file
-h, --help display help for command
CLI Example
importmap-utils -o importmap.json
# Or...
importmap-utils -i importmap.json -o importmap.yml -f yaml
1.3.15
17 days ago
1.3.13
21 days ago
1.3.14
21 days ago
1.3.11
25 days ago
1.3.12
25 days ago
1.3.10
1 month ago
1.3.9
1 month ago
1.3.8
1 month ago
1.3.7
1 month ago
1.3.6
2 months ago
1.3.5
2 months ago
1.3.4
2 months ago
1.3.3
2 months ago
1.2.0
10 months ago
1.1.0
10 months ago
1.2.5
8 months ago
1.2.4
8 months ago
1.3.2
5 months ago
1.2.3
8 months ago
1.3.1
5 months ago
1.2.2
8 months ago
1.3.0
6 months ago
1.2.1
10 months ago
1.0.11
10 months ago
1.0.9
10 months ago
1.0.10
10 months ago
1.0.8
10 months ago
1.0.7
10 months ago
1.0.6
10 months ago
1.0.5
10 months ago
1.0.4
10 months ago
1.0.3
10 months ago
1.0.2
11 months ago
1.0.1
11 months ago
1.0.0
11 months ago