# saber-commonjs

> create a bundle for commonjs, then run it in browser.

Latest version **1.0.7** (published 2019-01-18) · ISC license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install saber-commonjs
pnpm add saber-commonjs
yarn add saber-commonjs
bun add saber-commonjs
```

Provides the command `saber-commonjs`.

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.0.7 |
| Published | 2019-01-18 |
| First published | 2019-01-16 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 27.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | saber2pr |
| Maintainers | saber2pr |
| Keywords | commonjs, browser, require |

## Links

- npm: https://www.npmjs.com/package/saber-commonjs
- Repository: https://github.com/Saber2pr/saber-commonjs
- Homepage: https://github.com/Saber2pr/saber-commonjs#readme
- Issues: https://github.com/Saber2pr/saber-commonjs/issues
- npm.io page: https://npm.io/package/saber-commonjs

## Dependencies (1)

- [saber-node](https://npm.io/package/saber-node.md) ^1.1.9

## 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.7 (latest) — 2019-01-18
- 1.0.6 — 2019-01-17
- 1.0.5 — 2019-01-17
- 1.0.4 — 2019-01-17
- 1.0.3 — 2019-01-17
- 1.0.2 — 2019-01-17
- 1.0.1 — 2019-01-16
- 1.0.0 — 2019-01-16

## README

# saber-commonjs

[![version](https://img.shields.io/npm/v/saber-commonjs.svg)](https://www.npmjs.com/package/saber-commonjs)

> create a bundle for commonjs, then run it in browser.

```bash
# from npm
npm install saber-commonjs -g

```

## Usage:

1. outFile: string, ...Files: string[]

   Files[0] is main.

2. compile with a configFile 'commonjs.json',

   for example:

```json
{
  "outFile": "./example/dist/bundle.js",
  "main": "./example/js/main.js",
  "include": ["./example"]
}
```

---

## start

```bash
# install the typescript and webpack
npm install
```

```bash
# auto compile to commonjs
npm start

# auto compile to es5
npm run dev

```

> Author: saber2pr

---

## develope and test

> you should write ts in /src

> ts -(tsc)-> commonjs -(webpack)-> es5

> you should make test in /src/test

> export your core in /src/index.ts!

---

## publish

> Before publish, there are some items in package.json should to be updated below:

1. name
2. version
3. description
4. repository(url)
5. author

```bash
# if all is well, try:
npm publish
```

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