Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm install without package arguments? #25

Merged
merged 6 commits into from
Dec 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ jobs:
fail-fast: false
matrix:
emacs_version:
- 25.3
- 26.3
- 27.1
- 28.1
- 29.4
steps:
- uses: actions/checkout@v2
- uses: purcell/setup-emacs@master
Expand Down
9 changes: 8 additions & 1 deletion npm-install.el
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@
("-o" "Save as optional dependency" "--save-optional")
("-n" "Do not save to package.json" "--no-save")]
[["Command"
("i" "Install" npm-install)]]
("i" "Install new package" npm-install)
("I" "Install current packages (in package.json)" npm-install-current)]]
(interactive)
(transient-setup 'npm-install-menu))

Expand All @@ -56,6 +57,12 @@
"Arguments function for transient."
(transient-args 'npm-install-menu))

(defun npm-install-current (&optional args)

Check warning on line 60 in npm-install.el

View workflow job for this annotation

GitHub Actions / check (28.1)

docstring wider than 80 characters

Check warning on line 60 in npm-install.el

View workflow job for this annotation

GitHub Actions / check (29.4)

docstring wider than 80 characters
"Invoke the compile mode with the install prefix-command and ARGS if provided but no packages."
(interactive)
(let ((arguments (string-join args " "))
(npm-command (npm-install--get-install-command "")))
(npm-common--compile npm-command arguments)))

;;;###autoload
(defun npm-install (&optional args)
Expand Down
2 changes: 1 addition & 1 deletion npm.el
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

;; Author: Shane Kennedy
;; Homepage: https://github.com/shaneikennedy/npm.el
;; Package-Requires: ((emacs "25.1") (transient "0.1.0") (jest "20200625"))
;; Package-Requires: ((emacs "25.1") (transient "0.1.0") (jest "20220807.2243"))

Check warning on line 7 in npm.el

View workflow job for this annotation

GitHub Actions / check (26.3)

Use a non-snapshot version number for dependency on "jest" if possible.

Check warning on line 7 in npm.el

View workflow job for this annotation

GitHub Actions / check (27.1)

Use a non-snapshot version number for dependency on "jest" if possible.

Check warning on line 7 in npm.el

View workflow job for this annotation

GitHub Actions / check (28.1)

Use a non-snapshot version number for dependency on "jest" if possible.

Check warning on line 7 in npm.el

View workflow job for this annotation

GitHub Actions / check (29.4)

Use a non-snapshot version number for dependency on "jest" if possible.
;; Keywords: tools
;; Version: 0

Expand Down Expand Up @@ -44,7 +44,7 @@
(setq-local truncate-lines t))

;;;###autoload
(defun npm ()

Check warning on line 47 in npm.el

View workflow job for this annotation

GitHub Actions / check (28.1)

docstring wider than 80 characters

Check warning on line 47 in npm.el

View workflow job for this annotation

GitHub Actions / check (29.4)

docstring wider than 80 characters
"Entrypoint function to the package.
This will first check to make sure there is a package.json file and then open the menu."
(interactive)
Expand Down
Loading