daKmoR / rocket

Move to https://github.com/modernweb-dev/rocket/
MIT License
13 stars 5 forks source link

Infinite loop on adding .md file #100

Closed petecarapetyan closed 3 years ago

petecarapetyan commented 3 years ago

This is a nuisance level bug, hardly a deal killer, but here goes:

I was testing to see whether I had to shut down and restart npx rocket start if I added a new folder docs/foo and a new file docs/foo/index.md

So I ran npx rocket start and while it was running, added the above folder and file.

My shell went into an infinite loop, repeating on this line:

Copied 25 files / Wrote 9 files in 0.32 seconds (v0.11.1)
You saved while Eleventy was running, let’s run again. (57 remain)
File added: docs/_merged_assets/variables.css
File added: docs/_merged_assets/style.css
File added: docs/_merged_assets/octicon.svg
File added: docs/_merged_assets/markdown.css
File changed: docs/_merged_assets/logo.svg
File changed: docs/_merged_assets/layout.css
File changed: docs/_merged_assets/home-background.svg
File changed: docs/_merged_assets/head.html
File changed: docs/_merged_assets/handleServiceWorker.js
File changed: docs/_merged_assets/burger-menu.svg
File changed: docs/_merged_assets/brand-logos/gitlab.svg
File changed: docs/_merged_assets/brand-logos/github.svg
File changed: docs/_merged_assets/brand-logos/twitter.svg
File changed: docs/_merged_assets/_static/icons/android-chrome-192x192.png
File changed: docs/_merged_assets/_static/icons/favicon-16x16.png
File changed: docs/_merged_assets/_static/icons/android-chrome-512x512.png
File changed: docs/_merged_assets/_static/icons/apple-touch-icon.png
File changed: docs/_merged_assets/_static/icons/favicon-32x32.png
File changed: docs/_merged_assets/_static/icons/icon-128x128.png
File changed: docs/_merged_assets/_static/icons/icon-512x512.png
File changed: docs/_merged_assets/_static/icons/maskable-icon-128x128.png
File changed: docs/_merged_assets/_static/icons/maskable-icon.png
File changed: docs/_merged_assets/_static/icons/mstile-150x150.png
File changed: docs/_merged_assets/_static/icons/safari-pinned-tab.svg
File changed: docs/_merged_data/siteUrl.cjs
File changed: docs/_merged_data/site.cjs
File changed: docs/_merged_data/rocketLaunch.json
File changed: docs/_merged_data/layout.cjs
File changed: docs/_merged_data/footer.json
Writing _site-dev/index.html from ./docs/index.md.
Writing _site-dev/foo/index.html from ./docs/foo/index.md.
Writing _site-dev/_merged_assets/head/index.html from ./docs/_merged_assets/head.html.
Writing _site-dev/blah/index.html from ./docs/blah/index.md.
Writing _site-dev/yada/index.html from ./docs/yada/index.md.
Writing _site-dev/yada/making-things-happen/getting-started/index.html from ./docs/yada/making-things-happen/getting-started.md.
Writing _site-dev/yada/making-things-happen/index.html from ./docs/yada/making-things-happen/index.md.
Writing _site-dev/blah/interesting-points/blah-more/index.html from ./docs/blah/interesting-points/blah-more.md.
Writing _site-dev/blah/interesting-points/index.html from ./docs/blah/interesting-points/index.md.
File changed: docs/_merged_data/footer.json
File changed: docs/_merged_includes/with-sidebar.njk
File changed: docs/_merged_includes/with-index.njk
File changed: docs/_merged_includes/search/input.njk
File changed: docs/_merged_includes/pure-content.njk
File changed: docs/_merged_includes/partials/previousNext.njk
File changed: docs/_merged_includes/partials/pageJs.njk
File changed: docs/_merged_includes/partials/mobileNavigationJs.njk
File changed: docs/_merged_includes/partials/mobile-sidebar-bottom.njk
File changed: docs/_merged_includes/partials/logoLink.njk
File changed: docs/_merged_includes/partials/addTitleHeadline.njk
File changed: docs/_merged_includes/partials/blog-content-footer.njk
File changed: docs/_merged_includes/partials/darkModeJs.njk
File changed: docs/_merged_includes/partials/content-footer.njk
File changed: docs/_merged_includes/partials/footer.njk
File changed: docs/_merged_includes/partials/header.njk
File changed: docs/_merged_includes/partials/head-content.njk
File changed: docs/_merged_includes/home.njk
File changed: docs/_merged_includes/blog-overview.njk
File changed: docs/_merged_includes/blog-details.njk
Using pathPrefix: /_site-dev
Copied 25 files / Wrote 9 files in 0.27 seconds (v0.11.1)
You saved while Eleventy was running, let’s run again. (49 remain)

Workaround is not problem, just control-c and npx rocket start

daKmoR commented 3 years ago

I cannot reproduce this 🤔

are you sure you did step 3? https://wip-rocket.netlify.app/guides/first-pages/getting-started/#setup

Add to your .gitignore

## Rocket ignore files (need to be the full relative path to the folders)
docs/_merged_data/
docs/_merged_assets/
docs/_merged_includes/

PS: what I found however was that adding top level folders (e.g. guides/docs/blog) requires a reload in order to shop up in the topbar as they are only defined as to menu in the config on startup... => maybe worth a note 🤔

petecarapetyan commented 3 years ago

Will leave a comment in the docs. Else a user like me might do as I did "Oh, I'm not going to commit this project to git because I'm just trying it out" and thus leave this step out.