app.js 559 B

12345678910111213141516171819202122
  1. /**
  2. * Require Browsersync
  3. */
  4. var browserSync = require('browser-sync').create();
  5. /**
  6. * Run Browsersync with server config
  7. * You can use an arrays for files to specify multiple files
  8. */
  9. browserSync.init({
  10. proxy: "example.com",
  11. serveStatic: ["app/static"],
  12. files: "app/static/_custom.css",
  13. snippetOptions: {
  14. rule: {
  15. match: /<\/head>/i,
  16. fn: function (snippet, match) {
  17. return '<link rel="stylesheet" type="text/css" href="/_custom.css"/>' + snippet + match;
  18. }
  19. }
  20. }
  21. });