Scalatex
Scalatex copied to clipboard
Example creates Hello in a scalatex package
I'm not sure if this is intentional or not, but the example instructions at http://lihaoyi.github.io/Scalatex/ put the Hello classes in a scalatex package. Is that intentional?
scala> Hello().render
<div>
Hello World
<h1>
I am a cow!</h1></div>
This is intentional but undocumented, as of yet. Will document it eventually.
The root cause is to let you put stuff inside the root folder, rather than having to always pick your own folder.
I'll close this issue when i fix the readme
Thanks. Sounds good for now.
For posterity -- I was able to put a
{package somepackage}
at the top of a HelloFromPackage.scalatex file, and then
scala> import scalatex.somepackage.HelloFromPackage import scalatex.somepackage.HelloFromPackage
So you could build a hierarchy under the top-level scalatex package if you need one. Not quite picking your own package, but very close.