gulp-html-require

0.0.3 • Public • Published

gulp-html-require

A gulp plugin which can import .html files into .js files

Usage

First, install gulp-html-require as a devDependency:

npm install gulp-html-require --save-dev

Then add it to the gulpfile.js:

var htmlImport = require('gulp-html-require');

gulp.task('import', function () {
    gulp.src('./demo/index.js')
        .pipe(htmlrequire('./demo/components/'))
        .pipe(gulp.dest('dist')); 
})

API

htmlImport(string)

string

Type: String

The url of your components


MIT

Copyright © 2016 ouyang90

Package Sidebar

Install

npm i gulp-html-require

Weekly Downloads

0

Version

0.0.3

License

MIT

Last publish

Collaborators

  • ouyang90