# browserify-asterisk

> Browser-side require(*/module) the DW style

Latest version **1.0.9** (published 2018-06-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install browserify-asterisk
pnpm add browserify-asterisk
yarn add browserify-asterisk
bun add browserify-asterisk
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.9 |
| Published | 2018-06-16 |
| First published | 2018-05-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Maintainers | anhtrannhat |
| Keywords | browserify |

## Links

- npm: https://www.npmjs.com/package/browserify-asterisk
- Repository: https://github.com/nhatanhit/browserify-asterisk
- Homepage: https://github.com/nhatanhit/browserify-asterisk#readme
- Issues: https://github.com/nhatanhit/browserify-asterisk/issues
- npm.io page: https://npm.io/package/browserify-asterisk

## Dependencies (2)

- [stack-trace](https://npm.io/package/stack-trace.md) ^0.0.10
- [browserify-transform-tools](https://npm.io/package/browserify-transform-tools.md) ^1.3.3

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 1.0.9 (latest) — 2018-06-16
- 1.0.8 — 2018-06-13
- 1.0.7 — 2018-06-12
- 1.0.6 — 2018-06-12
- 1.0.5 — 2018-06-12
- 1.0.4 — 2018-06-07
- 1.0.3 — 2018-05-28
- 1.0.2 — 2018-05-28
- 1.0.1 — 2018-05-23
- 1.0.0 — 2018-05-23

## README

# browserify-asterisk
Browserify-asterisk is one of browserify transformer which is used to transform require JS path 
```javascript
require(*/path/to/module)
```
to corresponding module (The target module is chosen from list of cartridges in cartridge paths. These cartridge paths is set in configuration file cartridgepath.json)

## Getting Started

```shell
npm install browserify-asterisk
```
Edit grunt file to integrate browserify-asterisk with browserify

```javascript
name_js_task: {
    files: [
        //js lists
    ],
    options: {
        browserifyOptions: {
            //options
        },
        transform: [
            ['browserify-asterisk',{directory: 'name of cartridge'}]
        ]
    }
}
```
## cartridgepath.json

```javascript
{
    "cartridge_one": {
        "cartridge_path": "base_cartridge_one:base_cartridge_two:cartridge_one"
    },
    "cartridge_two": {
        "cartridge_path": "base_cartridge_one:base_cartridge_two:cartridge_two"
    },
    "cartridge_three": {
        "cartridge_path": "base_cartridge_one:base_cartridge_two:cartridge_three"
    }
}

```
browserify-asterisk checks which cartridge it is running on, then iterate all cartridge in appropriate cartridge path, the iteration will end whenever the target module is found / or not found in every cartridge in appropriate cartridge path

The parameter directory in below statement is required 

```javascript
['browserify-asterisk',{directory: 'name of cartridge'}]
```

## note with grunt-browserify
grunt-browserify build js modules with asynchrouns mode but browserify-asterisk  is unable to transform js modules that grunt-browserify is running on. The solution for this issue is you should design your js tasks with synchronous mode.

---
_Source: https://npm.io/package/browserify-asterisk · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
