[functions] How to automatically transpile TS during local testing

44 views
Skip to first unread message

Mikhail Turilin

unread,
Feb 18, 2018, 7:49:00 PM2/18/18
to Firebase Google Group
Context
I write Firebase functions in TypeScript. I would like "firebase serve" to automatically transpile changes.

Observed
When I use "firebase serve --only functions", the TypeScript code is not automatically transpired to JS. 

So, each time I make change I have to:
  1. ^C to stop "firebase serve" process
  2. Run "npm run build --prefix functions" to transpile
  3. Run "firebase serve --only functions" again
This is quite tedious. Is there a better way?

Thanks in advance! 

Kato Richardson

unread,
Feb 19, 2018, 11:11:58 AM2/19/18
to Firebase Google Group
Does tsc -w not work here? Seems like that would.

I'll ping some of the gurus on this and see if they have more thoughts.


--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/04c7ea9f-7329-417a-aff8-c34cf3a8cf4f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--

Kato Richardson | Developer Programs Eng | kato...@google.com | 775-235-8398

cal...@piedparker.com

unread,
Apr 21, 2018, 11:36:08 AM4/21/18
to Firebase Google Group
tsc -w | firebase serve --only functions,hosting

Doug Stevenson

unread,
Apr 21, 2018, 4:58:05 PM4/21/18
to Firebase Google Group
Please read this blog for a discussion bout using tsc --watch.

Doug
Reply all
Reply to author
Forward
0 new messages