From ebd8899628f135d8da2112c0a2d1047b0db46262 Mon Sep 17 00:00:00 2001 From: Natalie Weizenbaum Date: Wed, 28 Feb 2024 17:39:20 -0800 Subject: [PATCH] Update `--pkg-import=node` docs to reflect the actual CLI (#958) Closes #957 --- source/documentation/at-rules/use.md | 4 ++-- source/documentation/cli/dart-sass.md | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/source/documentation/at-rules/use.md b/source/documentation/at-rules/use.md index cea2c3e7c..99217c9da 100644 --- a/source/documentation/at-rules/use.md +++ b/source/documentation/at-rules/use.md @@ -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 diff --git a/source/documentation/cli/dart-sass.md b/source/documentation/cli/dart-sass.md index 29622f12f..494cd011f 100644 --- a/source/documentation/cli/dart-sass.md +++ b/source/documentation/cli/dart-sass.md @@ -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. @@ -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`