mirror of
https://github.com/Llewellynvdm/nativefier.git
synced 2025-01-03 14:17:29 +00:00
This commit is contained in:
parent
f8bd696e32
commit
c6debd72e0
4
API.md
4
API.md
@ -115,7 +115,9 @@ The url to point the application at.
|
|||||||
|
|
||||||
#### [dest]
|
#### [dest]
|
||||||
|
|
||||||
Specifies the destination directory to build the app to, defaults to the current working directory.
|
Specifies the destination directory to build the app to, defaults to `NATIVEFIER_APPS_DIR` environment variable, or the current working directory if it is not set.
|
||||||
|
|
||||||
|
**Tip:** Add `export NATIVEFIER_APPS_DIR=~/Applications/` to your `~/.bashrc` , `~/.zshrc`, or similar file to set the default app destination if none is passed. This lets you run `nativefier example.com` and have it automatically save it to your Applications folder on macOS.
|
||||||
|
|
||||||
#### Help
|
#### Help
|
||||||
|
|
||||||
|
@ -45,7 +45,8 @@ export function initArgs(argv: string[]): yargs.Argv<RawOptions> {
|
|||||||
type: 'string',
|
type: 'string',
|
||||||
})
|
})
|
||||||
.positional('outputDirectory', {
|
.positional('outputDirectory', {
|
||||||
defaultDescription: 'current directory',
|
defaultDescription:
|
||||||
|
'NATIVEFIER_APPS_DIR environment variable, or current directory if not set',
|
||||||
description: 'the directory to generate the app in',
|
description: 'the directory to generate the app in',
|
||||||
normalize: true,
|
normalize: true,
|
||||||
type: 'string',
|
type: 'string',
|
||||||
@ -667,6 +668,10 @@ if (require.main === module) {
|
|||||||
|
|
||||||
checkInternet();
|
checkInternet();
|
||||||
|
|
||||||
|
if (!options.out && process.env.NATIVEFIER_APPS_DIR) {
|
||||||
|
options.out = process.env.NATIVEFIER_APPS_DIR;
|
||||||
|
}
|
||||||
|
|
||||||
buildNativefierApp(options).catch((error) => {
|
buildNativefierApp(options).catch((error) => {
|
||||||
log.error('Error during build. Run with --verbose for details.', error);
|
log.error('Error during build. Run with --verbose for details.', error);
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user