我已經設定,像咕嚕說,我有以下代碼,咕嚕正確觀看和livereload.js在端口上運行35729.咕嚕本地主機:9000/index.html的不運行
我的問題是,我看不到我的本地主機上運行的index.html。 我錯過了什麼?
module.exports = function(grunt) {
grunt.initConfig({
compass: {
dev: {
options: {
config: 'config.rb'
}
}
},
watch: {
css: {
files: 'sass/*.scss',
tasks: ['sass'],
options: { livereload: true }
},
livereload: {
options: { livereload: true },
files: [
'{,*/}*.html',
'*.html',
'assets/images/{,*/}*',
'assets/js/*.js'
]
},
options: {
livereload: true,
},
html: {
options: { livereload: true },
files: ['*.html']
},
sass: {
options: { livereload: true },
files: ['sass/*.scss'],
tasks: ['compass:dev']
},
options: {
livereload: true
},
js: {
options: { livereload: true },
files: ['assets/js/*.js'],
tasks: ['jshint']
},
images: {
options: { livereload: true },
files: ['assets/images/*.*']
},
fontsicons: {
options: { livereload: true },
files: ['assets/images/icons/**/*.{svg,eot,woff,ttf,woff2,otf}'],
tasks: ['copy:fontsicons']
}
},
connect: {
connect: {
options: {
port: 9000,
livereload: 35729,
hostname: 'localhost'
},
livereload: {
options: {
open: true,
base: [
'app'
]
}
}
}
}
});
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-compass');
grunt.registerTask('default', ['watch','compass','connect']);
} //exports
你試過端口:9000嗎? –
@RobertMoskal我的locahost是本地主機:9000/index.html – user3699998