gruntjs

Full Integration Testing for NodeJS and the Client Side with Yeoman and Mocha

十年热恋 提交于 2019-12-03 03:41:48
问题 I got awesome client side tests that I run with Yeoman. Yeoman compiles my CoffeeScript, opens up the test page in a server, visit it with PhantomJS and pass all the tests results to the command line. The process is pretty hacky, the test results are passed via alert() messages to the Phantom process which creates a temporary file and fills it with the messages as JSON. Yeoman (well, Grunt) loops over the temporary file, parses the tests and displays them in the command line. The reason I

npm peerDependency issue with grunt and flatiron peer

孤者浪人 提交于 2019-12-03 03:41:39
问题 While posting this question I figured out the answer, but I'll post both here in case it helps someone else, and perhaps someone can help with the why of what happened. When I run: sudo npm install -g grunt the last part of it says: /usr/bin/grunt -> /usr/lib/node_modules/grunt/bin/grunt npm ERR! peerinvalid The package flatiron does not satisfy its siblings' peerDependencies requirements! npm ERR! peerinvalid Peer flatiron-cli-config@0.1.3 wants flatiron@~0.1.9 npm ERR! peerinvalid Peer

How to compile .less files on save in Visual Studio 2015 (preview)

旧时模样 提交于 2019-12-03 03:30:52
问题 Ok, so I've created a new ASP.Net 5 / MVC 6 project in Visual Studio 2015 Preview. In keeping with our current method of doing things, for styling I want to use .less files. Creating the files is straightforward, but Web Essentials no longer compiles them. So my question is this: what precisely do I need to do to get my .css files generated when I save the .less files? Based on my adventures getting Typescript to work nicely, I will have to use Grunt to accomplish this task, but I am brand

Grunt dependencies conflicts in Bootstrap

这一生的挚爱 提交于 2019-12-03 03:27:43
问题 I've downloaded Bootstrap source files from the official website and I'm getting dependency conflicts when installing the project using node's npm . I have grunt 0.4.3 installed on my machine but some bootstrap dependencies require 0.4.0 and some 0.4.1 . The npm install -g grunt-cli command executed without any problems. Here's the log that I'm getting after executing npm install command: npm ERR! peerinvalid The package grunt does not satisfy its siblings' peerDependencies requirements! npm

Node glob pattern for every .js file except .spec.js

本秂侑毒 提交于 2019-12-03 03:25:56
问题 I am looking for a better glob pattern for usemin, i want to to find all .js files but exclude the .spec.js files. I have the following solution so far. <script src="components/**/*(.js|!(*.spec.js|*.scss))"></script> The solution i have at the moment requires me to keep adding file extensions to exclude them, else they get picked up, for example .html files. I tried to make it only look for .js files and exclude the .spec.js from them but it does not seem to work. Also adding a !components/*

error when starting the server with grunt or node server

我们两清 提交于 2019-12-03 03:16:43
I am trying to use the mean stack as described here : http://mean.io/ after install, when making "grunt", there is an error : debugger listening on port 5858 4 Jan 01:47:40 - [nodemon] reading ignore list Express app started on port 3000 events.js:72 throw er; // Unhandled 'error' event ^ Error: failed to connect to [localhost:27017] at null.<anonymous> (/mean/node_modules/mongoose/node_modules/mongodb/lib/mongodb/connection/server.js:540:74) at EventEmitter.emit (events.js:106:17) at null.<anonymous> (/mean/node_modules/mongoose/node_modules/mongodb/lib/mongodb/connection/connection_pool.js

Registering Grunt tasks whose code is located in external JavaScript files

五迷三道 提交于 2019-12-03 03:00:55
I've written a function which I'd like to use as a Grunt task. I can do this by adding this to the Gruntfile: grunt.registerTask('foo', function () { // code here }); However, it makes more sense to keep the function code in a separate file. I plan to define a bunch of these custom tasks and I don't want to bloat the Gruntfile. I'm not sure what the preferred way of registering such tasks is. I have found this to work: grunt.registerTask('foo', function () { require('./path/to/foo.js')(grunt); }); So, I'm having the inline function like in the fist example, but this time, I'm loading an

Grunt-cli and Grunt - Same app, two versions?

你离开我真会死。 提交于 2019-12-03 02:26:34
Achtung! The accepted answer answered my question at the time, but is now outdated. Back then grunt-cli used grunt, but with another branch. The not-accepted answers will tell you how it is today. Question What is the relations and differences between grunt-cli and grunt? It seems to be the same thing, but different versions. Grunt https://npmjs.org/package/grunt https://github.com/gruntjs/grunt Grunt-cli https://npmjs.org/package/grunt-cli https://github.com/gruntjs/grunt/blob/devel/docs/getting_started.md You're correct, the two projects exist because of different versions of grunt. grunt

How can I get Grunt/Watch/LiveReload to reload Sass/CSS without a full page refresh?

自古美人都是妖i 提交于 2019-12-03 02:21:58
问题 So far, I've gotten everything working how I want (which is monitoring all the files I want and refreshing whenever there is a change), other than I'd love to be able to make modifications to Sass/CSS and have it refresh in the browser without a page load. It's not a huge deal, but sometimes I'm trying to modify the style of something after there's been some page interaction and I have to go through the process all over again if the page refreshes. I'm fairly certain this is possible, but it

Is it possible to compile grunt project from maven?

。_饼干妹妹 提交于 2019-12-03 02:12:54
问题 I'm trying to execute grunt tasks from within maven without needing to install Node.js or anything. This is because I wan't my artifact to be packaged by Jenkins and I can't install Node.js on that machine. I know that it's easy with npm and a few commands to get it working, but I also think that it should be easy to integrate with maven, the problem is that I don't know where to start since I'm new to npm. 回答1: Yes, using the frontend-maven-plugin, you can compile Grunt projects via Maven