From ed2d05176dc40dc30ad01f96d7cd49707b9b91e1 Mon Sep 17 00:00:00 2001 From: Zoee Silcock Date: Tue, 11 Aug 2015 09:32:11 +0200 Subject: [PATCH] Add a task for opening the dev server --- Gruntfile.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Gruntfile.js b/Gruntfile.js index 36266b5..5500925 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -3,6 +3,8 @@ var webpackConfig = require('./webpack.config.js'); module.exports = function(grunt) { grunt.loadNpmTasks('grunt-webpack'); + grunt.loadNpmTasks('grunt-open'); + grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), webpack: { @@ -36,9 +38,15 @@ module.exports = function(grunt) { debug: true } } + }, + open: { + default: { + path: 'http://localhost:8080/', + app: 'Google Chrome' + } } }); - grunt.registerTask('default', ['webpack-dev-server:start']); + grunt.registerTask('default', ['webpack-dev-server:start', 'open:dev']); grunt.registerTask('build', ['webpack:build']); };