Is it possible/allowed to run cli scripts?


#1

Since I couldn’t get ES classes working I thought I’d see if I could use TypeScript. I added it to my packages.json and then tried adding a prestart script (mentioned here):

This didn’t work (doesn’t seem to get executed). I’m guessing it might be because you don’t use npm start to start the project but this is just a guess, I’m not all that familiar with node/npm/etc.

Is it possible for me to do this? And am I allowed? I’m not sure how sandboxed this is and whether executing arbitrary commands is intended to be supported.


#2

We are still fleshing this out. Obviously we need to be quite sandboxed and at the same time flexible enough to be a productive environment.

npm start would address some of the issues at the expense of start up time. However it is worth baring in mind at this time the code on the node is readonly when node start executes so it can’t make mods. This is something we are actively discussing to see what the right balance is.

Thanks for raising this!


#3

Ok, thanks for the info. Is there any list of what is supported so far (I’m sure I saw coffee written somewhere?).

There are some things I was prototyping that I thought might make sense to try here but I don’t know if I can bring myself to write a lot of JS without classes :cry:

Maybe it won’t seem so bad after I’ve had some bacon! …


#4

Have you tried postinstall instead of prestart?


#5

I didn’t, but I figured that wouldn’t cause it to run when I made changes to my .ts files without installing new packages (see other thread).