Skip to content

Commit

Permalink
Update --pkg-import=node docs to reflect the actual CLI (#958)
Browse files Browse the repository at this point in the history
Closes #957
  • Loading branch information
nex3 authored Feb 29, 2024
1 parent 3a099f2 commit ebd8899
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions source/documentation/at-rules/use.md
Original file line number Diff line number Diff line change
Expand Up @@ -597,11 +597,11 @@ stylesheets. This isn't available by default, but it's easy to turn on:
* If you're using the Dart API, add [`NodePackageImporter()`] to the `importers`
option.

* If you're using the command line, pass [`--pkg-importer=nodejs`].
* If you're using the command line, pass [`--pkg-importer=node`].

[`new NodePackageImporter()`]: /documentation/js-api/classes/NodePackageImporter/
[`NodePackageImporter()`]: https://pub.dev/documentation/sass/latest/sass/NodePackageImporter-class.html
[`--pkg-importer=nodejs`]: /documentation/cli/dart-sass/#pkg-importer-nodejs
[`--pkg-importer=node`]: /documentation/cli/dart-sass/#pkg-importer-node

If you load a `pkg:` URL, the Node.js `pkg:` importer will look at its
`package.json` file to determine which Sass file to load. It will check in
Expand Down
6 changes: 3 additions & 3 deletions source/documentation/cli/dart-sass.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,11 @@ Earlier load paths will take precedence over later ones.
$ sass --load-path=node_modules/bootstrap/dist/css style.scss style.css
```

#### `--pkg-importer=nodejs`
#### `--pkg-importer=node`

{% compatibility 'dart: "1.71.0"' %}{% endcompatibility %}

This option (abbreviated `-p nodejs`) adds the [Node.js `pkg:` importer] to the
This option (abbreviated `-p node`) adds the [Node.js `pkg:` importer] to the
end of the load path, so that stylesheets can load dependencies using the
Node.js module resolution algorithm.

Expand All @@ -132,7 +132,7 @@ Node.js module resolution algorithm.
Support for additional built-in `pkg:` importers may be added in the future.

```shellsession
$ sass --pkg-importer=nodejs style.scss style.css
$ sass --pkg-importer=node style.scss style.css
```

#### `--style`
Expand Down

0 comments on commit ebd8899

Please sign in to comment.