Gruntfile.sass.proxy.js 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /**
  2. *
  3. * Install:
  4. * npm install grunt grunt-contrib-watch grunt-contrib-sass grunt-browser-sync
  5. *
  6. * Run:
  7. * grunt
  8. *
  9. * This example will watch SCSS files & compile them.
  10. * BrowserSync will then inject the changes.
  11. */
  12. module.exports = function (grunt) {
  13. // Project configuration.
  14. grunt.initConfig({
  15. watch: {
  16. sass: {
  17. files: "app/scss/*.scss",
  18. tasks: "sass:dev"
  19. }
  20. },
  21. sass: {
  22. dev: {
  23. files: {
  24. "app/css/styles.css": "app/scss/styles.scss"
  25. }
  26. }
  27. },
  28. browserSync: {
  29. default_options: {
  30. bsFiles: {
  31. src: [
  32. "css/*.css",
  33. "*.html"
  34. ]
  35. },
  36. options: {
  37. watchTask: true,
  38. proxy: "yourvhost.dev"
  39. }
  40. }
  41. }
  42. });
  43. grunt.loadNpmTasks('grunt-contrib-watch');
  44. grunt.loadNpmTasks('grunt-contrib-sass');
  45. grunt.loadNpmTasks('grunt-browser-sync');
  46. grunt.registerTask('default', ['browserSync', 'watch']);
  47. };