Coder Social home page Coder Social logo

Comments (11)

alexlafroscia avatar alexlafroscia commented on June 8, 2024 1

Cool. Should be really easy to do then! I'll put up a PR when I have a little OSS time, and would be happy to review a PR if you want to take a crack at it instead!

from vite-plugin-handlebars.

Chris2011 avatar Chris2011 commented on June 8, 2024 1

If you could add the section to your repo "Discussions" I think it will be better there, than here to talk about it :)

from vite-plugin-handlebars.

alexlafroscia avatar alexlafroscia commented on June 8, 2024

Yeah, that's definitely doable!

Would you imagine that you need to address the partial based on the directory it's in? Or would all of the partials end up in one top-level namespace?

I would assume the latter, but I suppose you could want to do something like the former...

from vite-plugin-handlebars.

Bohreromir avatar Bohreromir commented on June 8, 2024

All in one Namespace would be fine for me

from vite-plugin-handlebars.

Chris2011 avatar Chris2011 commented on June 8, 2024

Thx for the thread, I'm in the exact same situation :). Thx for the plugin btw.

from vite-plugin-handlebars.

Bohreromir avatar Bohreromir commented on June 8, 2024

See #28

from vite-plugin-handlebars.

Chris2011 avatar Chris2011 commented on June 8, 2024

Ahh I got it a bit wrong :D. I think it is nice to have multiple partials folders, but my use case is more to have a partial folder and inside of that, are all my partials in separate folders. So I need the ability to search for partials recursively partisl/**/*

Folder structure:

/partials
   /header
      header.hbs
      _header.css
      metaData.json
   /footer
   ...

But I think I need to create another ticket for that :)

from vite-plugin-handlebars.

Chris2011 avatar Chris2011 commented on June 8, 2024

The code just goes directly into one folder and not deeper.

from vite-plugin-handlebars.

alexlafroscia avatar alexlafroscia commented on June 8, 2024

Interesting! I could see supporting sub-directories if that's useful to you (though you could also solve your use-case by configuring multiple "partials" directories, pointing directly to each sub-directory).

I'm wondering if a partial in a subdirectory should get a namespaced identifier, like header/header in the example @Chris2011 provided, or if it should leave the directory name out of it... I would assume, I think, that it would end up including the intermediate directory in the name of the partial when you inject it.

I wonder if Handlebars supports a / in a partial name...

from vite-plugin-handlebars.

alexlafroscia avatar alexlafroscia commented on June 8, 2024

@Chris2011 I enabled that, if you want to start a thread over there for this!

from vite-plugin-handlebars.

Chris2011 avatar Chris2011 commented on June 8, 2024

I will, that :)

from vite-plugin-handlebars.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.