Comments (8)
that is exactly the issue. we really only know about the files that exist so based on that a basePath is found. this is assist in preventing deep folder structures say you are copying a set of files that were generated by another task into a compiled/type/{files} setup, before basePath you would end up with compiled
being the root of the copied structure. however basePath finds type
to be the root because it has the files your minimatch told it about. it effectively just compressed the depth by 2 levels.
you can easily override and set basePath
to stuff
to get expected results. this seems to come up a bit but the task was never intended to work like cp
. It is a copier using grunt conventions and usually you'd be dealing with compiled results so thats why it auto-attempts to find basePath.
from grunt-contrib-copy.
Okay, I guess I would recommend being even more explicit about this important distinction.
I did read the "Recent Confusion" section of this task's README, but being a new Grunt user, I did not realize that "designed to use grunt conventions" means "omits directories". Since you are saying this is as designed, perhaps an additional example demonstrating this behavior would be helpful. Is there any grunt documentation that would lead me to expect this convention? When I read the source of this task, the only conclusion I came to was that this was some kind of bug, because this choice seems very surprising to me.
from grunt-contrib-copy.
Any chance you could distill your last post into a sentence or two that can go in the basePath section for the readme on this task?
from grunt-contrib-copy.
ill see what i can come up with, i think im going to revisit how basePath works a bit. one thing i plan to add is option to use false
and have it leaves paths alone for those who aren't happy with its results, i also want to make a helper that does all the trimming of basePath from a string just so its centralized.
from grunt-contrib-copy.
please see #18. added notes and added ability to pass false to disable completely. think this issue can be closed.
from grunt-contrib-copy.
faced with the same issue. It's better to have option for such behavior that a bit unexpected.
from grunt-contrib-copy.
basePath is replaced with cwd in v0.4 devel. this should resolve a lot of the confusion.
from grunt-contrib-copy.
this can be closed as its resolved with new cwd feature in devel
from grunt-contrib-copy.
Related Issues (20)
- hide page HOT 1
- What is it do when copy?
- syncTimestamp running even if timestamp option is false HOT 2
- Document options HOT 1
- Using expand with --no-write fails
- timestampEqual test fails on i386 Linux
- file not copied [no src] HOT 1
- Question than issue
- Copy task not working in windows running forever HOT 5
- Audio files are breaking :'( HOT 1
- Process Function Corrupts Images and fons files
- How to resolve the below error ? HOT 2
- Replace not working with multiple files.
- .filename not copied with src: **/**
- node Assertion failed on copy HOT 3
- Decompose list and move the files in the list to an existing directory
- Xgboost and Bayesian Optimization HOT 1
- Slow on windows HOT 2
- Grunt-Copy-JS annoying Warning: EPERM: operation not permitted, futime Use --force to continue. HOT 2
- Copy files is broken after update Grunt v1.6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from grunt-contrib-copy.