gruntjs

Grunt Run in a For Loop

北慕城南 提交于 2019-12-11 03:08:40
问题 I'm new to grunt. I have a gruntfile that works for a single build. There are several target that are chained together to complete the process. The problem is that I need to create several different builds using variable data. I'm trying to figure out how to do this in my gruntfile. Today, to do a build, I just need to run grunt --foo=bar build or grunt --foo=baz build What I'd like to, and have tried to do, is create a build-all target that uses an array to define the foo data, like so:

Visual Studio + grunt - run tasks depending on configuration?

大城市里の小女人 提交于 2019-12-11 02:59:43
问题 I've just start playing with grunt for visual studio and I can't figure out how to run particular tasks depending on configuration (debug, release, etc). You can run tasks before build, after build, etc. But how to bind it to the configuration? 回答1: This Question might help. On top of that I added this: cd "$(SolutionDir)\CustomerService\Resources\build\node_modules" call grunt.cmd chatStyling --buildConfiguration=$(ConfigurationName) to my pre-build events. (Note that chatStyling is a custom

warning: Recursive process.nextTick detected

喜欢而已 提交于 2019-12-11 02:48:10
问题 I have application, that I'm starting to work with, I'm just want to run it, but it crash. It use grunt, that run node server, it's Angular.js application. When I'm running grunt task that run the server and when I try to access the app from the browser, I've got warnings from grunt or node: (node) warning: Recursive process.nextTick detected. This will break in the next version of node. Please use setImmediate for recursive deferral. lot of lines and finaly: util.js:35 var str = String(f)

Get Python variable using Grunt

て烟熏妆下的殇ゞ 提交于 2019-12-11 02:37:36
问题 1. Summary I don't find, how I can get Python variable, use Grunt. What I need to learn, that solve this task? 2. Details I build site use Pelican and Grunt. I use the same variables: In Python format in pelicanconf.py for Pelican In JavaScript format in Gruntfile.coffee for Grunt I want that variables not to be duplicated and contains only in pelicanconf.py . 3. Example Part of pelicanconf.py : SASHAVARIABLE = 'sashavalue' Part of Gruntfile.coffee (I use template mechanism): variables:

Grunt watch Running “watch” task Waiting

白昼怎懂夜的黑 提交于 2019-12-11 02:17:26
问题 I have a problem with grunt-watch. When I use "grunt" in terminal outputs "Running "watch" task Waiting..." krp-arina@krparina-Lenovo-G555:~/server$ grunt Running "watch" task Waiting... krp-arina@krparina-Lenovo-G555:~/server$ grunt -v Initializing Command-line options: --verbose Reading "Gruntfile.js" Gruntfile...OK Registering Gruntfile tasks. Registering "grunt-contrib-less" local Npm module tasks. Reading /home/krp-arina/server/node_modules/grunt-contrib-less/package.json...OK Parsing

How do I identify the current page in a page collection?

核能气质少年 提交于 2019-12-11 02:05:25
问题 I'm configuring a static site generator using Grunt's Assemble.io. I'm using the Pages Collection to build a navigation list like so: {{#each pages }} <li><a href="{{{filename}} }">{{{title}} }</a></li> {{/each }} I would also like to apply class="active" to the navigation item for the current page, but I'm not sure how to approach this. My first thought was to try comparing the title of the current iteration of the collection to that of the page being rendered, but this has two problems: The

SailsJS Linker (Grunt) Ignore files (Gruntfile.js)

爷,独闯天下 提交于 2019-12-11 01:58:02
问题 I am using bower for asset management. The Bootstrap bower repo is coming with a Gruntfile.js. Is there a way to exclude this from the linker? I have tried: var jsFilesToInject = [ '!**Gruntfile.js', // ... ] But it's not working - am I putting this string in the wrong spot? Generated HTML and Error File Structure P.S. I followed this guide to get here: StackOverFlow Question and ran bower install bootstrap and bower install angular . 回答1: This is a bug in the current sails frontend generator

Update to Grunt causes “Use of const in strict mode” error

别等时光非礼了梦想. 提交于 2019-12-11 00:55:16
问题 I did some things on our build server, which resulted in Grunt getting updated (oops), and it is now stuck using a new version of grunt-legacy-log-utils, which produces the following: K:\_work\4\s\Web\node_modules\grunt\node_modules\grunt-legacy-log\node_modules\grunt-legacy-log-utils\node_modules\chalk\index.js:2 const escapeStringRegexp = require('escape-string-regexp'); ^^^^^ SyntaxError: Use of const in strict mode. I have tried manually pulling in an older version globally, as well as

Bump a specific version number on SVN using Grunt

对着背影说爱祢 提交于 2019-12-10 23:35:35
问题 I have an AngularJS module, built with Grunt. The version of this module is managed in the package.json file. What I need to do I need to create a grunt task to release the module when needed. Here what this task must do : Perform a tag of the current module files on SVN (and it has to be SVN, not GIT). Upgrade the version in package.json to a given version (for example, I will pass --version = X.Y.Z as option to the grunt task). I don't want a solution based only on "patch", "minor" or

How can you get Grunt livereload to work inside Docker?

自作多情 提交于 2019-12-10 23:18:39
问题 I'm trying to use Docker as a dev environment in Windows. The app I'm developing uses Node, NPM and Bower for setting up the dev tools, and Grunt for its task running, and includes a live reload so the app updates when the code changes. Pretty standard. It works fine outside of Docker but I keep running into the Grunt error Fatal error: Unable to find local grunt. no matter how I try to do it inside Docker. My latest effort involves installing all the npm and bower dependencies to an app