1- # @ exuanbo/ gulp-inline-source
1+ # gulp-inline-source-html
22
3- > A Gulp.js plugin for inlining flagged js, css, and img sources in html with [ inline-source] ( https://github.com/popeindustries/inline-source )
3+ > Inlines flagged js, css, and img sources in html with [ inline-source] ( https://github.com/popeindustries/inline-source )
44
5- [ ![ npm (scoped) ] ( https://img.shields.io/npm/v/@exuanbo/ gulp-inline-source.svg?style=flat-square )] ( https://www.npmjs.com/package/@exuanbo/ gulp-inline-source )
5+ [ ![ npm] ( https://img.shields.io/npm/v/gulp-inline-source-html .svg?style=flat-square )] ( https://www.npmjs.com/package/gulp-inline-source-html )
66[ ![ JavaScript Style Guide] ( https://img.shields.io/badge/code_style-standard-brightgreen.svg?style=flat-square )] ( https://standardjs.com )
7- [ ![ Travis (.com)] ( https://img.shields.io/travis/com/exuanbo/gulp-inline-source/master.svg?style=flat-square )] ( http://travis-ci.com/exuanbo/gulp-inline-source )
8- [ ![ David] ( https://img.shields.io/david/exuanbo/ gulp-inline-source.svg?style=flat-square )] ( https://david-dm.org/exuanbo/ gulp-inline-source )
9- [ ![ License] ( https://img.shields.io/github/license/exuanbo/gulp-inline-source.svg?style=flat-square )] ( https://github.com/exuanbo/gulp-inline-source/blob/master/LICENSE )
7+ [ ![ 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 )
8+ [ ![ David] ( https://img.shields.io/david/gulp-inline-source-html .svg?style=flat-square )] ( https://david-dm.org/gulp-inline-source-html )
9+ [ ![ 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 )
1010
1111This 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.
1212
@@ -24,10 +24,10 @@ Inline and compress tags that contain the `inline` attribute. Supports `<script>
2424
2525## Installation
2626
27- Install ` @exuanbo/ gulp-inline-source` as a development dependency
27+ Install ` gulp-inline-source-html ` as a development dependency
2828
2929``` bash
30- npm install --save-dev @exuanbo/ gulp-inline-source
30+ npm install --save-dev gulp-inline-source-html
3131```
3232
3333## How it works
@@ -70,28 +70,31 @@ Output file
7070` inlineSource(options?: Object) `
7171
7272``` javascript
73- const gulp = require (' gulp' )
74- const inlineSource = require (' @exuanbo/ gulp-inline-source' )
73+ const { task , src , dest } = require (' gulp' )
74+ const inlineSource = require (' gulp-inline-source-html ' )
7575
76- gulp . task (' inlineSource' , () => {
77- return gulp . src (' src/*.html' )
76+ task (' inlineSource' , () => {
77+ return src (' src/*.html' )
7878 .pipe (inlineSource ())
79- .pipe (gulp . dest (' dist' ))
79+ .pipe (dest (' dist' ))
8080})
8181```
8282
83+ or you can
84+
8385``` javascript
84- const gulp = require ( ' gulp' )
85- const inlineSource = require ( ' @exuanbo/gulp-inline-source ' )
86+ import inlineSource from ' gulp-inline-source-html '
87+ ```
8688
87- gulp .task (' inlineSource' , () => {
89+ ``` javascript
90+ task (' inlineSource' , () => {
8891 const options = {
8992 compress: false
9093 }
9194
92- return gulp . src (' src/*.html' )
95+ return src (' src/*.html' )
9396 .pipe (inlineSource (options))
94- .pipe (gulp . dest (' dist' ))
97+ .pipe (dest (' dist' ))
9598})
9699```
97100
@@ -113,7 +116,7 @@ For documentation about the options-object, see [popeindustries/inline-source](h
113116
114117## License
115118
116- [ MIT] ( https://github.com/exuanbo/gulp-inline-source/blob/master/LICENSE )
119+ [ MIT] ( https://github.com/exuanbo/gulp-inline-source-html /blob/master/LICENSE )
117120
118121## Donate
119122
0 commit comments