gruntfile is the the main configuration location for customizing grunt which is used for automating and running JavaScript tasks.
Questions tagged [gruntfile]
91 questions
1
vote
0 answers
GruntJS: Grunt Build in MEAN.JS
I'm using grunt and MEAN.JS.
Before the last commit in git I execute grunt build and created dist directory with: application.js, application.min.css and application.min.js
The NODE_ENV varibale is development.
I add the new references in…

Aral Roca
- 5,442
- 8
- 47
- 78
1
vote
1 answer
How to compile main.less when I save other.less using gruntfile.js
I have several .less files for my site, and the main one imports the others. I've come across the situation where I make changes in the other.less file which grunt will compile, but it won't compile the main.less file which is the only one that I…

JoelG
- 129
- 2
- 4
1
vote
1 answer
Yeoman - Gruntfile.js generates source map at build but deletes it after any changes
I installed Yeoman with angular generator, and it created Gruntfile.js. The problem is that after launching the webserver in the terminal with:
grunt serve
Yeoman generates main.css with in the end the reference of the source map
/*#…

Ruben Rizzi
- 342
- 1
- 3
- 20
1
vote
1 answer
cssmin grunt plugin generates incorrect source urls in sourcemap
cssmin grunt plugin grunt-contrib-cssmin trims leading slash in css sourcemap sources url, thus making css mapping incorrect. Meanwhile after editing sourcemap file by hand (adding leading slash to each source url) everything seems to be mapped…
1
vote
1 answer
angular fullstack injection of sass files seems a bit strange?
I have a relatively large angular project built around yo angular-fullstack. I am not familiar with sass files and have been using them as it they were simple css files. What I find very strange it that when I have a controller (example) which has…

JoelParke
- 2,676
- 2
- 24
- 38
1
vote
1 answer
Minify typescript files using Grunt
I wanted to minify typescript files in my angular app.I tried by giving grunt command in my Gruntfile.js as
uglify:{
ts:{
src:['test/scripts/**/*.ts'],
dest:'test/scripts/**/*.ts'
},
…

forgottofly
- 2,729
- 11
- 51
- 93
0
votes
0 answers
how to convert every sass file to css automatically with grunt
I want to convert all my scss files(located in sass/ folder) to css files(located in css/ folder) automatically on save. And I want it to work even with the new ones. For example, I had index-style.scss and header-style.scss, already converted to…

Богдан Иманкулов
- 50
- 1
- 6
0
votes
1 answer
In Grunt, how can I set package.json version to a specific version using Grunt plugins?
UPDATE:
The grunt-bump plugin only works for versions that meet the semantic versioning format. If I use a version, e.g., test-2.0.0 that doesn't meet semver, it doesn't work.
grunt-cli v1.4.2
Using a Gruntfile.js, how can I set my package.json to a…

Chris F
- 14,337
- 30
- 94
- 192
0
votes
1 answer
Dynamic merge of JSON files in Gruntfile.js
In my gruntfile.js I'm using this plugin `grunt.loadNpmTasks('grunt-json-merge'); and I'm trying to merge two JSON files using this code:
json_merge: {
files: {
files: { 'dest/resources/locales/merged.json':
…

staticx
- 1,201
- 2
- 16
- 31
0
votes
0 answers
Fixing Gruntfile.js after updating version
I have a Sails.js app with some legacy code. The original developer of the app followed this Stackoverflow answer to organize grunt tasks and the directory structure for them. However, with Grunt ^1.0.4, Gruntfile.js throws the following error when…

Jeff
- 5
- 2
- 7
0
votes
1 answer
JsHint Error in Gruntfile
I get the following error after having updated VS2017: "Warning: The "path" argument must be of type string. Received type object. Use --force to continue."
The jshint section of my Gruntfile:
jshint: {
files: ['temp/*.js',
…

Ungaro
- 522
- 6
- 15
0
votes
0 answers
Fatal error: Unable to find local grunt. With Gruntfile.js
(beginner post)(OS : mac)
I just install grunt on my local, and edit my "Gruntfile.js" in my project and when I try this :
grunt -v
It return :
Fatal error: Unable to find local grunt.
I'm well in my project and no problem for install using this…

BobRock
- 21
- 1
- 7
0
votes
2 answers
Grunt error task "default" not found
When trying to run grunt, I get an error message:
Warning: Task "default" not found. Use --force to continue.
Aborted due to warnings.
I have already found several posts on this topic, and in each of them the problem was a missing comma. But in my…

vtomic85
- 590
- 1
- 11
- 32
0
votes
1 answer
How can I get my grunt mocha test result in a html file?
Using
mochaTest: {
test: {
options: {
reporter: 'html-cov',
captureFile: 'coverage.html'
},
src: ['tests/*.js']
}
}
in my gruntfile is gives me
"html-cov" reporter not found
warning.
How can I get my test result in…

MeseleŞuki
- 17
- 5
0
votes
1 answer
grunt watch task is not watching js files just says waiting
I have been trying to configure this gruntfile for days, I have seen and read multiple documents on how to set it up. I have been able to set it up so I can run individual tasks by typing in the individual commands into bash:
grunt uglify
grunt…

Vladimir Mujakovic
- 650
- 1
- 7
- 21