You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This would make it easier to re-use deno tasks in other tasks that have different environment variables.
{
"tasks": {
"run": "export APP_ENV ?= production && deno run --allow-read=. --allow-write=. scripts/run.js",
"run-dev": "export APP_ENV = development && deno task run"
},
}
Currently that short hand won't work and will give you the following error.
$ deno task run
Task run export APP_ENV ?= production && deno run --allow-read=. --allow-write=. scripts/run.js
error: Error parsing script 'run'.
Caused by:
Globs are currently not supported, but will be soon.
?= production && deno run --allow-read=. --allow-write=. scripts/run.js
~
Since the shorthand doesn't work currently, you have to either repeat or move the common part to a separate task. The downside to the second shorthand example below is that people might use run without APP_ENV set.
{
"tasks": {
"run": "export APP_ENV = production && deno run --allow-read=. --allow-write=. scripts/run.js",
"run-dev": "export APP_ENV = development && deno run --allow-read=. --allow-write=. scripts/run.js"
},
}
{
"tasks": {
"run": "deno run --allow-read=. --allow-write=. scripts/run.js",
"run-prod": "export APP_ENV = production && deno task run""run-dev": "export APP_ENV = development && deno task run"
},
}
Since the shorthand doesn't work currently, you have to either repeat or move the common part to a separate task. The downside to the second shorthand example below is that people might use run without APP_ENV set.
How about using a name run-template instead of run?
https://www.gnu.org/software/make/manual/html_node/Setting.html#Setting
This would make it easier to re-use deno tasks in other tasks that have different environment variables.
Currently that short hand won't work and will give you the following error.
Since the shorthand doesn't work currently, you have to either repeat or move the common part to a separate task. The downside to the second shorthand example below is that people might use run without APP_ENV set.
I was told by @bartlomieju to ping @dsherret on this feature request.
The text was updated successfully, but these errors were encountered: