Received: by 10.58.169.17 with SMTP id aa17mr49786vec.29.1347565053490; Thu, 13 Sep 2012 12:37:33 -0700 (PDT) X-BeenThere: jadejs@googlegroups.com Received: by 10.52.156.112 with SMTP id wd16ls3171649vdb.6.gmail; Thu, 13 Sep 2012 12:37:33 -0700 (PDT) Received: by 10.52.90.69 with SMTP id bu5mr67634vdb.6.1347565053070; Thu, 13 Sep 2012 12:37:33 -0700 (PDT) Date: Thu, 13 Sep 2012 12:37:32 -0700 (PDT) From: silvinci To: jadejs@googlegroups.com Message-Id: In-Reply-To: References: Subject: Re: Writing Jade to a file MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_553_17829371.1347565052537" ------=_Part_553_17829371.1347565052537 Content-Type: multipart/alternative; boundary="----=_Part_554_462369.1347565052543" ------=_Part_554_462369.1347565052543 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable What exactly are you storing? A jade file or a (json) file that stores the= =20 given data by the user? Why don't you just let express handle the jade parsing staff? On Thursday, September 13, 2012 9:23:42 PM UTC+2, Abraham itule wrote: > > Its easy to do it without jade. coz am received POST data and just doing > > fs.createWriteStream( path ) > > - Then redirecting the user to the path. > > so in terms of code demo, with jade=20 > > var jade =3D require('jade'); > var fn =3D jade.compile( // Write some Jade Code Here, { filename: 'publi= c/j234kl5a2j6s3g4/'});fn( req.params.textArea ); // textArea is the name of= the data am sending. > > Would that be correct??? > > - And in the place to write jade Code, since the string is like kinda=20 > long, roughly 200 lines of code, it would look ugly, do write code there.= =20 > Other Cleaner options?? Other than making a module and doing a require wi= th=20 > a toString which is similarly ugly. > > aaaaargh, i might aswell just write raw html > > On Thu, Sep 13, 2012 at 7:53 PM, Jan Buscht=C3=B6ns > > wrote: > >> I'm sure you know how to use fs. No need for explanation here. >> Here you can see how to use Jade without express. When=20 >> giving a filename in the options your users will be able to use extend a= nd=20 >> include, which could be a security thread. >> >> >> 2012/9/13 Abraham itule > >> >>> Here is What am trying to do. >>> I made a simple docs sharing application. So u can write a new document= =20 >>> and share that document by giving its unique URL to someone. E.g. lets = say=20 >>> my website is, www.quickdocs.com, if you make a new document, the app= =20 >>> will provide u a new unique URL e.g.=20 >>> www.quickdocs.com/j2341kk3n5k5asd32/ and u can then share that URL to= =20 >>> someone. >>> >>> Having said that, what am trying to know if there's a way to write the= =20 >>> HTML that jade outputs to a file=20 >>> >> >> > ------=_Part_554_462369.1347565052543 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable What exactly are you storing? A jade file or a (json) file that stores the = given data by the user?

Why don't you just let express h= andle the jade parsing staff?

On Thursday, September 13, 2012 9:23:4= 2 PM UTC+2, Abraham itule wrote:
fs.createWriteS=
tream( path )
- Then redirecting the user to = the path.

so in terms of code demo, with jade 
var jade =3D require('jade');

var fn =3D jade.compile=
( // Write some Jade Code Here=
, { filename: 'public/j234kl5=
a2j6s3g4/'});fn( req.param=
s.textArea ); // textArea is the name of the data am =
sending.
Would that be correct???

- And in the place to write jade Code,= since the string is like kinda long, roughly 200 lines of code, it would l= ook ugly, do write code there. Other Cleaner options?? Other than making a = module and doing a require with a toString which is similarly ugly.

aaaaargh, i might aswell just write raw html

On Thu, Sep 13, 2012 at 7:53 PM, Jan Buscht=C3=B6ns= <busch...@gmail.com> wrote:
I'm sure you know how to use fs. No need for= explanation here.
Here you can see how to use Jade without express.<= /a> When giving a filename in the options your users will be able to u= se extend and include, which could be a security thread.


2012/9/13 Abraham itule &l= t;wand...@gmail.com>
Here is What am trying to do.
I made a simple docs sharing application. = So u can write a new document and share that document by giving its unique = URL to someone. E.g. lets say my website is, www.quickdocs.com, if you make a new document,= the app will provide u a new unique URL e.g. www.quickdocs.com/j2341kk= 3n5k5asd32/ and u can then share that URL to someone.

Having said that, what am trying to know if there's a way to write the = HTML that jade outputs to a file 


------=_Part_554_462369.1347565052543-- ------=_Part_553_17829371.1347565052537--