Gruntfile.js 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. // This shows a full config file!
  2. module.exports = function (grunt) {
  3. grunt.initConfig({
  4. watch: {
  5. files: 'app/scss/**/*.scss',
  6. tasks: ['bsReload:css']
  7. },
  8. sass: {
  9. dev: {
  10. files: {
  11. 'app/css/main.css': 'app/scss/main.scss'
  12. }
  13. }
  14. },
  15. browserSync: {
  16. dev: {
  17. options: {
  18. watchTask: true,
  19. server: './app',
  20. plugins: [
  21. {
  22. module: "bs-html-injector",
  23. options: {
  24. files: "./app/*.html"
  25. }
  26. }
  27. ]
  28. }
  29. }
  30. },
  31. bsReload: {
  32. css: "main.css"
  33. }
  34. });
  35. // load npm tasks
  36. grunt.loadNpmTasks('grunt-contrib-sass');
  37. grunt.loadNpmTasks('grunt-contrib-watch');
  38. grunt.loadNpmTasks('grunt-browser-sync');
  39. // define default task
  40. grunt.registerTask('default', ['browserSync', 'watch']);
  41. };