slack-samples / deno-reverse-string

Post a reversed version of a string in a selected channel
MIT License
11 stars 13 forks source link

Add deno.jsonc file and use --config flag instead of --import-map #23

Closed selfcontained closed 2 years ago

selfcontained commented 2 years ago

Summary

This is the first change to offer a bit more flexibility around specifying import maps, and adopt some of the upcoming conventions of deno supporting a config file if present.

Currently to support an import-map we have to add the import-map flag to all deno commands in our hooks. This means we also require the specified import_map.json file to be present, otherwise deno will throw an error.

By adding a deno.jsonc file that specifies the importMap, it will allow developers to optionally use one, or not if they prefer not to, and not put us in a spot where we have to have that file present for things to work properly. Currently, it does mean we have to set the --config=deno.json flag, which means that deno.jsonc file has to be present, but in an upcoming release of deno, it should pick up that file if present without any flag needed, so this sets us up for that.

filmaj commented 2 years ago

Neato!