Questions tagged [grunt-contrib-copy]

Copy files and folders.

Grunt task to copy files and folders.

131 questions
0
votes
1 answer

Copying everything recursively with grunt-contrib-copy, omitting part of the structure?

Say I have this directory setup: +-- gruntfile.js | +-- src/ | | | +-- lib/ | | | +-- imgs/** | | | +-- js/** And I want to create a distribution folder using grunt-contrib-copy: +-- gruntfile.js | +-- app/ …
shennan
  • 10,798
  • 5
  • 44
  • 79
0
votes
1 answer

Grunt-contrib-copy temporary disable path filters

Hi I'm using this filter var fs = require('fs'); function onlyNew(target) { return function(filepath) { var src = fs.statSync(filepath).mtime.getTime(); var dest = grunt.config(target.concat('dest')) + …
AlasdairC
  • 190
  • 1
  • 1
  • 14
0
votes
1 answer

How to copy a sub directory to a root directory using grunt-contrib-copy?

My structure is like below. I want to copy assets folder from app directory to dist directory? app assets imgs css fonts index.html dist
Tapas Jena
  • 1,069
  • 4
  • 14
  • 23
0
votes
2 answers

Copy files with grunt skip source folder

There is source folder and publish folder in the project. I want to copy all files and folders from source to publish. Related code from Gruntfiles.js: grunt.initConfig({ copy: { main: { files: [ { src:…
Artur A
  • 7,115
  • 57
  • 60
0
votes
1 answer

Using Regex in grunt-contrib-copy's "process" option not working

I'm trying to remove my live reload script from my index.html file dynamically using Grunt's copy plugin. The part of my Gruntfile with the code in question is here: copy: { main: { files: [ { …
papiro
  • 2,158
  • 1
  • 20
  • 29
0
votes
0 answers

Exclude subdirectory in Grunt-contrib-copy

I'm copying some folders with grunt-contrib-copy. I'm trying to exclude a subdirectory in the root. I can prevent the contents of the _sprites folder from being copied, but inevitably the sprites copy is always copied. How do I prevent the folder…
Jason
  • 4,079
  • 4
  • 22
  • 32
0
votes
1 answer

How to get grunt-contrib-copy to ignore folder

var developmentFolder = './Development/'; var productionFolder = './Production/'; copy: { main: { files: [ { expand: true, cwd: developmentFolder, src: [developmentFolder +…
Ryan Printup
  • 456
  • 3
  • 9
0
votes
1 answer

Grunt Copy task overwrites destination parent directory

I'm fairly new to Grunt. I am trying to copy each sub directory from one location and place each in another destination directory. I am doing this in a custom grunt task because I cannot be sure how many sub directories will exist in the source…
Nick
  • 19,198
  • 51
  • 185
  • 312
0
votes
1 answer

grunt-contrib-copy dies with EPERM operation not permitted "C:\Documents and Settings"

I am trying to run a simple grunt task using grunt-contrib-copy, but it dies immediately on reaching the copy task, with this message: Running "copy:main" (copy) task Warning: EPERM, operation not permitted 'C:\Documents and Settings' Use --force…
elixenide
  • 44,308
  • 16
  • 74
  • 100
0
votes
0 answers

grunt-contrib-copy files are not copied to the correct locaiton

I am trying to copy cshtml files to the production folder. the files are located in the path: a\b\c\d and the destination is a\b\e the task is copy: { copyCSHtml: { src: '../NGWeb/client/app/appComponents/**/*.cshtml', …
li-raz
  • 1,678
  • 2
  • 29
  • 57
0
votes
1 answer

Using compass in a grunt build is it possible to compile a different set of sass files depending on if running compass:server vs compass:dist?

Basically, I want to have a partial called _variables.scss for production and _variables-test.scss for testing. I need to set a path variable for font-awesome that will be different in production than when simply testing using "grunt serve" because…
Patrick Grimard
  • 7,033
  • 8
  • 51
  • 68
0
votes
2 answers

Grunt copying to location has full src path location appended, instead of just the dest property

I am trying do the following: FOLDERS.GRUNT = "js/grunt" grunt.initConfig({ //copies from .tmp to final locations copy: { dist: { files: [{ expand: true, dot: true, dest: FOLDERS.GRUNT, src:…
Nikos
  • 7,295
  • 7
  • 52
  • 88
0
votes
1 answer

Copy files but lose folder structure

I'm trying to copy everything in my css directory, including any nested folders and files in those folders. copy: { main: { options: { expand: true }, files: [ { src:…
panthro
  • 22,779
  • 66
  • 183
  • 324
0
votes
2 answers

grunt copy task is misbehaving

Update Part of the problem is that front/styles contains both css and scss files. I only want to copy css files. Original So the copy task from grunt-contrib-copy should be doing one thing. Copying all the *.css files from front/styles and move them…
Kylee
  • 1,625
  • 1
  • 31
  • 54
0
votes
1 answer

Copy directory/files form multiple src forders to one dest

I'm trying to create a very simple copy task but it seems grunt-copy is not made for my usecase :-(. All I needed is the following: Source directory structure: vendor L subdir1 L assets L subdir2 L subdir3 …
Endian
  • 13
  • 1
  • 4
1 2 3
8
9