Skip to content

Commit 4fb4205

Browse files
committed
Initial
0 parents  commit 4fb4205

17 files changed

Lines changed: 65049 additions & 0 deletions

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.DS_Store
2+
test.html
3+
mapm.json
4+
node_modules
5+
.idea

.idea/.gitignore

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# mapm
2+
## A simple Import Map Package Manager
3+
Install any npm packages without any build steps
4+
5+
```bash
6+
npm i -g mapm
7+
```
8+
9+
## Install into import-map.json
10+
```bash
11+
mapm install pulsjs
12+
```
13+
14+
## Install into HTML file
15+
```bash
16+
mapm install -f index.html pulsjs
17+
```
18+
19+
## Link from html
20+
Adds import map automatically
21+
```bash
22+
mapm link -o index.html index.html
23+
```
24+
25+
## mapm.json
26+
```json
27+
{
28+
"file": "index.html",
29+
"provider": "esm.sh"
30+
}
31+
```
32+
33+
## Providers:
34+
- esm.sh
35+
- esm.run
36+
- unpkg
37+
- skypack

build.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { build } from 'esbuild';
2+
3+
await build({
4+
entryPoints: ['./src/index.js'], // Your CLI entry file
5+
bundle: true,
6+
platform: 'node',
7+
outfile: 'dist/mapm.js',
8+
banner: {
9+
// js: '#!/usr/bin/env node',
10+
},
11+
12+
format: 'esm',
13+
target: ['node18'],
14+
});

0 commit comments

Comments
 (0)