grunt 使用 grunt-contrib-livereload 时提示 Warning:

命令与返回


P:\ms>grunt live

Running "livereload-start" task

... Starting Livereload server on 35729 ...


Running "connect:livereload" (connect) task

Warning: Arguments to path.resolve must be strings Use --force to continue.


Aborted due to warnings.

Gruntfile.js 部分


livereload: {

        port: 35729 // Default livereload listening port.

},

connect: {

    livereload: {

        options: {

            port: 9001,

            hostname: 'localhost',

            base: '.',

            middleware: function(connect, options) {

                return [lrSnippet, folderMount(connect, options.base)]

            }

        }

    }

},

regarde: {

    jade: {

        files: '*.jade',

        tasks: ['jade']

    },

    html: {

        files: ['index.html', 'css/my.css', 'Gruntfile.js'],

        tasks: ['jsbeautifier', 'livereload']

    },

    coffee: {

        files: 'js/my.coffee',

        tasks: 'coffee'

    }

},


grunt.registerTask('live', ['livereload-start', 'connect', 'regarde']);


心有法竹
浏览 575回答 0
0回答
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

JavaScript