From d8945708ff3222ae1eefc604e86871813921f9c3 Mon Sep 17 00:00:00 2001 From: Lyn Levenick <346549+lynlevenick@users.noreply.github.com> Date: Sun, 4 Apr 2021 10:07:10 -0700 Subject: [PATCH 1/2] Add exactSelector option to match only provided selector The selector option provides only one of four selectors, so if another matches then the option is ignored. Add a new option which controls whether the provided selector is the only one used. --- cli.js | 29 ++++++---- index.js | 21 +++++-- test/cli.test.js | 2 + test/expected/index-script-before-exact.html | 60 ++++++++++++++++++++ test/fixtures/index-script.html | 54 ++++++++++++++++++ test/index.test.js | 13 +++++ 6 files changed, 161 insertions(+), 18 deletions(-) create mode 100644 test/expected/index-script-before-exact.html create mode 100644 test/fixtures/index-script.html diff --git a/cli.js b/cli.js index a26ae69..4df90d7 100644 --- a/cli.js +++ b/cli.js @@ -18,18 +18,19 @@ const help = ` Usage: inline-critical [