deepsweet / start

:red_circle: Functional task runner for Node.js
https://start.js.org/
MIT License
476 stars 19 forks source link

:sparkles: Add support for env object #31

Closed luii closed 6 years ago

luii commented 6 years ago

Added support for a environment object

deepsweet commented 6 years ago

Hi.

It was like that before but then I decided to keep it as simple as possible, so if you want multiple env variables then I'd suggest to use env plugin multiple times.

Is this behavior critical for you?

luii commented 6 years ago

no not really

deepsweet commented 6 years ago

Anyway thanks for the contribution :) Every user except me counts.

What is your case? I believe that we can implement something like direnv if it plays.

luii commented 6 years ago

I'm currently active on the NodeOS project and need a functional task runner / build system. Therefor i have to set a lot of environment variables from our toolchain which i converted from bash to a plain old js object to use it with a task runner. And also this project is lacking some of the plugins i need, so i thought lets contribute some of them to help and learn a bit about the internals of a task runner.

There are a lot of packages that need to be converted from bash to js because not everyone using NodeOS knows bash.

I also dont want to use these overly bloated task runners like gulp or grunt

deepsweet commented 6 years ago

Oh, I heard about NodeOS once or twice before, even twitted a link but never actually tried. Is there any roadmap document so I can see a high-level picture of what is not implemented yet?

Also, please let me know if this env plugin is blocking you in any way. I'm not against that object behavior, I've just never faced such a case in my experience (mostly because I don't have many env vars so it's fine to defined them manually).

luii commented 6 years ago

Here you go, lately i've marked everything relevant: Roadmaps We're currently stuck at the alpha roadmap because i need to build nodegit when building nodeos and somehow the current build process (in bash) overwrites my environment variables somehow that i cant cross build it

If you want to contribute to something just pick any of these labels: bug, needs-maintainer

deepsweet commented 6 years ago

plugin-env@0.2.0:

💥🛠️ always work with env vars object instead of strings pair

luii commented 6 years ago

Nice thanks! :smile:

deepsweet commented 6 years ago

I realized that I actually didn't like the polymorphic behavior :) not the object itself. Now it's more flexible but at the same time still simple.

luii commented 6 years ago

@deepsweet what does the Startfile.map property do?

deepsweet commented 6 years ago

That's a SourceMap object, write plugin will take care of it if there is some. It's useful for transform plugins like Babel.