Advertisement
srikat

Untitled

Jan 29th, 2018
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. // Require our dependencies.
  2. var browsersync = require( 'browser-sync' );
  3. var gulp = require( 'gulp' );
  4. var filter = require( 'gulp-filter' );
  5. var notify = require( 'gulp-notify' );
  6. var plumber = require( 'gulp-plumber' );
  7.  
  8. /**
  9. * Process tasks and reload browsers on file changes.
  10. *
  11. * https://www.npmjs.com/package/browser-sync
  12. */
  13. gulp.task( 'default', function() {
  14.  
  15. // HTTPS (optional).
  16. browsersync( {
  17. proxy: 'https://showcase-pro.test',
  18. port: 8000,
  19. https: {
  20. "key": "/Users/sridharkatakam/.valet/Certificates/showcase-pro.test.key",
  21. "cert": "/Users/sridharkatakam/.valet/Certificates/showcase-pro.test.crt"
  22. }
  23. } );
  24.  
  25. // Reload browser when PHP files change.
  26. gulp.watch( [ '*.*', '*.php', '!*.css', '!.git/*', '!node_modules/*' ] ).on( 'change', browsersync.reload );
  27.  
  28. // Inject CSS changes.
  29. gulp.watch( '*.css', function() {
  30. gulp.src( '*.css' )
  31. .pipe( browsersync.stream() );
  32. } );
  33.  
  34. } );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement