Comments (7)
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.
This has been merged into the next branch.
from untool.
... 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.
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.
@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.
@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.
Relevant PR: #453
from untool.
Related Issues (20)
- Allow custom template for react server HOT 5
- Make importComponent work in test environments HOT 9
- Travis checks broken
- @babel/polyfill polyfills resolve to wrong `core-js` version on compile time HOT 4
- Warnings for "un build" with new babel / core-js versions HOT 1
- Webpack: Signal based HMR crashes on windows HOT 1
- Allow to build/start specifc targets only HOT 3
- Should the doctor throw in production mode instead of printing warnings HOT 2
- @babel/preset-env needs to be updated HOT 2
- Action Required: Fix Renovate Configuration HOT 1
- [RFC]: Secrets in environment variable placeholders HOT 5
- [RFC]: Replace the snapshot tests with more meaningful code HOT 2
- [RFC] Allow to set a rootDir in untool HOT 1
- Routing broken with react-router v5.1 HOT 1
- Dependency Dashboard
- environmentalize does not work with object whitelisting
- utils environmentalize fails with item.replace is not a function HOT 6
- Build error: External library using `preset` with invalid configuration
- Forward and respect webpack magic comments HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from untool.