草庐IT

grunt-ngdocs

全部标签

javascript - 使用 grunt 运行 2 个异步任务

我正在开发一个小型Node项目,我使用CoffeeScript而不是客户端代码。我正在尝试使用grunt设置我的开发环境。我已经为运行这样的服务器实现了自定义grunt任务:start=require'./start'#justafunctiontostartexpress.jsapplicationgrunt.registerTask'server','Startingserver',->grunt.log.write'Preparingservertostart'done=do@asyncstart(err)->grunt.log.write"serverrunningatloca

javascript - 使用 grunt 运行 2 个异步任务

我正在开发一个小型Node项目,我使用CoffeeScript而不是客户端代码。我正在尝试使用grunt设置我的开发环境。我已经为运行这样的服务器实现了自定义grunt任务:start=require'./start'#justafunctiontostartexpress.jsapplicationgrunt.registerTask'server','Startingserver',->grunt.log.write'Preparingservertostart'done=do@asyncstart(err)->grunt.log.write"serverrunningatloca

javascript - Grunt 连接任务和中间件 Access-Control-Allow-Origin

我想允许访问我需要能够对服务器执行RESTAPI调用的跨源调用。我的connectgrunt任务配置如下:connect:{options:{port:9000,//Changethisto'0.0.0.0'toaccesstheserverfromoutside.hostname:'localhost',livereload:35729,middleware:function(connect,options,next){return[function(req,res,next){res.setHeader('Access-Control-Allow-Origin','*');res.

javascript - Grunt 连接任务和中间件 Access-Control-Allow-Origin

我想允许访问我需要能够对服务器执行RESTAPI调用的跨源调用。我的connectgrunt任务配置如下:connect:{options:{port:9000,//Changethisto'0.0.0.0'toaccesstheserverfromoutside.hostname:'localhost',livereload:35729,middleware:function(connect,options,next){return[function(req,res,next){res.setHeader('Access-Control-Allow-Origin','*');res.

javascript - 难以让 browserify-shim 使用 grunt-browserify (> 2.0.2) 作为转换

在grunt-browserify的2.0.2版本中,browserify-shim已从模块本身中删除并转换为用作transform,而不是grunt-browserify任务上的直接option。在grunt-browserify中使用shim的old版本如下所示:'libs-dev':{src:[path.join('','angular','angular.js')],dest:path.join('','js','libs.js'),options:{shim:{angular:{path:path.join('','angular','angular.js'),exports

javascript - 难以让 browserify-shim 使用 grunt-browserify (> 2.0.2) 作为转换

在grunt-browserify的2.0.2版本中,browserify-shim已从模块本身中删除并转换为用作transform,而不是grunt-browserify任务上的直接option。在grunt-browserify中使用shim的old版本如下所示:'libs-dev':{src:[path.join('','angular','angular.js')],dest:path.join('','js','libs.js'),options:{shim:{angular:{path:path.join('','angular','angular.js'),exports

javascript - 如何在 Visual Studio Code 中调试从 Grunt 运行的 Jasmine 测试?

我的单元测试是通过Grunt使用Karma/Jasmine运行的。当我运行时grunttest测试从命令行执行。在VisualStudioCode中打开项目时,我可以使用Tasks:RunTestTask运行相同的命令。VSCode使用test参数执行Grunt并显示输出。在这种情况下如何调试VSCode运行的测试用例?当我按下F5时,会打开launch.json模板文件。我需要为program、args等提供什么来启动/调试由grunttest运行的相同测试用例?我尝试了以下方法:程序:/usr/local/bin/gruntargs:["test"]这成功启动了Grunt进程并执行

javascript - 如何在 Visual Studio Code 中调试从 Grunt 运行的 Jasmine 测试?

我的单元测试是通过Grunt使用Karma/Jasmine运行的。当我运行时grunttest测试从命令行执行。在VisualStudioCode中打开项目时,我可以使用Tasks:RunTestTask运行相同的命令。VSCode使用test参数执行Grunt并显示输出。在这种情况下如何调试VSCode运行的测试用例?当我按下F5时,会打开launch.json模板文件。我需要为program、args等提供什么来启动/调试由grunttest运行的相同测试用例?我尝试了以下方法:程序:/usr/local/bin/gruntargs:["test"]这成功启动了Grunt进程并执行

node.js - 运行 Grunt 时 path.resolve 的参数必须是字符串

我的Grunt文件:module.exports=function(grunt){grunt.initConfig({pkg:grunt.file.readJSON('package.json'),ts:{dev:{src:["src/background/*.ts"],out:["build/background.js"],}}});grunt.loadNpmTasks("grunt-ts");grunt.registerTask("default",["ts:dev"]);};(我正在使用grunt-ts。)系统信息Windows8.1NodeJSv0.10.24grunt-cli

node.js - 运行 Grunt 时 path.resolve 的参数必须是字符串

我的Grunt文件:module.exports=function(grunt){grunt.initConfig({pkg:grunt.file.readJSON('package.json'),ts:{dev:{src:["src/background/*.ts"],out:["build/background.js"],}}});grunt.loadNpmTasks("grunt-ts");grunt.registerTask("default",["ts:dev"]);};(我正在使用grunt-ts。)系统信息Windows8.1NodeJSv0.10.24grunt-cli