On Jul 28, 2013, at 22:41, Ryan Schmidt wrote:
> I want them to be dynamically loaded, from their original locations, as
> needed.
I guess what I want is:
loadFile(file, function(err, contents) {
if (err) {
console.log(err);
} else {
//do something with contents
}
});
where the browser implementation of loadFile (which I've written) deals with
all the XMLHttpRequest mechanics, and the server implementation could wrap
fs.readFile. So far I'm unsure how to deal with character encoding.
I wanted to avoid the problem that I've seen many times on this group already,
namely I didn't want to write and publish and announce such a module only to
have people refer to me to the existing module that did exactly what I wanted.
I'm just surprised nobody has published such a module yet. Nobody else needs to
load text files into their server- and client-side JavaScript libraries?
--
--
Job Board: http://jobs.nodejs.org/
Posting guidelines:
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en
---
You received this message because you are subscribed to the Google Groups
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.