gruntjs

Pig in grunt mode

こ雲淡風輕ζ 提交于 2019-12-10 14:55:47
问题 I have installed cygwin, hadoop and pig in windows. The configuration seems ok, as I can run pig scripts in batch and embedded mode. When I try to run pig in grunt mode, something strange happens. Let me explain. I try to run a simple command like grunt> A = load 'passwd' using PigStorage(':'); When I press Enter, nothing happens. The cursor goes to the next line and the grunt> prompt does not appear at all anymore. It seems as I am typing in a text editor. Has anything similar ever happened

Split up Gruntfile

拜拜、爱过 提交于 2019-12-10 13:39:44
问题 My Gruntfile is becoming pretty big right now and I want to split it up into multiple files. I've Googled and experimented a lot but I can't get it to work. I want something like this: Gruntfile.js module.exports = function(grunt) { grunt.initConfig({ concat: getConcatConfiguration() }); } functions.js function getConcatConfiguration() { // Do some stuff to generate and return configuration } How can I load functions.js into my Gruntfile.js? 回答1: How you can do it: you need to export your

Using gruntjs, how do watch for changes in .coffee files?

情到浓时终转凉″ 提交于 2019-12-10 12:48:11
问题 I am new to gruntjs and here is my simple gruntfile: /* global module:false */ module.exports = function(grunt) { // Project configuration. grunt.initConfig({ watch: { tasks: 'coffee' }, coffee: { compile: { files: { 'js/javascript/*.js': ['js/coffeescript/*.coffee'] // 1:1 compile } } } }); grunt.loadNpmTasks('grunt-contrib-coffee'); // Default task. grunt.registerTask('default', 'coffee'); }; When I run grunt it compiles fine. However, when I run grunt watch, it's just waiting and not

Grunt Server: Not supporting CORS, gives error

瘦欲@ 提交于 2019-12-10 11:28:42
问题 I have a server setup and everything was going fine but I am getting errors about .... is not allowed by Access-Control-Allow-Origin This is very strange as both the grunt server that hosts my Angular.js site is on port 9000 and my rest service is on port 8678. Anyway I found this https://gist.github.com/Vp3n/5340891 which explains how to enable CORS on the grunt server but my grunt file doesn't look the same... this is my current part of my grunt file connect: { options: { port: 9000, //

grunt.file.copy exclude empty folders

故事扮演 提交于 2019-12-10 11:18:08
问题 file.copy (actually grunt-config-copy but it uses grunt.file.copy underneath). This is working fine for me but I'm excluding certain glob patterns. This exclusion results in some empty folders, and the folders are still copied to new set. Is there any way to exclude empty folders? Thanks, Raif here is my grunt-task copy: { release: { expand: true, deleteEmptyFolders:true, cwd:'<%= srcFolder %>', src: ['**', '!**/obj/**', '!**/*.cs', '!**/*.vb', '!**/*.csproj', '!**/*.csproj.*' ], dest: '<%=

How to use minified javascript?

≡放荡痞女 提交于 2019-12-10 10:46:53
问题 I have a grunt tasks to concat and minify all my javascript files into one single file and the javascript file is in dist folder. "dist/<%= pkg.name %>.min.js'" "Gruntfile.js" module.exports = function (grunt) { grunt.initConfig({ pkg: grunt.file.readJSON("package.json"), concat: { options: { separator: ';' }, dist: { src: ['src/main/resources/app/js/**/*.js', 'src/main/resources/app/config/*.js', 'src/main/resources/app/app/js'], dest: 'dist/<%= pkg.name %>.js' } }, uglify: { options: {

Getting karma server to launch upon grunt watch

為{幸葍}努か 提交于 2019-12-10 10:34:30
问题 While developing, I'm using karma and grunt to watch for file changes and run the tests. In command line, I'd like to be able to simply enter $ grunt watch and have the karma server to start once, and thereafter having grunt watching for changes and running the various tasks (including karma tests) whenever files change. I don't want to enter $ karma start . How can this be achieved? 回答1: Option #1 One can use the atBegin option of grunt-contrib-watch . The idea is to introduce a startup task

AWS Elastic Beanstalk run Grunt task

做~自己de王妃 提交于 2019-12-10 09:05:35
问题 I want to run a node.js application on elastic beanstalk. I have a client which gets build by a grunt job (jade, less, concat, etc.) I excluded this folder from git I can localy run this by grunt buildClient which is executed by grunt-cli I added grunt and grunt-cli in my packages dev-dependencies I want to run the grunt build before the application is launched, i already setup a configuration in .ebextensions/app.config container_commands: 01_build_client: command: grunt buildClient I guess

jenkins Error sending to the following INVALID addresses:xxx@yyy.com

 ̄綄美尐妖づ 提交于 2019-12-10 03:54:38
问题 Jenkins gives following after completing test execution: Error sending to the following INVALID addresses: valid emailid jenkins build log: Build step 'Execute shell' marked build as failure Email was triggered for: Failure Sending email for trigger: Failure Sending email to: valid emailid Error sending to the following INVALID addresses : valid emailid Finished: FAILURE 回答1: I was getting this error too, and in the build log Jenkins displayed the "invalid address" error, but listed a valid

How can I set the viewport size of PhantomJS through grunt & jasmine?

此生再无相见时 提交于 2019-12-10 00:23:30
问题 I'm trying to test something using grunt + jasmine + phantomjs. This specific test requires a large viewport so the responsive styles render the large-screen version within phantomjs. I noticed in the grunt-contrib-jasmine plugin this code, which would seem to allow for setting phantomjs options: // Merge task-specific options with these defaults. var options = this.options({ ... phantomjs : {}, ... }); However, when I add this to my config in grunt it has no effect: options: { phantomjs: {