Moved and reconfigured sketching.

This commit is contained in:
JesseBrault0709 2024-05-20 09:01:44 +02:00
parent e83c8f94bd
commit d72cace97b
13 changed files with 16 additions and 6 deletions

View File

@ -34,6 +34,13 @@ sourceSets {
java {
compileClasspath += sourceSets.main.output
runtimeClasspath += sourceSets.main.output
srcDirs = [file('sketching/java')]
}
groovy {
srcDirs = [file('sketching/groovy')]
}
resources {
srcDirs = [file('sketching/resources')]
}
}
tools {
@ -80,7 +87,7 @@ dependencies {
toolsApi libs.picocli
toolsImplementation libs.groovy.console
sketchingApi libs.groovy
sketchingImplementation libs.groovy
}
java {

View File

@ -1,4 +1,4 @@
package groowt.view.web.sketching
package sketching
import groowt.view.web.BaseWebViewComponent

View File

@ -10,9 +10,6 @@
for differentiating between closures/scriplets that take an `out` (left-shiftable) param and ones that don't take any.
- This could also make differentiating lazy/eager closures/scriptlets easier.
- [ ] Check that the lexer/parser can handle `-` dashes in component names/types, so that we can support `data-`, etc.
- [X] Think more about how to compile templates and components alongside each other. Perhaps we just need to bite
the bullet and use a custom Groovy `CompilationUnit` or `CompilerConfiguration` or whatnot to identify `.wvc` files.
- Update 5/17/24: This should be solved with the `DelegatingWvcParserPlugin` which just examines the file extension.
- [ ] Get rid of automatically generated script `main` and `run` methods; replace with a custom `main` method which
forwards the args to a helper class and then runs the template with the variables similar to the current `runTemplate`
helper tool.
@ -21,9 +18,15 @@
- [ ] Create smoke screen test cases for the compiler.
- [ ] Separate the api, runtime, and compiler elements. The api/runtime can depend on the compiler. If users really want
to meddle with the compiler for some reason, they can depend on it directly.
- [ ] Get rid of sketching source set.
- [ ] Fix inner class bug.
### Done
- [X] Get rid of sketching source set.
- Update 5/20/24: Done, but moved to `sketching/(java | groovy)/sketching` src set dirs.
- [X] Think more about how to compile templates and components alongside each other. Perhaps we just need to bite
the bullet and use a custom Groovy `CompilationUnit` or `CompilerConfiguration` or whatnot to identify `.wvc` files.
- Update 5/17/24: This should be solved with the `DelegatingWvcParserPlugin` which just examines the file extension.
## Syntax ideas
- Perhaps we could have a lambda- or closure-like factory at the beginning of a component for creating it. This could
bypass the resolve mechanism and just instantiate the component directly via constructor (with some protocol).