Questions tagged [grunt-contrib-concat]

Concatenate many files into one

Grunt task to concatenate many files into one

174 questions
0
votes
1 answer

How to use concatenation/uglification with AngularJS without specifically setting each file in an order

I am building a project with AngularJS and I hope to use Grunt and grunt-contrib-concat (or something similar) to get all my angular components concatenated to one file. AngularJS components need to be concatenated in order, so that files with…
Don Subert
  • 2,636
  • 4
  • 27
  • 37
0
votes
1 answer

Grunt concats JS file multiple times

I'm working on a Node.js website and I'm using Grunt to concat and minify my CSS and JS files. However, after running the grunt command I'm getting the error message: fullPage: Fullpage.js can only be initialized once and you are doing it multiple…
Pallas
  • 1,499
  • 5
  • 25
  • 57
0
votes
0 answers

grunt-contrib-concat error: it duplicates my files

I use grunt concat, each file is duplicated 11 times in the result file. Here is my Gruntfile: module.exports = function(grunt) { grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), concat: { options: { …
Vivien Adnot
  • 1,157
  • 3
  • 14
  • 30
0
votes
1 answer

safely concatenating vendor javascript files using grunt - use strict

To speed up my web application load time, I wish to concatenate all my vendors (3rd party packages) javascript files. For instance, jQuery, Angular, and many bower packages. Some packages are scoping their "use strict" and some are not. I am worried…
0
votes
1 answer

Grunt - Not able to read external text file in GruntFile.js

I have directory structure as below apps |--GruntFile.js |--package.json |--js |--js.txt |--global |--backbone.js |--jquery.js |--lodash.js |--base.js |--css |--a.css |--b.css …
kcs
  • 31
  • 2
  • 7
0
votes
0 answers

Grunt concat generated file has no contents in it

I am using grunt to concat two file. Grunt runs successfully and even create a file but when I open the file, I don't see anything in it. The file is absolutely empty. The contents of my "GruntFile.js" is as under: grunt.initConfig({ pkg:…
0
votes
2 answers

Include banner between files in Grunt

I would like to concat into a single file plugins.js (out of jQuery function) fileA.js (jQuery function should start before this file) fileB.js ... fileZ.js (jQuery function should end after this file) At the same time I would like to use…
Alvaro
  • 9,247
  • 8
  • 49
  • 76
0
votes
1 answer

Uglify directly or concat and uglify

I am using grunt to build my JS project. I see that the uglify plugin for grunt is capable of merging multiple JS files into a single file and uglify them. Given this feature, I am wondering if there is a need to use concat plugin at all. Can I…
Aneesh
  • 579
  • 2
  • 5
  • 21
0
votes
1 answer

Uglify or concat a JavaScript file conditionallly

I have in my Scripts folder a "Lib" folder and an "App" folder. The Lib folder contains 3rd part library JavaScript files. Some of these are minified without the original sources, others we have the original sources for. The App folder contains…
0
votes
0 answers

merge two xml using grunt

how to merge two xml files using grunt. I need to merge two xml files A.xml numberone B.xml numbertwo after merging the xml will be…
0
votes
2 answers

Grunt Task Runner to concatenate files

I am writing grunt to concatenate files dynamically, for that I have array of files in my grunt.config variable. How to use that in grunt concat. I am writing grunt.config('jsResources', targetConfig); from dynamically text-replace function. Its…
Sankalp
  • 1,300
  • 5
  • 28
  • 52
0
votes
1 answer

Grunt: Why is concat and uglify not working when the watch task sees a file change?

Grunt doesn't concat and uglify my javascript files when these files are changed and changes are watched for. If I run grunt concat the js files are concatenated as expected. If I then run grunt uglify the files are uglified as expected. However…
user1532669
  • 2,288
  • 4
  • 36
  • 72
0
votes
1 answer

Module grunt-contrib-coffee for Grunt creates subfolder for each file

My question is in subject. I have the following config for this module: grunt.initConfig({ coffee: { options: { bare: true }, scripts: { expand: true, flatten: true, cwd:…
RRRPro
  • 3
  • 2
0
votes
1 answer

How do you use grunt-generated minification maps?

I'm using grunt to concat(grunt-concat) and minify ( grunt-uglify ) my JS files and I've found the option for source maps which I have enabled. This now generates minification maps for the concat process and the minification process. My question is…
0
votes
0 answers

GRUNT: Concatenated CSS files not reflecting in index.html page

I have setup grunt task to concatenate the CSS files into a combined.css file and it successfully concatenates the CSS files. grunt.initConfig({ concat: { options: { separator: '\n\n\n', base: "../../../", …
Naren
  • 109
  • 1
  • 3
  • 13