A package manager for ES modules
Experimental | This package is an experiment. It is very limited for now, and have known issues. |
---|
It is recommended to install this tool globally
npm i -g @zaboco/espm
It can also be installed locally, of course:
npm i -D @zaboco/espm
Note: If you do so, you will have to use
npx
to run the commands. E.g.npx espm install react
.
WIP | Only adding TS types is available for now |
---|
You can add .d.ts
files for packages, without installing them with npm
. It fetches the files from a CDN. Also fetches imported types, recursively.
espm add <package>[@version]
- Type reference paths are ignored
/// <reference path="./foo.d.ts" />
. In this case./foo.d.ts
is not downloaded from the CDN - TS
namespace
syntax is not supported. For example,espm add preact
would fail. - Scoped packages do not work well. E.g.
espm add uvu/assert
will not work as intended.