This has been laughably easy.  Here is the new code, in leoPrototype.py:

@g.command('leo-el-vue')
@g.command('proto-leo-el-vue')
def leo_el_vue(event):
    """
    Vitalije's electron/vue project:: Leo in CoffeeScript and Vue.
    
    Original sources and documentation at: 
https://leoelvue.computingart.net/home
    """
    # c = event and event.get('c')
    base = g.os_path_finalize_join(g.app.loadDir,
        '..', 'proto', 'Vitalije', 'leo-el-vue')
    base = base.replace('\\','/')
    commands = [
        # 'npm install',
        'npm run dev',
    ]
    if g.os_path_exists(base):
        os.chdir(base) # Can't do this in the commands list.
        g.execute_shell_commands(commands)
    else:
        g.es_print('not found: %r' % base)

The takeaways:

- It's dead easy to execute code in other languages from Leo.
- The new prototype commands will allow devs to play with each others ideas.
- The docstring reminds us all where the original code came from.
- Doing 'npm install' works, but slows things down.

We could always define an command that installs, then runs, but building 
from the console seems good enough for now.

Edward

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

Reply via email to