npm.io
1.2.1 • Published 7 years ago

gulp-ws-sender

Licence
ISC
Version
1.2.1
Deps
4
Size
4 kB
Vulns
0
Weekly
0

For live injection of your script and styles to any page. Use with chrome extention

Usage

const gulp = require('gulp')
const port = 9999
const sender = require('gulp-ws-sender')(port)

gulp.task('style', () => {
  return gulp.src('src/**/*.css')
    // your pipes
    .pipe(sender({ type: 'css' }))
    .pipe(gulp.dest('build'))
})

gulp.task('script', () => {
  return gulp.src('src/**/*.js')
    // your pipes
    .pipe(sender({ type: 'js' }))
    .pipe(gulp.dest('build'))
})