Closed nkrkv closed 5 years ago
What the difference between xodc help COMMAND
and xodc COMMAND --help
?
The same as between:
~
$ git status --help
~
$ git help status
No difference
The wip
label is for PRs. Issues have a column “In progress” in the Project
Closed by #1518 and #1548
Currently,
xodc
is not usable as it could be. In some points it violates the very basic command line tools standards, poorly validates command arguments, etc. Let’s makexodc
great again.I suggest using yargs as the complete command-line argument parsing solution. What we’re going to achieve:
resave ✔️
install
publish ✔️
Prompt for username/password on each invocation, i.e. preserve the current behavior.
transpile ✔️
Here and in the commands latter the possible valid value for
[[project] patch]
can be 0, 1, or 2 arguments.If zero arguments passed, it is equivalent to passing a single arg
.
If a single argument is passed, it can be either of two forms:
./main
or./main/patch.xodp
)main
or@/main
)In the first case, the project path is automatically deduced from the patch path. In the second case, the project path is automatically deduced from the current working directory.
If two arguments are passed, the first one should be an FS path to a xodball, to a directory inside a multifile project, or to the
project.xod
file itself. In this case the patch path is only allowed to be specified in XOD terms (case No 2).The following forms are valid:
xodc transpile
xodc transpile .
xodc transpile main
xodc transpile @/main
xodc transpile ./main
xodc transpile main/
xodc transpile ./main/patch.xodp
xodc transpile . main
xodc transpile foo.xodball main
boards ✔️
Example output:
compile
--cloud
and not--anonymous
upload
Requirements are the same as for
compile
. Stream uploader output in realtime as well.Common points
xod-cli/package.json
properly so thatxodc
is available afternpm install
tee
to verify. Obvious:--output
does not redirect log messages to the file, the messages stay on stderr even if--output
is specified.