# @webscaffold/task-js-compiler

> @webscaffold js compiler task (Webpack, Babel)

Latest version **0.1.0-alpha.7** (published 2020-06-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install @webscaffold/task-js-compiler
pnpm add @webscaffold/task-js-compiler
yarn add @webscaffold/task-js-compiler
bun add @webscaffold/task-js-compiler
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0-alpha.7 |
| Published | 2020-06-04 |
| First published | 2019-07-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=10 |
| Dependencies | 2 |
| Unpacked size | 5.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Radu Micu |
| Maintainers | radumza |

## Links

- npm: https://www.npmjs.com/package/@webscaffold/task-js-compiler
- Repository: https://github.com/webscaffold/webscaffold/tree/master/packages/task-js-compiler
- npm.io page: https://npm.io/package/@webscaffold/task-js-compiler

## Dependencies (2)

- [chalk](https://npm.io/package/chalk.md) ^4.0.0
- [webpack](https://npm.io/package/webpack.md) ^4.43.0

## Recent versions

- 0.1.0-alpha.7 (latest) — 2020-06-04
- 0.1.0-alpha.6 — 2020-01-21
- 0.1.0-alpha.5 — 2019-12-30
- 0.1.0-alpha.4 — 2019-10-28
- 0.1.0-alpha.3 — 2019-09-02
- 0.1.0-alpha.2 — 2019-08-08
- 0.1.0-alpha.1 — 2019-07-10
- 0.1.0-alpha.0 — 2019-07-09
- 0.0.1-alpha.0 — 2019-07-08

## README

<div align="center">
  <img src="media/building.svg" alt="Web Scaffold task-js-compiler" height="200" />
</div>

# @web-scaffold/task-js-compiler

> [`WEB Scaffold`](https://github.com/webscaffold/webscaffold) task for bundling js, running Webpack with Babel.

## Install

```sh
$ npm install --save-dev @webscaffold/task-js-compiler
```

## Usage

```js
const jsCompiler = require('@webscaffold/task-js-compiler');

await jsCompiler(webpackConfigObj);
```

This will run Webpack based on the config passed.

## API

### jsCompiler(webpackConfig, options?)

Returns a Promise<object> with the webpack instance and stats object.

#### webpackConfig

Type: object

Webpack config object.

#### options

Type: `object`

Options object that can be passed.

##### taskName

Type: `string`<br>
Default: `js-compiler`

Task name that will be used by the logger to namespace the logs.

##### taskColor

Type: `string`<br>
Default: `#00a8e8`

The color used by the logger to log to the console the task output.

##### eventBus

Type: `object`<br>
Default: undefined

The EventEmitter event bus that will be used to emit `bs:reload` for Browsersync.

## Licensing

MIT © Radu Micu

---
_Source: https://npm.io/package/@webscaffold/task-js-compiler · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
