-
Notifications
You must be signed in to change notification settings - Fork 23
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
[INTERNAL] Task createDebugFiles checks path before writes #43
Conversation
Pull Request Test Coverage Report for Build 222
💛 - Coveralls |
This solves the first point in issue #36 |
Build time comparison with openui5-sample-app: master
debug_file_check_existence_before_write
SummaryThe extra check of path existence in the workspace doesn't prolong the build time. |
Could you squash those commits into one? |
461a8ea
to
eced8b5
Compare
Somehow the squash doesn't work well, I am working on it. |
eced8b5
to
e45a0db
Compare
I forgot Now everything should be OK. |
lib/processors/debugFileCreator.js
Outdated
// previous tasks | ||
return stat(resource.getPath().replace(options.pattern, options.replacement)) | ||
.then( | ||
// if the file can be found, it should be filtered out from createing debug file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
createing => creating
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
lib/processors/debugFileCreator.js
Outdated
} | ||
); | ||
}) | ||
).then((stats) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about results
instead of stats
, as the array doesn't contain any stat info?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
lib/processors/debugFileCreator.js
Outdated
return stats.filter((stat) => { | ||
return !!stat; | ||
}); | ||
}).then((filteredResource) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
filteredResource
=> filteredResources
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
- The debugFileCreator processor checks whether the debug file path is used and only writes the content to the path when it's not used yet. - The debug file path can be used, for example, by the createBundle task which may create a specific bundle for the debug version of another bundle. In this case, the debugFileCreator shouldn't overwrite the created debug bundle.
e45a0db
to
e9db432
Compare
The
debugFileCreator
processor checks whether the debug file pathis used and only writes the content to the path when it's not
used yet.
The debug file path can be used, for example, by the
createBundle
task which may create a specific bundle for the debug version of
another bundle. In this case, the
debugFileCreator
shouldn'toverwrite the created debug bundle.