1.0.3 • Published 6 years ago

gulp-inject-js v1.0.3

Weekly downloads
4
License
MIT
Repository
github
Last release
6 years ago

gulp-inject-js

Inject js file to html

Install

npm install gulp-inject-js --save-dev

Usage

const gulp = require('gulp');
const injectJS = require('gulp-inject-js');

gulp.task('inject-js', function() {
  gulp.src('src/*.html')
    .pipe(injectJS())
    .pipe(gulp.dest('dist'));
});

In the html file, specify the relative path to JS

<html>
  ...
  <!-- inject-js scripts/script.js -->
  ...
</html>
1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago