Skip to content

Commit 70b5563

Browse files
Merge pull request #25 from steve-m-ny/steve-m-ny-patch-2
npm install without package arguments?
2 parents 6eb0a58 + 7086979 commit 70b5563

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

.github/workflows/check.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@ jobs:
1313
fail-fast: false
1414
matrix:
1515
emacs_version:
16-
- 25.3
1716
- 26.3
1817
- 27.1
18+
- 28.1
19+
- 29.4
1920
steps:
2021
- uses: actions/checkout@v2
2122
- uses: purcell/setup-emacs@master

npm-install.el

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@
3636
("-o" "Save as optional dependency" "--save-optional")
3737
("-n" "Do not save to package.json" "--no-save")]
3838
[["Command"
39-
("i" "Install" npm-install)]]
39+
("i" "Install new package" npm-install)
40+
("I" "Install current packages (in package.json)" npm-install-current)]]
4041
(interactive)
4142
(transient-setup 'npm-install-menu))
4243

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

60+
(defun npm-install-current (&optional args)
61+
"Invoke the compile mode with the install prefix-command and ARGS if provided but no packages."
62+
(interactive)
63+
(let ((arguments (string-join args " "))
64+
(npm-command (npm-install--get-install-command "")))
65+
(npm-common--compile npm-command arguments)))
5966

6067
;;;###autoload
6168
(defun npm-install (&optional args)

npm.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
;; Author: Shane Kennedy
66
;; Homepage: https://github.com/shaneikennedy/npm.el
7-
;; Package-Requires: ((emacs "25.1") (transient "0.1.0") (jest "20200625"))
7+
;; Package-Requires: ((emacs "25.1") (transient "0.1.0") (jest "20220807.2243"))
88
;; Keywords: tools
99
;; Version: 0
1010

0 commit comments

Comments
 (0)