2.0.1 ā¢ Published 2 years ago
install-with-typing v2.0.1
install-with-typing
A small command-line tool which enables you to install package
and package
typing, like fs-extra
and @types/fs-extra
.
Getting Started
pnpm i install-with-typing -g
# fs-extra jsonfile as dep, @types/fs-extra @types/jsonfile as devDep
it fs-extra jsonfile
# jest, @types/jest, tmp, @types/tmp as devDep
it jest tmp --no-save
# scoped package is also supported! @babel/traverse -> @types/babel__traverse
it @babel/traverse
# installation in monorepo may require additional args, like pnpm workspace
it typescript --args='--workspace-root --silent'
- Typing package will not be installed when:
- Package doesnot contain typing package, e.g.
execa
. - Package typing package is deprecated(because typing definitions is included in the package itself), e.g.
consola
.
- Package doesnot contain typing package, e.g.
- If no package manager is specified by
--manager
option,install-with-typing
will detect which preferred manager to use by preferred-pm. - Use
--args='--option1 --option2'
to add extra command arguments.
ššš install-with-typing
Usage:
$ install-with-typing <...packages>
$ it <...packages>
Commands:
<package> package you want to install with its typing package
For more info, run any command with the `--help` flag:
$ install-with-typing --help
Options:
--manager [manager] specify package manager
--save save package as dependency (default: true)
--no-save donot save package as dependency (default: false)
--args [args] extra arguments passed to the command. e.g. --args='--workspace-root --silent'
--dry-run use dry run mode to see what will happen
-h, --help display this message
TODO
- Support multiple packages installation.