Gruntjs Grunt打开多个页面?
启动时,我希望该页面打开多个页面 如何使用grunt open插件打开多个页面 例如,我的配置如下: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: {
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'
}
}
资料来源: