Skip to content

Commit

Permalink
remove api section from bare modules
Browse files Browse the repository at this point in the history
  • Loading branch information
Vivek Singh committed Mar 13, 2024
1 parent 7559e91 commit 0d2dd9b
Showing 1 changed file with 0 additions and 137 deletions.
137 changes: 0 additions & 137 deletions bare-reference/bare-modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,140 +184,3 @@ If a package defines only a single export, `"."`, it may leave out the subpath e
}
```

#### `"imports"`

##### Subpath imports

##### Conditional imports

##### Private imports

## API

#### `Module.constants`

#### `Module.constants.states`

Constant | Description
:-- | :--
`EVALUATED` |
`SYNTHESIZED` |
`DESTROYED` |

#### `Module.constants.types`

Constant | Description
:-- | :--
`SCRIPT` |
`MODULE` |
`JSON` |
`BUNDLE` |
`ADDON` |

#### `Module.cache`

#### `const url = Module.resolve(specifier, parentURL[, options])`

Options include:

```js
{
referrer = null,
protocol,
imports,
resolutions,
builtins,
conditions
}
```

#### `const module = Module.load(url[, source][, options])`

Options include:

```js
{
referrer = null,
type,
defaultType = constants.types.SCRIPT,
cache,
main,
protocol,
imports,
resolutions,
builtins,
conditions
}
```

#### `module.url`

#### `module.filename`

#### `module.dirname`

#### `module.type`

#### `module.defaultType`

#### `module.cache`

#### `module.main`

#### `module.exports`

#### `module.imports`

#### `module.resolutions`

#### `module.builtins`

#### `module.conditions`

#### `module.protocol`

#### `module.destroy()`

### Custom `require()`

#### `const require = Module.createRequire(parentURL[, options])`

Options include:

```js
{
referrer = null,
type = constants.types.SCRIPT,
defaultType = constants.types.SCRIPT,
cache,
main,
protocol,
imports,
resolutions,
builtins,
conditions
}
```

### Protocols

#### `const protocol = new Module.Protocol(options)`

Options include:

```js
{
preresolve,
postresolve,
resolve,
exists,
read,
load
}
```

### Bundles

#### `const bundle = new Module.Bundle()`

For more info, see [Bare Bundle](https://github.com/holepunchto/bare-bundle).

0 comments on commit 0d2dd9b

Please sign in to comment.