Universal.EcmaScriptModule.Tool
1.3.1
See the version list below for details.
dotnet tool install --global Universal.EcmaScriptModule.Tool --version 1.3.1
dotnet new tool-manifest
dotnet tool install --local Universal.EcmaScriptModule.Tool --version 1.3.1
#tool dotnet:?package=Universal.EcmaScriptModule.Tool&version=1.3.1
nuke :add-package Universal.EcmaScriptModule.Tool --version 1.3.1
Universal.EcmaScriptModule.Tool
.NET tool for inspecting, restoring, building, packaging, and testing browser-native ECMAScript module projects.
Installation
dotnet tool install --global Universal.EcmaScriptModule.Tool --version 1.3.0
The installed command is esm.
esm inspect Universal.Common.esmproj
The complete command set is inspect, restore, build, pack, import-map, and test.
Generate standard JSON for an application to place or embed in its own HTML:
esm import-map Application.esmproj
esm import-map Application.esmproj --output wwwroot/importmap.json --locked-mode
Package exports use exact immutable URLs advertised by each HTTP registry. A ProjectReference must declare its deployed base URL with ImportMapBaseUrl; local-folder packages deliberately fail because they have no deployable browser URL.
Restore always writes the generated dependency graph to obj/esm.assets.json:
esm restore Universal.Common.esmproj
Folder and HTTP sources use the same resolver:
esm restore Universal.Common.esmproj --source C:\Packages\Esm
esm restore Universal.Common.esmproj --source https://api.esm.example/v1/index.json
Locking is optional, like NuGet's packages.lock.json:
esm restore Universal.Common.esmproj --use-lock-file
esm restore Universal.Common.esmproj --locked-mode
esm restore Universal.Common.esmproj --force-evaluate
It can also be enabled for a project:
<PropertyGroup>
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
</PropertyGroup>
Commit esm.lock.json for applications and locked CI builds. Reusable libraries can omit it.
Browser test projects run through an installed Edge, Chrome, or Chromium browser:
esm test Universal.Common.Tests.esmproj
esm test Universal.Common.Tests.esmproj --browser msedge --headed
The --browser value can also be the path to a Chromium-family browser executable, which is useful for portable CI installations.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
This package has no dependencies.
Serializes build output through package creation during esm pack.