Skip to content

Commit

Permalink
Add todos for npm-install's help message
Browse files Browse the repository at this point in the history
  • Loading branch information
victor-gp committed Jan 24, 2024
1 parent 36211a3 commit 009a30d
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 1 deletion.
34 changes: 34 additions & 0 deletions tests/syntax/syntax_test_npm-install.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# SYNTAX TEST "cmd-help.sublime-syntax"

Install a package

Usage:
npm install [<package-spec> ...]

Options:
[-S|--save|--no-save|--save-prod|--save-dev|--save-optional|--save-peer|--save-bundle]
#^^ - entity.name.function.option.cmd-help
# ^^^^^^ - entity.name.function.option.cmd-help
# nice: handle square-surrounded options with | alternatives
[-E|--save-exact] [-g|--global]
#^^ - entity.name.function.option.cmd-help
# ^^ - entity.name.function.option.cmd-help
# nice: handle square-surrounded options separated by space
[--install-strategy <hoisted|nested|shallow|linked>] [--legacy-bundling]
# ^^^^^^^^ - entity.name.function.option.cmd-help keyword.other.argument.cmd-help
# ^^^^^^ - entity.name.function.option.cmd-help keyword.other.argument.cmd-help
#nice: handle option arguments like these
[--global-style] [--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]]
[--include <prod|dev|optional|peer> [--include <prod|dev|optional|peer> ...]]
[--strict-peer-deps] [--prefer-dedupe] [--no-package-lock] [--package-lock-only]
[--foreground-scripts] [--ignore-scripts] [--no-audit] [--no-bin-links]
[--no-fund] [--dry-run] [--cpu <cpu>] [--os <os>]
[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
# ^^ - entity.name.function.option.cmd-help
#nice: handle nested options like these
[-ws|--workspaces] [--include-workspace-root] [--install-links]

aliases: add, i, in, ins, inst, insta, instal, isnt, isnta, isntal, isntall
#nice: handle aliases?

Run "npm help install" for more info
2 changes: 1 addition & 1 deletion tests/syntax/syntax_test_rails.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Usage:
Options:
[--skip-namespace], [--no-skip-namespace] # Skip namespace (affects only isolated engines)
# ^^^^^^^^^^^^^^^^^^ - entity.name.function.option.cmd-help
# nice: handle options between square brackets
# todo: handle options between square brackets
[--skip-collision-check], [--no-skip-collision-check] # Skip collision check
-r, [--ruby=PATH] # Path to the Ruby binary of your choice
# Default: /home/victor-gp/.rbenv/versions/3.0.1/bin/ruby
Expand Down

0 comments on commit 009a30d

Please sign in to comment.