11# flatpak-node-generator
22
3- A more modern successor for flatpak-npm-generator and flatpak-yarn-generator, for Node 10+ only.
3+ A more modern successor for flatpak-npm-generator and flatpak-yarn-generator, for Node 10+ only. Supports npm, yarn, and pnpm.
44(For Node 8, use flatpak-npm-generator and flatpak-yarn-generator.)
55
66** NOTE:** ` --xdg-layout ` was recently changed to be the default. In the stark
@@ -50,26 +50,34 @@ get npm with electron-builder.
5050## Usage
5151
5252```
53- usage: flatpak-node-generator [-h] [-o OUTPUT] [-r] [-R RECURSIVE_PATTERN] [--registry REGISTRY] [--no-trim-index] [--no-devel] [--no-requests-cache] [--max-parallel MAX_PARALLEL] [--retries RETRIES] [-P]
54- [-s] [-S SPLIT_SIZE] [--node-chromedriver-from-electron NODE_CHROMEDRIVER_FROM_ELECTRON] [--electron-ffmpeg {archive,lib}] [--electron-node-headers]
55- [--nwjs-version NWJS_VERSION] [--nwjs-node-headers] [--nwjs-ffmpeg] [--no-xdg-layout] [--node-sdk-extension NODE_SDK_EXTENSION]
56- {npm,yarn} lockfile
53+ usage: flatpak-node-generator [-h] [-o OUTPUT] [-r] [-R RECURSIVE_PATTERN] [--registry REGISTRY] [--no-trim-index]
54+ [--no-devel] [--no-requests-cache]
55+ [--max-parallel MAX_PARALLEL]
56+ [--retries RETRIES] [-P] [-s] [-S SPLIT_SIZE]
57+ [--node-chromedriver-from-electron NODE_CHROMEDRIVER_FROM_ELECTRON]
58+ [--electron-ffmpeg {archive,lib}]
59+ [--electron-node-headers]
60+ [--nwjs-version NWJS_VERSION]
61+ [--nwjs-node-headers] [--nwjs-ffmpeg]
62+ [--no-xdg-layout]
63+ [--node-sdk-extension NODE_SDK_EXTENSION]
64+ {npm,yarn,pnpm} lockfile
5765
5866Flatpak Node generator
5967
6068positional arguments:
61- {npm,yarn}
62- lockfile The lockfile path (package-lock.json or yarn.lock)
69+ {npm,yarn,pnpm }
70+ lockfile The lockfile path (package-lock.json, yarn.lock, or pnpm-lock.yaml )
6371
6472options:
6573 -h, --help show this help message and exit
6674 -o, --output OUTPUT The output sources file
6775 -r, --recursive Recursively process all files under the lockfile directory with the lockfile basename
6876 -R, --recursive-pattern RECURSIVE_PATTERN
6977 Given -r, restrict files to those matching the given pattern.
70- --registry REGISTRY The registry to use (npm only )
78+ --registry REGISTRY The registry to use (npm/pnpm )
7179 --no-trim-index Don't trim npm package metadata (npm only)
72- --no-devel Don't include devel dependencies (npm only )
80+ --no-devel Don't include devel dependencies (npm/pnpm )
7381 --no-requests-cache Disable the requests cache
7482 --max-parallel MAX_PARALLEL
7583 Maximium number of packages to process in parallel
@@ -93,12 +101,12 @@ options:
93101 Flatpak node SDK extension (e.g. org.freedesktop.Sdk.Extension.node24//25.08)
94102```
95103
96- flatpak-node-generator.py takes the package manager (npm or yarn ), and a path to a lockfile for
97- that package manager. It will then write an output sources file (default is generated-sources.json)
98- containing all the sources set up like needed for the given package manager.
104+ flatpak-node-generator takes a package manager (npm, yarn, or pnpm ), and a path to a lockfile for
105+ that package manager. It writes an output sources file (default is generated-sources.json)
106+ containing all the sources needed for the given package manager.
99107
100- If you're on npm and you don't want to include devel dependencies, pass ` --no-devel ` , and pass
101- ` --production ` to ` npm install ` itself when you call .
108+ If you're on npm or pnpm and you don't want to include devel dependencies, pass ` --no-devel ` .
109+ For npm, also pass ` --production ` to ` npm install ` itself.
102110
103111If you're using npm, you must run this script when the ` node_modules ` directory is ** NOT** present.
104112If you generate the ` generated-sources.json ` in CI, you can do this by passing ` --package-lock-only `
0 commit comments