Questions tagged [grunt-contrib-copy]

Copy files and folders.

Grunt task to copy files and folders.

131 questions
1
vote
1 answer

How to select all files, but exclude particular file extensions in a directory

I wanted to copy all files in a folder, but I wanted to exclude a particular file-extension in a sub-folder. How can I do that? Here's a snippet of my code: frontendDev: { files: [{ expand: true, cwd: './frontend/app', …
Rene Padillo
  • 2,250
  • 4
  • 26
  • 39
1
vote
1 answer

Grunt-contrib-copy: variables within the rename function

I have the following copy task in a gruntfile.js copy: { css: { expand: true, cwd: 'min/css', src: 'theme_<%= props.majorversion %>.<%= props.minorversion %>.min.css', dest:…
Chris J
  • 552
  • 2
  • 7
  • 14
1
vote
1 answer

How do I reuse a grunt copy task for multiple destinations dynamically?

Instead of adding the destinations in the dest attribute I would like to make it dynamic so I can assign the destinations when I run the task from the command line or when I run it from another task. That way I can copy the file to any folder(s) I…
1
vote
1 answer

Grunt: change file extension at build

I would like to write a Grunt task that, during build, will copy all .html files that I have and make an .asp version of it in /dist as well. I have been trying to use grunt-contrib-copy to accomplish this, and here's what I have: copy: { //some…
GloryOfThe80s
  • 161
  • 1
  • 1
  • 8
1
vote
0 answers

How to copy files using regex with grunt.js?

I want to copy all js into one folder which belongs to angular Like angular, angular-cookies, angular-resource and angular-route etc. I was trying to add regex for cwd but it fails to copy. Folder Structure: app(route…
user1127804
  • 35
  • 1
  • 6
1
vote
1 answer

Getting "Warning: EPERM, operation not permitted" when using grunt-contrib-copy but file does copy

I want to copy style.css in the build directory to overwrite the style.css in the main project directory. This is my file structure project ├── assets │ ├── styles │ │ └── build │ │ └── style.css │ └── gruntfile.js └── style.css In…
laurayeffeth
  • 41
  • 1
  • 6
1
vote
1 answer

Copy one file to multiple folders with grunt

Is it possible to copy one file to multiple directories with Grunt? ie : expand: true, cwd: '<%= yeoman.app %>', dest: '<%= yeoman.app %>/client/*', src: 'core/index.html' Where the * is all the subfolders inside the clients folder. Thank you!
1
vote
1 answer

globbing pattern to copy files from a particular folder within another folder

I have the following directories tree: - client - plugins - plugin1 - plugin2 - plugin3 - widgets - widget1 - widget2 - resources - img I need to copy all files from…
Max Koretskyi
  • 101,079
  • 60
  • 333
  • 488
1
vote
1 answer

Grunt copy and fontawesome fonts

I have installed fontawesome with bower and am using grunt's "grunt-contrib-copy" to copy it to a diff directory. When I manually copy it, the font works ... but, when grunt does it, they do not work. Now, I checked the files, and I noticed grunt's…
AbdealiLoKo
  • 3,261
  • 2
  • 20
  • 36
1
vote
0 answers

grunt-copy not re-sending the files from my 'development' folder into 'production', when I modify a file

Looks like it's not re-copying my files when I click save anywhere on my development files (so I want to re-copy onto the Production folder immediately). Here is the part from my Gruntfile.js. Location of this file: /development/Gruntfile.js Where I…
Lanti
  • 2,299
  • 2
  • 36
  • 69
1
vote
1 answer

Unable to process a file using grunt copy-task

I'm trying to use grunt-contrib-copy (version 0.4.1) to rewrite some strings inside a file during the build process. As a test I can copy the file, so it's not a permissions or location problem. These are the options for the fileProcessor task (in…
Fugue
  • 416
  • 6
  • 20
1
vote
2 answers

grunt contrib copy and replace text in file using RegEx

I have a grunt contrib copy task that will copy a file correctly, but I would also like to change a file path that is repeated through out the the content of the file that is being copied. I do not have a lot of experience with javascript regular…
user3221374
  • 13
  • 1
  • 3
1
vote
1 answer

How to use grunt-contrib-copy to copy to root AND change directory structure

I have an express app with my dev views in /assets/views. I figure I need to separate development and production views because in production I'll be editing the HTML when I used grunt-contrib-usemin to concat/uglify scripts. So here's the problem.…
imjared
  • 19,492
  • 4
  • 49
  • 72
0
votes
0 answers

grunt-contrib-copy stops with EEXIST error

I am using grunt-contrib-copy to create a build/ folder for my NodeJS express application before deploying it. When running the command, it fails with the error that the folder already exists (Error code: EEXIST). The copy block in the Gruntfile…
Alexander
  • 372
  • 1
  • 2
  • 8
0
votes
0 answers

Gruntjs: How do I build a dynamic destination path using grunt-contrib-copy?

Not sure if this is possible, but I want to specify a variable to construct a destination path when using grunt-contrib-copy like so: module.exports = function(grunt) { var $globals = { buildPath: 'default' }; …
Redtopia
  • 4,947
  • 7
  • 45
  • 68
1 2 3
8 9