Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/exuanbo/gulp-inline-source-html

Inlines flagged js, css, and img sources in html with inline-source
https://github.com/exuanbo/gulp-inline-source-html

css gulp gulp-inline-source gulpplugin img inline inline-source javascript

Last synced: 3 months ago
JSON representation

Inlines flagged js, css, and img sources in html with inline-source

Awesome Lists containing this project

README

        

# gulp-inline-source-html

> Inlines flagged js, css, and img sources in html with [inline-source](https://github.com/popeindustries/inline-source)

[![npm](https://img.shields.io/npm/v/gulp-inline-source-html.svg?style=flat-square)](https://www.npmjs.com/package/gulp-inline-source-html)
[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg?style=flat-square)](https://standardjs.com)
[![Travis (.com)](https://img.shields.io/travis/com/exuanbo/gulp-inline-source-html/master.svg?style=flat-square)](http://travis-ci.com/exuanbo/gulp-inline-source-html)
[![David](https://img.shields.io/david/exuanbo/gulp-inline-source-html.svg?style=flat-square)](https://david-dm.org/exuanbo/gulp-inline-source-html)
[![License](https://img.shields.io/github/license/exuanbo/gulp-inline-source-html.svg?style=flat-square)](https://github.com/exuanbo/gulp-inline-source-html/blob/master/LICENSE)

This plugin is based on [fmal/gulp-inline-source](https://github.com/fmal/gulp-inline-source), which is no longer maintained. It now supports Gulp.js v4 and ES6 / ES2015.

## Table of Contents

- [Description](#description)
- [Installation](#installation)
- [How it works](#how-it-works)
- [Usage](#usage)
- [License](#license)

## Description

Inline and compress tags that contain the `inline` attribute. Supports ``, `<link>`, and `<img>` (including `*.svg` sources) tags by default.

## Installation

Install `gulp-inline-source-html` as a development dependency

```bash
npm install --save-dev gulp-inline-source-html
```

## How it works

Targate file `src/html/index.html`

```html
<html>
<body>
<script src="../js/app.js" inline>

function test(){const a="lorem ipsum";return a}