Questions tagged [grunt-contrib-concat]

Concatenate many files into one

Grunt task to concatenate many files into one

174 questions
0
votes
1 answer

Create a dynamic array for use in grunt concat

I need to concatenate a set files based on variables I have defined my package.json. // package.json ... "layouts": [ { "page": "home", "version": "a" }, { "page": "about", "version": "a" }, { …
nickspiel
  • 5,170
  • 6
  • 33
  • 48
0
votes
0 answers

Grunt usemin with JSP's

I am using grunt usemin plugin to minify my javascripts on a JSP page. I would like to extend grunt features to achieve code similar to the one below; basically add some jsp scriptlet feature code using processhtml or template plugins so that there…
0
votes
0 answers

Using grunt contrib concat to get it's source files from index.html

I am using grunt-contrib-concat and I need a way to automate my vendor concatenation step. Right now, I specify manually in my GruntFile what vendor libraries should be concatenated. Is there a way to get their names from my index.html? Using just…
Dany D
  • 1,189
  • 2
  • 18
  • 44
0
votes
1 answer

How can I run concat for cases without any scripts?

As a part of my Gruntfile.js: ... concat: { ... js: { src: [ 'src/**/*.js' ], dest: 'build/js/main.js', nonull: true } }, ... How can I prevent concat from generating a blank main.js if my…
tenub
  • 3,386
  • 1
  • 16
  • 25
0
votes
1 answer

How to include third party library with Grunt

New to Grunt, and have been using it for the first time to combine/minify JS files for a project. Currently have this (relevant section) in Gruntfile.js: concat: { options: { banner: '<%= banner %>', stripBanners: true …
Matt McDonald
  • 4,791
  • 2
  • 34
  • 55
0
votes
1 answer

Grunt reference error

Gruntfile.js module.exports = functions(grunt) { grunt.initConfig({ //pkg: grunt.file.readJSON('package.json'), concat: { options: { separator: ';', }, dist: { src: …
0
votes
0 answers

Rails Asset Pipeline to a Grunt based approach

I wish to try out Grunt so for a task I have duplicated a project and want to convert it from using the default asset pipeline to work all via Grunt and it's tasks. I can then evaluate both approaches and go for what I think turns out the best. I…
rctneil
  • 7,016
  • 10
  • 40
  • 83
0
votes
1 answer

Dryer file paths with Grunt

I am adding grunt to a project and I am creating several JS files using the CONCAT task but I would like to dry up the file path rather then repeating static/js/... concat: { libraries: { src: ['static/js/jquery-ui-1.9.2.custom.min.js'], dest:…
Dan Mitchell
  • 844
  • 2
  • 15
  • 34
0
votes
1 answer

I am getting warning when I run Grunt saying 'default' task not found

I am new to Grunt. Whenever I have run the Grunt command it gives this warning and aborts. The warning is given below. Loading "Gruntfile.js" tasks...ERROR TypeError: Object # has no method 'loadNpmtasks' Warning: Task "default" not found. Use…
odbhut.shei.chhele
  • 5,834
  • 16
  • 69
  • 109
0
votes
1 answer

Interpolated array in Grunt template is interpreted as a string

Previous title: "Why is Grunt's concat task not using dynamic configuration values?" I am trying to dynamically configure the files that are concatenated by Grunt, and in doing so I came across this issue where the grunt-contrib-concat plugin does…
oligofren
  • 20,744
  • 16
  • 93
  • 180
0
votes
1 answer

Grunt: how to concat a .CSS file onto my compiled .SCSS files?

I'm learning grunt and it's wonderful! background: My project is built using SASS (.scss), and I use grunt's compass plugin to compile multiple .scss into a single .CSS on output. problem: I am using a jQuery plugin which has a .css file associated…
tdc
  • 5,174
  • 12
  • 53
  • 102
0
votes
1 answer

Concating json with grunt-contrib-concat is not setting the separator

I have several json-files I want to concat, but the seperator is not inserted in the final file. The concat part of my gruntfile: concat: { options: { seperator: ',' }, dist: { src:…
koffeingeladen
  • 325
  • 1
  • 2
  • 11
0
votes
1 answer

Grunt. Programmatically merge corresponding files in parallel folders with concat

that's my first post on StackOverflow!:D I mean... ever! Anyway... I couldn't find any clear answer to this, and maybe I'm missing something really obvious. I'm really new to Grunt as well. I'm looking for a way to merge parallel css files in two…
Eriol84
  • 3
  • 2
0
votes
1 answer

Include dynamically generated filenames in grunt-concat build step

As part of our Grunt build we are transpiling some typescript code into a few separate files, and then concatenating the resulting javascript along with all the rest of our javascript code. Unfortunately I can't get the dynamic buildup of filenames…
oligofren
  • 20,744
  • 16
  • 93
  • 180
0
votes
1 answer

grunt-contrib-concat not including certain file

When using the command NODE_ENV=development grunt, grunt-contrib-concat isn't concatenating public/javascripts/environments/app.development.js. module.exports = function (grunt) { grunt.initConfig({ env: process.env.NODE_ENV, src: { …
James Brewer
  • 1,745
  • 14
  • 17
1 2 3
11
12