Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/cassandra/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Gruntjs Grunt打开多个页面?_Gruntjs - Fatal编程技术网

Gruntjs Grunt打开多个页面?

Gruntjs Grunt打开多个页面?,gruntjs,Gruntjs,启动时,我希望该页面打开多个页面 如何使用grunt open插件打开多个页面 例如,我的配置如下: module.exports = function (grunt) { 'use strict'; require('load-grunt-tasks')(grunt); grunt.initConfig({ // ... Skip through all of the other config open: { server: {

启动时,我希望该页面打开多个页面

如何使用grunt open插件打开多个页面

例如,我的配置如下:

module.exports = function (grunt) {

  'use strict';

  require('load-grunt-tasks')(grunt);

  grunt.initConfig({
    // ... Skip through all of the other config

    open: {
        server: {
            url: 'http://localhost:<%= express.options.port %>/index.html'
        }
    },

    grunt.registerTask('default', ['server', 'open']);
});
module.exports=函数(grunt){
"严格使用",;
要求('load-grunt-tasks')(grunt);
grunt.initConfig({
//…跳过所有其他配置
开放式:{
服务器:{
网址:'http://localhost:/index.html'
}
},
registerTask('default',['server','open']);
});

最后是这样做的:

open: {
   url1: {
      path: 'http://localhost:<%= express.options.port %>/index.html'
  },
   url2: {
      path: 'http://localhost:<%= express.options.port %>/index2.html'
    }
}
打开:{
url1:{
路径:'http://localhost:/index.html'
},
url2:{
路径:'http://localhost:/index2.html'
}
}
资料来源: