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

Support other template configurations #2

Closed
Dan-Shields opened this issue Jan 17, 2023 · 0 comments
Closed

Support other template configurations #2

Dan-Shields opened this issue Jan 17, 2023 · 0 comments

Comments

@Dan-Shields
Copy link
Member

Right now you're forced to use the hard coded template files src/graphics/template.html and src/dashboard/template.html. It would be nice for this to be configurable. This should be included as part of the plugin's function signature and could look like:

NodeCGPlugin({
    graphicsTemplate: './templates/graphics.html',
    dashboardTemplate: './templates/dashboard.html'
})

To support more complex setups, a config could use globbing to match entry files with templates. It could look like:

NodeCGPlugin({
    './src/graphics/**.ts': './templates/graphics.html',
    './src/dashboard/specificPanel.ts': './templates/specificPanel.html',
    './src/dashboard/**.ts': './templates/dashboard.html',
})

It would default to the following to avoid a breaking change:

{
    './src/graphics/**.ts': './src/graphics/template.html',
    './src/dashboard/**.ts': './src/dashboard/template.html'
}

Thoughts on this would be appreciated.

Dan-Shields added a commit that referenced this issue Jan 21, 2023
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

No branches or pull requests

1 participant