gruntjs - Grunt index file not running -
i trying index.html @ root of app (app/index.html) running grunt file inherited.
my grunt file follows:
module.exports = function(grunt) { // 1. configuration goes here grunt.initconfig({ pkg: grunt.file.readjson('package.json'), sass_directory_import: { your_target: { files: { src: ['css/sass/parts/_all.scss'] }, }, }, connect: { server: { options: { port: 9000, hostname: 'localhost', base: ['./'], keepalive: true, open: { target: 'http://localhost:9000' } } } }, sass: { dist: { options: { loadpath: require('node-bourbon').includepaths, sourcemap: true }, files: { 'css/style.css' : 'css/sass/style.scss', 'css/style-ie.css' : 'css/sass/style-ie.scss' } }, }, watch: { sass: { files: 'css/sass/**/*.scss', tasks: ['sass_directory_import','sass'] } } }); // 3. tell grunt plan use plug-in. grunt.loadnpmtasks('grunt-sass'); grunt.loadnpmtasks('grunt-contrib-cssmin'); grunt.loadnpmtasks('grunt-contrib-concat'); grunt.loadnpmtasks('grunt-contrib-uglify'); grunt.loadnpmtasks('grunt-contrib-watch'); grunt.loadnpmtasks('grunt-sass-directory-import'); grunt.loadnpmtasks('grunt-contrib-connect'); // 4. tell grunt when type "grunt" terminal. grunt.registertask('default',['watch', 'connect:server']); grunt.registertask('build',['sass', 'uglify']);
};
i want index appear under port: http://localhost:9000 when run default watch task, sass files being watched changes , nothing else. how grunt run file under given port? have used gulp before , not finding grunt easy work with. there grunt server/connect task not have installed?
Comments
Post a Comment