grunt-shell | Run shell commands | Command Line Interface library
kandi X-RAY | grunt-shell Summary
kandi X-RAY | grunt-shell Summary
Run shell commands
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of grunt-shell
grunt-shell Key Features
grunt-shell Examples and Code Snippets
Community Discussions
Trending Discussions on grunt-shell
QUESTION
I use Vue/Typscript with webpack. And everytime i open page inject.preload.js
throws an error like GET blob:http://URL/1fbc0606-8477-416b-a45f-50b4d824f2bb 0 ()
and i don't know where it comes from or why something got inject.
I tested it on Google Chrome Incognito mode and Firefox there is no error thrown.
How can i find out why this error occurs?
package.json
...ANSWER
Answered 2018-Jul-17 at 18:50The error occurs because of AdBlock extension. To verify you can fully disable the extension in chrome://extensions/ url.
QUESTION
I have a grunt-shell command which cp images files using brace expansion.
...ANSWER
Answered 2018-Dec-09 at 06:17I figured this is less of a nodejs problem but a unix shell issue which nodejs could avoid.
The issue is sh
doesn't support brace expansions, bash
does.
On my Mac, sh
is symlink to bash
and ubuntu (18.04) sh
is symlink to dash
(by the results this obviously doesn't support brace expansion).
Solution is to pass {shell: '/bin/bash'
} for brace expansion to work in unix systems instead of the default '/bin/sh' shell.
example using NodeJS exec
function: `exec('cp ./app/images/{.png,.jpg,*.ico} tmp/images', {shell: '/bin/bash'})
example using grunt-shell
QUESTION
Is it possible to run the default editor (which is set for git) using grunt-shell
to open and edit an file (on ubuntu)?
In my attempt it is running sublime, but every local system is using a different editor...
...ANSWER
Answered 2018-Apr-11 at 10:17Try:
QUESTION
Not sure if this is a bug, but I wasn’t able to find anything on the Web. Everything was working fine using a combination of Grunt, Jekyll and Homebrew to create my website. But once I updated to High Sierra the Jekyll build fails.
The way I usually run Jekyll build is via grunt-shell
task like so:
ANSWER
Answered 2017-Sep-29 at 17:23The issue ended up not being related to OS update, but rather a custom Jekyll plugin that was causing the issue. Once the plugin was removed everything worked. However, something did change perhaps in Jekyll or elsewhere to make the plugin not work all of the sudden. I will open a separate issue to figure that out. Thanks @Casper and @JoostS for quick responses.
QUESTION
I'm using grunt-shell and other custom tasks. And in my task i want to run this tasks step by step and check what tasks return. For example, pseudo code:
...ANSWER
Answered 2017-Sep-29 at 11:08You could consider using the grunt-shell
custom-callback feature to capture the responses and handle any conditional logic.
The following example gist when running $ grunt
via your command line will perform the following:
Change directory to a folder named
quux
in the projects root directory. If the folder namedquux
exists the following will be logged:Done: Successfully changed to directory 'quux'
However, if a folder named
quux
does not exist in the projects root directory the following will be logged:
The folder named 'quux' is missing
- Subsequently the
shell:create_folder
Task is run, which upon creating the folder namedquux
logs:
Successfully created folder named 'quux'
Finally the shell:go_to_folder
Task is run, which then reports point 1 above.
Gruntfile.js
QUESTION
I have a grunt script that is meant to kick off an Angular 2 build.
Running grunt
on the command line succeeds - the Angular build runs as expected.
Running the task from Task Runner Explorer in VS 2017 fails.
The Gruntfile.js is as follows:
...ANSWER
Answered 2017-Aug-04 at 14:28Thanks to Mads Kristensen for pointing to his 2 year old blogpost - turns out VS was using a different version of the tools compared to the command prompt.
QUESTION
I would like to set the NODE_ENV variable at the beginning of a Grunt task, to development
or production
, but it looks it's not as simple as I thought.
The reason, why I would like this is that I use grunt-webpack, which expects NODE_ENV to be set correctly to "development" or "production". But I also would like to initialize my tasks exclusively from grunt, if possible.
I created the following test Gruntfile, using the grunt-shell and cross-env modules:
...ANSWER
Answered 2017-Jul-21 at 15:55Your test won't work because grunt-shell runs a child_process and your callback runs after it ends and under the main process.
Same thing would happen with cross-env.
If you want to pass an environment variable to grunt-shell
, you should use the options configuration according to the documentation.
For example:
QUESTION
I am running following command on git bash (windows)
...ANSWER
Answered 2017-Jun-29 at 13:30With extglob (and globstar) the following syntax is correct the other [^
..]
is a negative character set.
QUESTION
I am working with nodejs and 'Jenkins' every day now for the past few months. Without making any changes to my package.json. Building my project at 'jenkins' I get the following error -
...ANSWER
Answered 2017-Mar-30 at 19:12I just ran into the same problem this morning with my own build. It would appear that the authors of gulp-sourcemaps
added a scoped dependency to their package.json
two days ago. I'm not familiar with scoped dependencies, but it would appear that's what causing npm install
to fail. I am on an older version of npm that doesn't have support for scoped dependencies, but it looks like you're on a newer version - it could be that they haven't published the dependency yet, or set it public since scoped dependencies default to private.
As a short-term fix, you can do as I did, and remove the ^
from your version specifier for gulp-sourcemaps
in your own package.json
, which will avoid pulling the latest version of gulp-sourcemaps
that has the new scoped dependency.
QUESTION
I have several grunt tasks which internally use grunt-shell
to execute various CLI commands.
I want to hide certain logs printed to the output console by these CLI commands.
Am trying to use grunt-reporter
for this but unable to get it working.
Gruntfile.js
...ANSWER
Answered 2017-Feb-08 at 13:06The short answer... It's not possible for grunt-reporter
by itself to hide logs generated by a grunt-shell
command.
The long answer including workaround... The logs from a grunt-shell
command are generated by the shell/bash command itself and not via a node package/script. The examples shown on the grunt-reporter
homepage are intercepting/manipulating a message from a node package written to stdout
.
Consider the following...
Simple gistCommunity Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install grunt-shell
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page