New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a auto-install feature #6
Comments
I like the suggestion. This would make it much easier to get started. Here are my thoughts on the design (I am not pointing my finger at anyone specific to implement this yet, feel free to volunteer):
The command could support
How about using
The default could be
I would be careful about updating an existing
We also need to think about how to deal with conflicts: both for the
Yep. Lets keep it simple like that. We do not want to create an ad hoc package system with lots of configurability. The So, if we have {
"tools": {
"eslint-2019": ...
}
}
Yep. |
I have some additional thoughts on this:
This can be achieved with the following example # basic usage
# knows by convention that `eslint` means `tools/contrib/eslint/src/install.ts`, which is "requirable" at `build/ts/tools/contrib/eslint/src/install.js`
bin/cli install eslint
# custom tool id
bin/cli install --tool eslint-default eslint
# custom installer - a path with slashes gets interpreted different than a simple name like `eslint`
bin/cli install --tool cool-analysis /home/users/private-drivers/cool-analysis/build/install.js
# custom args
jq -n '.version = "2019"' > args.json
bin/cli install --tool eslint-2019 --args args.json eslint This requires a minor change to the declare module installer {
export async function doInstall(installFolder: string, args?: any /* from `JSON.parse(args)` */): {bin: string, args: string[], options: string[]}
} I have dropped the bin/cli install --update-config eslint
bin/cli install --update-config codeql
bin/cli install --update-config nodejsscan |
My suggestion is to add a
bin/cli auto-install eslint
command, which would:auto-install.ts
script inside thecontrib/tools/eslint
folder. This script would:install.sh
script, with the install folder set to a defaultroot/tools/eslint
.(Possibly prombt the user about
config.json
, possibly creating theconfig.json
file if it doesn't exist.The
auto-install.ts
file should satisfy some interface.E.g:
Where the return-value from
doInstall
is the entry that should be added thetools
property inconfig.json
.The
bin/cli tools
command would also inform which tools can be auto-installed.The text was updated successfully, but these errors were encountered: