Comments (11)
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.
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.
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.
All in one Namespace would be fine for me
from vite-plugin-handlebars.
Thx for the thread, I'm in the exact same situation :). Thx for the plugin btw.
from vite-plugin-handlebars.
See #28
from vite-plugin-handlebars.
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.
The code just goes directly into one folder and not deeper.
from vite-plugin-handlebars.
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.
@Chris2011 I enabled that, if you want to start a thread over there for this!
from vite-plugin-handlebars.
I will, that :)
from vite-plugin-handlebars.
Related Issues (19)
- Avoid error when partial directory is configured, but does not exist
- pagePath not properly resolved?
- feature request: ability to import as precompiled templates
- [Security] Workflow ci.yml is using vulnerable action actions/checkout
- [Security] Workflow ci.yml is using vulnerable action actions/checkout
- Using with TailwindCSS - partials do not refresh when editting tailwind classes HOT 1
- Watch partial files for changes HOT 5
- wrong path in dist when the public folder is used
- Upgrade to vite3, wrong type. HOT 4
- Reloading not happening when partial changes (windows 10) HOT 2
- Partials only work on index.html HOT 1
- Upgrade to support Vite 5 HOT 3
- Vite v5 warnings HOT 1
- Make PR to Awesome Vite
- Changes in linked dependencies don't cause hmr HOT 14
- Support `.hbs` extensions for entry files HOT 5
- Support relative links to assets from partials
- Nested Partials are Not Found HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vite-plugin-handlebars.