npmPackageJson top-level property
The decoded contents of the npm package's package.json
file.
By default, this is loaded from package.json
at the root of the
repository. It's modifiable.
cli_pkg
will automatically add "version"
and "bin"
fields when
building the npm package. If jsModuleMainLibrary is set, it will also add
a "main"
field.
Implementation
final npmPackageJson = InternalConfigVariable.fn<Map<String, dynamic>>(
() => File("package.json").existsSync()
? jsonDecode(File("package.json").readAsStringSync())
as Map<String, dynamic>
: fail("pkg.npmPackageJson must be set to build an npm package."),
freeze: freezeJsonMap);