Skip to content

Commit d37912f

Browse files
authored
fix: typos (#14)
1 parent 6edb3cf commit d37912f

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

docs/usage.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Then, import this expression by changing the file above with the following:
4444
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).
4545

4646
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.
4848
- `yarn-lock` - a path to a `yarn.lock` file, or
4949
- `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.
5050
- `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:
6060
```nix
6161
self: super: {
6262
# represents a package derivation by direct name with a version
63-
"[email protected]" = buildNodeModiule {
64-
# ... a pacakge build logic, internal js2nix implementation
63+
"[email protected]" = self.buildNodeModule {
64+
# ... a package build logic, internal js2nix implementation
6565
};
6666
"yargs@^16.0.3" = self."[email protected]";
6767
"yargs" = self."[email protected]";
@@ -166,7 +166,7 @@ let
166166
in env
167167
```
168168

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. 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.
170170

171171
#### Basic overrides in `package.json` file
172172

@@ -226,7 +226,7 @@ the same can be done in `package.json` file:
226226
##### Supported overlay directives:
227227
- `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]"`.
228228
- `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.
230230
- `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.
231231
- `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.
232232

overlay.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ let
2727
in
2828
{
2929
# This is the entry point function that iterates over all the declarations in
30-
# the `overlay` section in the `pacakge.json` file and invoke functions declared
30+
# the `overlay` section in the `package.json` file and invoke functions declared
3131
# in this attr set.
3232
#
3333
# Functions' naming convention:

0 commit comments

Comments
 (0)