Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] zero-dependency library version #15

Open
mrgrain opened this issue Sep 21, 2023 · 2 comments
Open

[Feature Request] zero-dependency library version #15

mrgrain opened this issue Sep 21, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@mrgrain
Copy link

mrgrain commented Sep 21, 2023

This looks awesome! I really like the API surface.

I think the current setup is great as a standalone tool, but not ideal for use in other packages.
For example in https://github.com/projen/projen we already have everything set up to generate YAML files from a JS object.
A zero-dependency library version of this package would make it easier to include in other tools.

Current Behavior

The package is a CLI and library all-in-one tool.

As far as I can tell all its dependencies are used for the CLI only:

    "fast-glob": "^3.2.11",
    "js-yaml": "^4.1.0",
    "ts-node": "^10.8.1",
    "yargs": "^17.4.0"

Expected Behavior

Publish a zero-dependency library version of this package that can be included in other projects.

Everything would work as before, but no files are created. Calling Workflow.asObject() will return the Workflow as an object that can than be manipulated further, and passed to any YAML tool and/or written to disk as desired.

 const exampleWorkflow = new Workflow('example-filename', { /***/ })
 exampleWorkflow.asObject();
@emmanuelnk emmanuelnk added the enhancement New feature or request label Sep 21, 2023
@emmanuelnk
Copy link
Owner

Hi @mrgrain
Sure let me look into it. I have been running some tests with projen so I guess this would fit in nicely as well. I'll try to knock it out on the weekend.

Thanks for the feedback.

@kingpower2542
Copy link

Tigo Service @mrgrain

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants