Gruntfile.js 973 B

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