2017-02-09 4 views
0
  1. это мой файл grunt.
  2. я бег $ хрюкать по умолчанию
  3. actuall я хочу на мой index.html на каком-либо порт и хочу, чтобы открыть в хромовом непосредственноОшибка файла Grunt с предупреждением: Задача «по умолчанию» не найден

    module.exports = function(grunt) { 
        grunt.initConfig({ 
    connect: { 
        server: { 
         options: { 
         port: 9001, 
         base: { 
          path: 'Dev', 
          options: { 
          index: 'index.html', 
          maxAge: 300000 
          } 
         } 
         } 
        } 
        }, 
        open: { 
        delayed: { 
         path: 'http://localhost:9001' 
         app: 'Google Chrome' 
         options: { 
         openOn: 'serverListening' 
         } 
        } 
        }  
        }); 
    grunt.registerTask('default', ['connect', 'open']); 
    }; 
    

ответ

0

Вам необходимо загрузить задание:

grunt.loadNpmTasks('grunt-contrib-connect'); 
Смежные вопросы