Questions tagged [grunt-contrib-concat]

Concatenate many files into one

Grunt task to concatenate many files into one

174 questions
0
votes
1 answer

Using Grunt html2js and concat, how do I reference a html file from the concat js file

I have a very large modularized AngularJS Application. I setup Grunt to create a single JS file from the multiple html files using html2js. html2js: { options: { base: 'dol', module: 'dol.templates', …
anad2312
  • 787
  • 2
  • 8
  • 20
0
votes
1 answer

grunt-contrib-concat: specify last file to be concatenated?

I'm using grunt-contrib-concat to concatenate all my custom JS files together, and wrap them with an IIFE. I'm running into some load order issues ( namely, my init file is executing before some modules, causing undefined errors ). I want to specify…
tdc
  • 5,174
  • 12
  • 53
  • 102
0
votes
0 answers

Grunt concat - banner behaviour

I have a Grunt concat task that I am trying to understand how to apply banners to. If I supply a banner in the "options" object, it gets applied to each of my subtasks. This is by design, but it's not optimal-- each of the concat tasks would ideally…
Greg Pettit
  • 10,749
  • 5
  • 53
  • 72
0
votes
1 answer

Grunt concat results of concat

I am using Grunt for build tasks, and I have subdivided concatenation activities. In particular, I have a concat for Bootstrap, one for DataTables, and then one that takes those plus jQuery and attempts to make a monolith. I am quite certain that my…
Greg Pettit
  • 10,749
  • 5
  • 53
  • 72
0
votes
2 answers

new to grunt - warning: task "concat, uglify" not found

As the title says I'm new to Grunt. I am following a tutorial located at: http://24ways.org/2013/grunt-is-not-weird-and-hard/. It is an older tutorial but most seems to work the same. I have installed "grunt-contrib-concat" and…
0
votes
1 answer

Grunt coffee multiple tasks?

So, I have a project with a layout of src --library ----a.coffee ----b.coffee ----c.coffee --demo ----main.coffee I have grunt set up currently to compile coffeescript in src/library to intermediate/library, concat the results to…
0
votes
1 answer

Complex gruntjs tasks

I have the following scenario: concat some files uglify some files (based on the concatinated ones) concat a files to another file (that was uglified above) How would I write gruntfile.js? I tried something as this but it didn't…
Bill
  • 2,026
  • 9
  • 55
  • 99
0
votes
3 answers

Grunt + Concat + Angularjs

Setup: A Gruntfile with the following task: concat: { build: { files: { 'build/app.js': [ 'src/.js', 'src//.js', '!src/vendors/' ], } } A lot of angular modules,…
Diosney
  • 10,520
  • 15
  • 66
  • 111
0
votes
1 answer

Taking a variable value at runtime in Grunt-Concat task

I have implemented below Grunt configuration for concating two css files into a single css file(common_tfn_bsa.min.css ) in my jsp file.
meekhukun
  • 11
  • 2
  • 7
0
votes
1 answer

JS files getting duplicate in Grunt concat task

I'm facing a weird issue where my some of the files inside usemin blocks are getting duplicated in Grunt build task after Grunt concat. I've searched for it and found various answers like Grunt my code is duplicated in concat.js but not able to fix…
Shashank Agrawal
  • 25,161
  • 11
  • 89
  • 121
0
votes
1 answer

Replace all the text with specified replacement using grunt replace

I have a .html file which contains id="fixedtext", I want to replace all these id with id="uniquetext" the grunt-text-replace just replaces the first id it finds and doesnot parse the entire text. Any idea how can I make either grunt-text-replace…
patz
  • 1,306
  • 4
  • 25
  • 42
0
votes
1 answer

Insert id's into script tags using grunt

I want to insert id into the script tag gruntfile.js var obj = ['id1', 'id2', 'id3']; var i = 0; grunt.initConfig({ concat:{ basic:{ options:{ …
patz
  • 1,306
  • 4
  • 25
  • 42
0
votes
1 answer

add variable id in script tags using grunt

I have around 10 files for eg: file1.html, file2.html, fil31.html, file4.html Each file contains a starting and end script tag with blank id='' field I want to add id's to all the script tags in each file. The id's are the file names. before…
0
votes
0 answers

Grunt build with Yeoman generated Gruntfile breaks with EISDIR error code

I'm trying to run the default grunt build task with the Gruntfile.js generated file by yeoman. This file is working for the generated app but as soon as I replace the files with the ones of my current app I have a warning breaking the process. Here…
0
votes
1 answer

usemin not replacing paths within blocks

I have problems understanding the usemin(Prepare), described in here: usemin What I understand is, that with the usemin, you can combine many files as only one file, which would be a good idea when building your JS application. I also understand the…
Ville Miekk-oja
  • 18,749
  • 32
  • 70
  • 106