lume icon indicating copy to clipboard operation
lume copied to clipboard

Remove CLI interface

Open oscarotero opened this issue 3 years ago • 0 comments

For v2.0.0 I'm thinking of removing the possibility of installing Lume with deno run -A https://deno.land/x/lume/install.ts.

There are some reasons for this:

  • Deno install doesn't work in all cases and requires to update the PATH.
  • It's more clear and portable to update Lume by editing the import_map.json file. It allows to have different projects using different versions of Lume.
  • Deno tasks is a better way to run Lume.
  • This removes completely the bug of having two different versions of Lume (one installed globally and other different in the import_map.json).

The new workflow could be the following:

  • Init a new project with deno run -A https://deno.land/x/lume/init.ts. This script is like lume init, creating the _config.ts, import_map.json and deno.json files.
  • The task deno task lume is the main entry for all Lume comands. For example:
    • deno task lume upgrade To upgrade Lume (the import_map.json file)
    • deno task lume vendor To vendor the project.
    • deno task lume To build the project
    • deno task lume -s To build the project and start a server
    • etc
  • The tasks deno task build and deno task serve can be keept, as an alias of deno task lume and deno task lume -s (as they are already).

The only drawback is that all projects must be initiated. It's not allowed to run Lume without the _config.ts file as already. But I don't think there are many cases in which the default config is enough and having a explicit _config file is always better.

oscarotero avatar Aug 09 '22 16:08 oscarotero