You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/usage.md
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -44,7 +44,7 @@ Then, import this expression by changing the file above with the following:
44
44
This `js2nix.buildEnv` (or simply `js2nix`) is the main functionality js2nix provides as its API, however, there are a couple more function that are also exposed for more granular advanced use-cases (see the [`../lib.nix`](../lib.nix) for more information).
45
45
46
46
This function accepts the following arguments:
47
-
-`package-json` - a path to a `pacakge.json` file.
47
+
-`package-json` - a path to a `package.json` file.
48
48
-`yarn-lock` - a path to a `yarn.lock` file, or
49
49
-`yarn-lock-nix` - a path to a file that was generated by the `js2nix` executable directly from `yarn.lock` file. Used to avoid IFD situation, where needed.
50
50
-`overlays` - a list of overlay functions to override the dependency tree, see [overiding](#overiding) section below for more details.
@@ -60,8 +60,8 @@ The function returns an environment object that consists of the following:
60
60
```nix
61
61
self: super: {
62
62
# represents a package derivation by direct name with a version
Due to yarn not providing information about peer dependencies within the `yarn.lock` file, it's only possible to make packages with peer dependencies work by overriding their dependencies and providing them as in the example above. Norre that defining those dependencies on the top-level (in the `package.json` file) won't address this peer dependencies due to the nested [node_modules structure](#the-node_modules-folder-layout) that js2nix provides.
169
+
Due to yarn not providing information about peer dependencies within the `yarn.lock` file, it's only possible to make packages with peer dependencies work by overriding their dependencies and providing them as in the example above. Note that defining those dependencies on the top-level (in the `package.json` file) won't address this peer dependencies due to the nested [node_modules structure](#the-node_modules-folder-layout) that js2nix provides.
170
170
171
171
#### Basic overrides in `package.json` file
172
172
@@ -226,7 +226,7 @@ the same can be done in `package.json` file:
226
226
##### Supported overlay directives:
227
227
-`js2nix.overlay.<package>.addDependencies` - list of strings. Can be an alias or a direct name with version, for example can be `"@babel/core"` or `"@babel/core@^7.1.0"` or `"@babel/[email protected]"`.
228
228
-`js2nix.overlay.<package>.src` - string or an object. Overrides a package source. It can be a local folder path, relative to the `package.json` file or an absolute path. Also can be an object that overrides the `fetchurl` function attributes.
229
-
-`js2nix.overlay.<package>.doCheck` - boolean. Overrides the `doCheck` argument for the pacakge builder. It's `true` by default.
229
+
-`js2nix.overlay.<package>.doCheck` - boolean. Overrides the `doCheck` argument for the package builder. It's `true` by default.
230
230
-`js2nix.overlay.<package>.patches` - a list of strings. Overrides patches with the given list. Items in the list can be strings that represent a path to a patch file, an absolute or relative the `package.json` file.
231
231
-`js2nix.overlay.<package>.lifeCycleScripts` - a list of strings. Overrides `lifeCycleScripts`, can contains scripts' names, declared in the `package.json` of the package. TIP: you can use patch feature to add some scripts you need there.
0 commit comments