# babel-html-inline

> compiled inline javascript code with babel

Latest version **1.0.4** (published 2020-11-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install babel-html-inline
pnpm add babel-html-inline
yarn add babel-html-inline
bun add babel-html-inline
```

## 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.4 |
| Published | 2020-11-19 |
| First published | 2019-10-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 2.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | you365xpf@163.com |
| Maintainers | xpfei |
| Keywords | gulp, babel, uglify, inline, html, javascript |

## Links

- npm: https://www.npmjs.com/package/babel-html-inline
- npm.io page: https://npm.io/package/babel-html-inline

## Alternatives

- [@tsparticles/shape-image](https://npm.io/package/@tsparticles/shape-image.md) — 303.7K weekly downloads
- [@tsparticles/shape-line](https://npm.io/package/@tsparticles/shape-line.md) — 233.7K weekly downloads
- [stringify-attributes](https://npm.io/package/stringify-attributes.md) — 58.6K weekly downloads
- [mobile-drag-drop](https://npm.io/package/mobile-drag-drop.md) — 46.3K weekly downloads
- [@comunica/actor-rdf-parse-html](https://npm.io/package/@comunica/actor-rdf-parse-html.md) — 29.2K weekly downloads

## Recent versions

- 1.0.4 (latest) — 2020-11-19
- 1.0.3 — 2020-10-09
- 1.0.2 — 2019-10-14
- 1.0.1 — 2019-10-13
- 1.0.0 — 2019-10-09
- 0.1.3 — 2019-10-09
- 0.1.2 — 2019-10-09
- 0.1.1 — 2019-10-09
- 0.1.0 — 2019-10-09

## README

# babel-html-inline

> compiler inline javascript with Babel and uglify

## Install

Using npm:

```sh
npm i -D babel-html-inline
```

or using yarn:

```sh
yarn add -D babel-html-inline
```

##options

| **key** | **value** |
| --- | --- |
| needUglify | boolean (default false) |


## Using

require packages

```js
const
    gulp        = require('gulp'),
    babelHtml   = require('babel-html-inline'),
    htmlMin     = require('gulp-htmlmin');
```

create task
```js
//only babel in Html
gulp.task('babelHtml', () =>
    gulp.src([srcDir + '/**/*.html'])
        .pipe(babelHtml(options))
        .pipe(gulp.dest(targetDir))
);

//used with html-min
gulp.task('htmlMin', function () {
    let minOptions = {
        removeComments: true,
        collapseWhitespace: true,
        collapseBooleanAttributes: false,
        removeEmptyAttributes: false,
        removeScriptTypeAttributes: true,
        removeStyleLinkTypeAttributes: true,
        minifyJS: true,
        minifyCSS: true
    };
    gulp.src([srcDir + '/**/*.html'])
        .pipe(babelHtml())
        .pipe(htmlMin(minOptions))
        .pipe(gulp.dest(targetDir));
});
```

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