using child_process from amber?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

using child_process from amber?

Johann Hibschman
Hi all,

I'm just getting started with Amber, and I can't figure out how to invoke child_process.execSync from within an Amber session. Can anyone give me a pointer?

I'm pretty new to the whole node ecosystem, and not that experienced with Smalltalk, so I may be missing something here. I wouldn't think I'd have to do anything with bower, since it's a built-in node module. The Workspace doesn't even like the name 'child_process'.

I'm trying to use Amber as a nice interface to a bunch of scripts and analytics, so I want to be able to shell out to the system to do things like invoke builds, etc.

Thanks,
Johann

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: using child_process from amber?

Herby Vojčík
Johann Hibschman wrote:
> Hi all,
>
> I'm just getting started with Amber, and I can't figure out how to
> invoke child_process.execSync from within an Amber session. Can anyone
> give me a pointer?

Well, Amber is primarily meant to browser apps, though of course node apps can be written as well (just not supported that thouroughly). In fact, Amber's own CLI is written in Amber and is node.js app, and IIRC it invokes external apps (grunt-init, bower, npm, grunt).

Maybe follow the instructions on how to install Amber for development (lolg.it/amber/amber, CONTRIBUTING.md file) and look at AmberCli package to see the actual example.

> I'm pretty new to the whole node ecosystem, and not that experienced
> with Smalltalk, so I may be missing something here. I wouldn't think
> I'd have to do anything with bower, since it's a built-in node module.

bower is not used with node.js-based projects, just npm

> The Workspace doesn't even like the name 'child_process'.

Yes, https
://lolg.it/amber/amber/issues/20 :-)

> I'm trying to use Amber as a nice interface to a bunch of scripts and
> analytics, so I want to be able to shell out to the system to do
> things like invoke builds, etc.

It is certainly possible, as amber cli does this.

> Thanks,
> Johann
>
> --
> You received this message because you are subscribed to the Google
> Groups "amber-lang" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to [hidden email]
> <mailto:[hidden email]>.
> For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: using child_process from amber?

Johann Hibschman
Thanks. I'll keep trying. I'm trying to use "childProcess := require value: 'child_process'", but I get "Error: Module name "child_process" has not been loaded yet for context: _. Use require([])".

I think that means I have to find a configuration file somewhere else to declare that dependency in, so I'll keep looking.

Cheers,
Johann

On Mon, May 22, 2017 at 9:31 AM Herby Vojčík <[hidden email]> wrote:
Johann Hibschman wrote:
> Hi all,
>
> I'm just getting started with Amber, and I can't figure out how to
> invoke child_process.execSync from within an Amber session. Can anyone
> give me a pointer?

Well, Amber is primarily meant to browser apps, though of course node apps can be written as well (just not supported that thouroughly). In fact, Amber's own CLI is written in Amber and is node.js app, and IIRC it invokes external apps (grunt-init, bower, npm, grunt).

Maybe follow the instructions on how to install Amber for development (lolg.it/amber/amber, CONTRIBUTING.md file) and look at AmberCli package to see the actual example.

> I'm pretty new to the whole node ecosystem, and not that experienced
> with Smalltalk, so I may be missing something here. I wouldn't think
> I'd have to do anything with bower, since it's a built-in node module.

bower is not used with node.js-based projects, just npm

> The Workspace doesn't even like the name 'child_process'.

Yes, https
://lolg.it/amber/amber/issues/20 :-)

> I'm trying to use Amber as a nice interface to a bunch of scripts and
> analytics, so I want to be able to shell out to the system to do
> things like invoke builds, etc.

It is certainly possible, as amber cli does this.

> Thanks,
> Johann
>
> --
> You received this message because you are subscribed to the Google
> Groups "amber-lang" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to [hidden email]
> <mailto:[hidden email]>.
> For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to a topic in the Google Groups "amber-lang" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/amber-lang/a1hp5WfFL9Y/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.