Skip to content

[Feature Request] Make/export Emception as a library. #7

Description

@james-pre

This is a really cool project, though it's difficult to use a part of a project due to the lengthy build and compilation. Could we have Emception as a library?

For example (on a website):

<script src="emception.min.js"></script>
<script>
  let emception = new Emception();
  emception.run('echo "check out this!"').then(stdout => {
    //do stuff
  }).catch(stderr => {
    //do stuff
  });
  
</script>

A few things to note:

  • This is just an example, the actual API may vary greatly
  • It doesn't use the module system (UMD could work though)
  • For distribution you could add the js to the demo branch (maybe under a /dist folder)

Why do we need a library?

  • Saves developers time using it in their projects (the building takes hours)
  • Can be used without dependencies and such (devs just need to include a single file)
  • Much easier to use (adding the script tag vs currently having to clone the entire repo and all of Emception's dependencies, and building them from scratch)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions