0

I'm trying to use the grunt-browser-sync to watch the changes in the jsp and tag files, but the same is not working. Does anybody know what`s happening? Grunt works with tag and jsp files?

 module.exports = function(grunt) {    
   // Project configuration.
   grunt.initConfig({
        pkg: grunt.file.readJSON('package.json'),

        watch: {   
           // hide code
        },   
        less: {
           // hide code
        },  
        // hide code
        browserSync: {
            default_options: {
                bsFiles: {
                    src: ["**/*.js", "*/*.css", "**/*.jsp", "**/*.tag" ]
                },
                options: {
                    watchTask: true,
                    proxy: "https://pageteste.local:9001/sitedeteste"
                }
            }
        }   
    });

    // Plugins
    grunt.loadNpmTasks('grunt-contrib-watch');
    grunt.loadNpmTasks('grunt-contrib-less');
    grunt.loadNpmTasks("grunt-browser-sync");

    // Browser sync task
    grunt.registerTask("server", ["browserSync", "watch"]);

    // Default task(s).
    grunt.registerTask('default', ['less', 'sprite', 'sync']);

};

2 Answers2

0

Your globbing pattern is wrong use:

         bsFiles: {
                src: ["**/*.js", "*/*.css", "**/*.jsp", "**/*.tag" ]
            },
Revive
  • 2,248
  • 1
  • 16
  • 23
  • I update my code with this change, but it still works only .js files. `browserSync: { default_options: { bsFiles: { src: ["**/*.js", "*/*.css", "**/*.jsp", "**/*.tag" ] }, options: { watchTask: true, proxy: "https://pageteste.local:9001/sitedeteste" } } }` – Diego Chagas May 31 '17 at 12:54
0

I need change my code path for this:

bsFiles: {
    src: [
        "web/path/**/*.js", 
        "web/path/css/style.css",
        "web/**/*.jsp", 
        "web/webroot/path/**/*.tag", 
    ]
},