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

fix: create parent directories if not exist in generate mode #87

Merged
merged 2 commits into from
Jul 14, 2020

Conversation

rclement
Copy link
Contributor

@rclement rclement commented Jul 13, 2020

Make sure to create all parents directories for the output feed files in "generate mode".

Since commit 8832f39, the usage of fs-extra.outputFile has been replaced with fs.writeFileSync. However, there is a subtle behavior change: while fs-extra.outputFile was creating all parent directories automatically, fs.writeFileSync does not. Thus all parent directories need to be created if not present already.
Resolves #85.

@codecov
Copy link

codecov bot commented Jul 13, 2020

Codecov Report

Merging #87 into master will increase coverage by 0.11%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #87      +/-   ##
==========================================
+ Coverage   98.27%   98.38%   +0.11%     
==========================================
  Files           2        2              
  Lines          58       62       +4     
  Branches        8        9       +1     
==========================================
+ Hits           57       61       +4     
  Misses          1        1              
Impacted Files Coverage Δ
lib/module.js 98.33% <100.00%> (+0.11%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1224ecc...0584793. Read the comment docs.

@TheAlexLichter
Copy link
Member

Thanks a lot for the PR! Could you add a small test case for such a scenario as well? That'd be awesome 🙌

@rclement
Copy link
Contributor Author

@manniL I'll try adding a test case for it as soon as I can

@TheAlexLichter TheAlexLichter self-requested a review July 13, 2020 10:59
@TheAlexLichter TheAlexLichter merged commit 7c8595d into nuxt-community:master Jul 14, 2020
@briancbarrow
Copy link

briancbarrow commented Aug 20, 2021

@manniL did this ever get published? I'm still running into the issue on my repo. When I looked at the file in my node_modules folder, i don't see these changes in there. Can we push this to NPM?

@rclement
Copy link
Contributor Author

@briancbarrow In the meantime, you can install it from the Git repo:

npm install github:nuxt-community/feed-module#master

@TheAlexLichter
Copy link
Member

Will trigger a release this week 👍🏻

@RubenVanEldik
Copy link

Hi @manniL!

Has this PR been released yet? I got the same error earlier today.

RubenVanEldik added a commit to RubenVanEldik/hackerdaily-frontend that referenced this pull request Dec 16, 2021
RubenVanEldik added a commit to RubenVanEldik/hackerdaily-frontend that referenced this pull request Dec 16, 2021
abelsiqueira added a commit to abelsiqueira/abelsiqueira.github.io-old2 that referenced this pull request Oct 11, 2022
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.

Nuxt generate fails with version 2.0.0
4 participants