Options

December 19, 2018 ยท View on GitHub

Options can be defined in the package.json of the project under build property, see an example.

build <- BuildConfig

NameTypeDescription
nwVersionstringUsed NW.js version. Support lts, stable and latest symbols. Defaults to lts.
nwFlavorstringUsed NW.js flavor for builder. Runner will always use sdk. normal or sdk. Defaults to normal.
outputstringOutput directory relative to the project root. Defaults to ./dist/.
outputPatternstringOutput filename pattern. Defaults to ${NAME}-${VERSION}-${PLATFORM}-${ARCH}.
packedbooleanWhether to pack app or not. Packed app needed to be extracted at launch time. Defaults to false.
targetsstring[]Target formats to build. zip, 7z, nsis and nsis7z, etc. Defaults to [].
filesstring[]Glob patterns for included files. Exclude ${ output } automatically. Defaults to [ '**/*' ].
excludesstring[]Glob patterns for excluded files. Defaults to [].
appIdstringApp identity URI. Defaults to io.github.nwjs.${ name }.
ffmpegIntegrationbooleanWhether to integrate iteufel/nwjs-ffmpeg-prebuilt. If true, you can NOT use symbols in nwVersion. Defaults to false.
strippedPropertiesstring[]Properties to be stripped from package.json. Defaults to [ 'scripts', 'devDependencies', 'build' ].
overriddenPropertiesobjectReassigns the value of a property at the root of the package.json with the value given. Example: "overriddenProperties": { "chromium-args": "--mixed-context" }. In your build this would replace whatever chromium-args you were using during development.

build.win <- WinConfig

NameTypeDescription
productNamestringProduct name. Defaults to ${ name }.
companyNamestringCompany name. Defaults to ${ productName }.
fileDescriptionstringFile description. Defaults to ${ description }.
copyrightstringCopyright. Defaults to ''.
productVersionstringProduct version. Defaults to ${ version }.
fileVersionstringFile version. Defaults to ${ productVersion }
versionStrings{ [key: string]: string }rcedit version strings. Defaults to {}.
iconstring.ico icon file relative to the project root. Defaults to undefined.

build.mac <- MacConfig

NameTypeDescription
namestringName in Info.plist. Defaults to ${ name }.
displayNamestringDisplayName in Info.plist. Defaults to ${ name }.
versionstringVersion in Info.plist. Defaults to ${ version }.
descriptionstringDescription in InfoPlist.strings. Defaults to ${ description }.
copyrightstringCopyright in InfoPlist.strings. Defaults to ''.
iconstring.icns icon file relative to the project root. Defaults to undefined.
documentIconstring.icns icon file relative to the project root. Defaults to undefined.
plistStrings{ [key: string]: string }plist strings. Defaults to {}.

build.linux <- LinuxConfig

Currently noop.

build.nsis <- NsisConfig

NameTypeDescription
iconstring.ico icon file for NSIS installers relative to the project root. Defaults to undefined.
unIconstring.ico icon file for NSIS uninstallers relative to the project root. Defaults to undefined.
languagesstring[]Languages for NSIS installers. Multiple languages will result in a language selection dialog on startup. See /assets/nsis/Contrib/Language files/ for available values. Defaults to [ 'English' ].
installDirectorystringDefault installation directory. Allow using NSIS variables. See /src/lib/nsis-gen/NsisComposer.ts for a list of self-defined constants. Defaults to $LOCALAPPDATA\\${_APPNAME}.
diffUpdatersbooleanWhether to build diff updaters. Defaults to false.
hashCalculationbooleanWhether to calculate hashes for installers and updaters. Defaults to true.