Coder Social home page Coder Social logo

Comments (7)

dmbch avatar dmbch commented on June 27, 2024 2

I like this idea and we actually had this sometime early on. I would get rid of the quotes, though, as env vars are also always strings.

from untool.

ZauberNerd avatar ZauberNerd commented on June 27, 2024 1

This has been merged into the next branch.

from untool.

bxt avatar bxt commented on June 27, 2024

... but then what if you want [] in the default value? Maybe (I don't know wether its possible) the bash could be used to build the string, as it can already do things like ${API_URL:-https://api.com}, ${API_URL:?"Please specify the URL to super API serivce"} etc. and the syntax should be familiar to some already.

from untool.

KnisterPeter avatar KnisterPeter commented on June 27, 2024

What about adding a default object next to the untool key? That way there would be no escaping and no parsing, just a lookup.

from untool.

dmbch avatar dmbch commented on June 27, 2024

@bxt I don’t think that that will work since we are reading from process.env here - no bash involved.

Of course, I have to give you the point about [], but I cannot really think of a lot of use cases for that. Nevertheless, I do not really feel strongly about those quotes.

from untool.

dmbch avatar dmbch commented on June 27, 2024

@KnisterPeter that will only work within package.json, but not in other places untool uses for configuration.

Additionally, I personally quite like the idea of keeping the env variable references and default values close to one another.

from untool.

ZauberNerd avatar ZauberNerd commented on June 27, 2024

Relevant PR: #453

from untool.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.