Hi,
as Ralf and Jouven stated it is the best way to follow the static howto
and create multibinary components. It is a little work to set it up but
is worth the effort.
But let me still point to a feature, which helps here at least a little.
The ecppc by default takes the basename without extension of the input
file as a component name. But you can change it using -n. So compiling
foo.css with "ecppc foo.css" creates a component "foo" but using "ecppc
-n foo.css foo.css" creates a component named "foo.css". This solves at
least the problem on tntnet level.
Another problem is, that ecppc creates cpp files. And "ecppc foo.css"
with or without -n creates a foo.cpp. And so does "ecppc foo.js" or
"ecppc foo.ecpp". So there is still a problem. You can either place the
files in different directories or use the -o flag to specify a output
file also. "ecpp -n foo.css -o foo.css.cpp foo.css" solves the problem then.
And another useful flag for static files is -b for binary. It suppresses
interpreting ecpp tags in the file. A "<$" or "<%cpp>" is not really
common in css or js but just in case. Better add -b to binary components.
Tommi
Am 30.08.2014 14:29, schrieb Andrew Wood:
Hi,
I don't seem to find a relevant example in the demos but when you
include a js/css library in your webpage, I understand that the js &
css would be compiled into the application, thus would include both in
the makefile.
However given the names of the js and css file are typically the same
other than the extension, what is the trick then for ensuring that
they create different .cpp/.o files in the compilation?
Just asking because I got caught out when I was having a go at tntnet
and the web page was trying to load (as javascript) the css instead of
the javascript. I could manually rename the css/js files to be
different but then the same thing occurs with font files etc...
Cheers,
Andrew
------------------------------------------------------------------------------
Slashdot TV.
Video for Nerds. Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Tntnet-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tntnet-general
------------------------------------------------------------------------------
Slashdot TV.
Video for Nerds. Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Tntnet-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tntnet-general