Tag: 后卫

当没有spec文件或spec文件为空时,Grunt-contrib-jasmine会中止任务

开始使用Grunt已经非常有趣了,但是遇到了一个我不知道最佳行动scheme的情况。 TL;博士 可以咕嘟咕嘟地发出警告而不中止任务? grunt –force将会这样做,但是这会将force选项应用于所有任务。 问题 :在运行一个包含jasmine(来自grunt-contrib-jasmine)的任务时,如果找不到至less包含一个unit testing的规范(即it("does stuff, function () {}); )那么它发出警告,因此中止整个任务。 码 这是我用来build立我的网站的任务: grunt.registerTask('build', ['clean', 'sass', 'images', 'favicons', 'lint', 'minify', 'jasmine', 'hashify']); 这里是茉莉花任务configuration: jasmine: { testdev: { src: folders.js.src + '/**/*.js', options: { 'specs': folders.spec.src + '/*Spec.js', 'helpers': folders.spec.src + '/*Helper.js' } }, //etc etc, more targets for minified code testing and istanbul […]

我如何得到Guard来自动编译我的Coffeescript文件? 说是的,但不是

我有以下Guardfile coffeescript_options = { input: 'src/js', output: 'www/js', patterns: [%r{^src/js/(.+\.(?:coffee|coffee\.md|litcoffee|js))$}] } guard 'coffeescript', :input => 'src/js', :output => 'www/js' do coffeescript_options[:patterns].each { |pattern| watch(pattern) } end # guard 'coffeescript', :input => 'src/js', :output => 'www/js' 我保存了src/js/tf.coffee文件并logging下来 02:46:50 – INFO – Compile src/js/tf.coffee 02:46:50 – INFO – 02:46:50 AM Successfully generated ←]2;[CoffeeScript results] Successfully generated 但是,我无法在任何地方find该文件。 […]