[Ur] PATCH: add inlineScript directive

Adam Chlipala adamc at impredicative.com
Sun Sep 4 15:41:41 EDT 2011


austin seipp wrote:
> The below patch on bitbucket adds support to the compiler for an
> 'inlineScript' directive, which reads .js files off disk at compile
> time and includes them in the urweb app.js file of the resulting
> executable.
>
> [...]
>
> There is one thing that freaks me out, and it's the possibility of
> name clashes with things defined in app.js. I have another JS binding
> that uses the javascript PageDown library and uses inlineScript to
> include it inline for the Ur/Web library - roughly 4000 lines of JS.
> There weren't any problems, but it still worries me.
>    

This is very similar to functionality requested before on this list, for 
including stylesheets within applications.  Perhaps the right solution 
is a generic mechanism for including static files?  That would certainly 
make it easy to avoid dealing with issues that come from concatenating 
JavaScript source files together.



More information about the Ur mailing list