VueGWT / vue-gwt

Vue.js Components/Custom Elements in Java with GWT. Developed at https://www.genmymodel.com.
https://vuegwt.github.io/vue-gwt/
MIT License
204 stars 46 forks source link

Add behaviour to find and parse external css and scss files into the component #60

Closed JornC closed 3 years ago

JornC commented 5 years ago

This change adds behaviour to look for and parse an optional css and scss file as part of the component template.

File structure such as the following is then possible, allowing full segregation of presenter logic, markup/view logic, and styling:

DummyComponent.java
DummyComponent.html
DummyComponent.scss

The embedded <style scoped> element continues to function as usual and expected.

Combinations of styles are possible; all styles found (embedded css/scss, external scss file, and an external css file) are concatenated into the final scopedCss string.


I've tried to replicate the existing approach to parsing the template as much as possible so as to make this change cohere to the rest of the codebase as much as possible. Let me know if I can improve on any aspect!

adrienbaron commented 5 years ago

@JornC Thank you for your contribution! I'll try to get a look at it as soon as possible, maybe tomorrow :)

JornC commented 5 years ago

Rebased on top of develop