-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Fix writing files in subfolders inside dist directory #1097
Conversation
- Added tests for pug - Added config files support (.pugrc, .pugrc.js, pug.config.js) - Added custom filters support (must be declared in config file in section 'filters')
Sorry for trash commits, merging upstream gives me conflicts 😖 |
src/packagers/RawPackager.js
Outdated
@@ -12,6 +13,12 @@ class RawPackager extends Packager { | |||
contents = await fs.readFile(contents ? contents.path : asset.name); | |||
} | |||
|
|||
// Create output path if not exist | |||
const dir = path.dirname(this.bundle.name); | |||
if (!await fs.exists(dir)) { |
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.
I think you can directly do fs.mkdirp
, mkdirp
will internally check if the directory exists. It will save a few I/O calls
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.
Thanks, I'll fix that ASAP
yarn.lock
Outdated
@@ -6628,6 +6628,8 @@ void-elements@^2.0.1: | |||
version "2.0.1" | |||
resolved "https://registry.yarnpkg.com/void-elements/-/void-elements-2.0.1.tgz#c066afb582bb1cb4128d60ea92392e94d5e9dbec" | |||
|
|||
<<<<<<< HEAD |
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.
looks like merge issue
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.
@devongovett my bad :(
Updated slightly to ignore the |
Related to #1096. If static files placed in subfolders, parcel throws error in
fs.writeFile
because those subfolders doesn't created inside dist.