gulp-html-nimedev

1.3.1 • Public • Published

gulp-html-nimedev

npm

Optimize html files and copy in a new folder

Installation

$ npm install gulp-html-nimedev

Usage

In gulpfile.js

// Require the module
const htmlTask = require('gulp-html-nimedev')
 
// Set options object for htmlTask function
const options = {
  src: 'src/index.html',
  dest: 'dist',
  tmp: 'tmp',
 
  // Used to replace script declaration in index.html file
  replace: {
    'js': [
      'assets/js/dep.js',
      'assets/js/app.js'
    ]
  }
}
 
// Create a gulp task to optimize index.html file
gulp.task('html', () => htmlTask(options))

Note: src and dest in options objects follow the same rules of gulp.src() and gulp.dest() arguments

Changelog

License

Package Sidebar

Install

npm i gulp-html-nimedev

Weekly Downloads

2

Version

1.3.1

License

MIT

Last publish

Collaborators

  • nimedev