Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deal with res is null. #106

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

evanvosberg
Copy link

In some cases nothing changed and res will be just null.
In this case the task will fail with "Cannot read property 'map' of null".

As the destination might be different from the source the file should be just copied.

In some cases nothing changed and res will be just null. 
In this case the task will fail with "Cannot read property 'map' of null".

As the destination might be different from the source the file should be just copied.
@nicolo-ribaudo
Copy link
Member

transformFileAsync returns null not when nothing is changed, but when the file is explicitly ignored. If it's ignored I think we should ignore it rather than copying it.

@evanvosberg
Copy link
Author

In my opinion the babel-grunt task is a combination of copy and process by Babel.

The files src and destination is not necessarily the same, therefor the task includes copy beside processing by Babel.

The task defines files to copy and process by Babel, but the babel config (.babelrc) might exclude some from processing. But this is a Babel setting not a src > dest setting, therefor I think it should get copied.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants