Universal.EcmaScriptModule.Sdk
1.4.0
dotnet add package Universal.EcmaScriptModule.Sdk --version 1.4.0
NuGet\Install-Package Universal.EcmaScriptModule.Sdk -Version 1.4.0
<PackageReference Include="Universal.EcmaScriptModule.Sdk" Version="1.4.0" />
<PackageVersion Include="Universal.EcmaScriptModule.Sdk" Version="1.4.0" />
<PackageReference Include="Universal.EcmaScriptModule.Sdk" />
paket add Universal.EcmaScriptModule.Sdk --version 1.4.0
#r "nuget: Universal.EcmaScriptModule.Sdk, 1.4.0"
#:package Universal.EcmaScriptModule.Sdk@1.4.0
#addin nuget:?package=Universal.EcmaScriptModule.Sdk&version=1.4.0
#tool nuget:?package=Universal.EcmaScriptModule.Sdk&version=1.4.0
Universal.EcmaScriptModule.Sdk
Native MSBuild SDK for .esmproj projects. Build and clean run as in-process MSBuild tasks and do not require the global esm tool.
<Project Sdk="Universal.EcmaScriptModule.Sdk/1.4.0">
<PropertyGroup>
<PackageId>Universal.Common</PackageId>
<Version>1.0.0</Version>
<Title>Universal Common</Title>
<Authors>Andrew Ong</Authors>
<Description>Shared browser modules.</Description>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageReadmeFile>Package.md</PackageReadmeFile>
</PropertyGroup>
<ItemGroup>
<Export Include="." Module="index.js" />
</ItemGroup>
</Project>
The SDK provides native Restore, Build, Rebuild, Clean, Pack, GenerateImportMap, and browser Test targets. The SDK never falls back to spawning dotnet or the esm command.
Visual Studio properties use C#-style Application, Build, Package (General/License), and Debug pages. Package metadata supports title, authors, description, copyright, homepage, repository URL/type/branch/commit, tags, release notes, icon, README, and a license expression or license file. README, icon, and license source files are included automatically as non-runtime package files; explicit PackageFile mappings still work. Authors and tags are semicolon-separated.
GeneratePackageOnBuild enables automatic packing. PackageOutputPath is the archive output directory (default bin/Configuration); EsmPackagePath is the completed archive filename. PackageVersion, when specified, overrides Version. Build and pack use evaluated MSBuild properties, including imported package metadata and expressions such as $(MSBuildProjectName) and $(Configuration).
Import-map generation is explicit by default:
dotnet msbuild Application.esmproj /t:GenerateImportMap /p:ImportMapOutputPath=wwwroot/importmap.json
Applications that own a suitable output location can opt into generation after every build:
<GenerateImportMapOnBuild>true</GenerateImportMapOnBuild>
<ImportMapOutputPath>wwwroot\importmap.json</ImportMapOutputPath>
The SDK also exports CPS property/reference schemas, Dependencies data, diagnostics, and fast up-to-date inputs for the companion Visual Studio extension. Test Explorer discovery and browser execution are supplied by the companion test adapter and remain separate from normal build tasks.
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Adds C#-style native project properties, descriptive package metadata, file pickers, and evaluated MSBuild build/pack properties.