gruntjs / gruntjs/grunt

Prompt for local module installation?

Open
#846 0 comments 0 reactions 0 assignees View on GitHub
Type: Enhancement
Dominant language
JavaScript
Stars
12.2k
Forks
1.5k
PR merge metrics
No merged PRs in 30d

Description

Will it be useful to have something like :

```
'Local Npm module "' + name + '" not found. Is it installed?'

Would you like to install it? [Y/N] Y
Would you like to --save-dev? [Y/N] Y

Installing name .....Done!
```

Instead of just a `grunt.log.error` ?

Source location -> [L397](https://github.com/gruntjs/grunt/blob/25728e1744836b42927962a005fe1ce15f55640f/lib/grunt/task.js#L397)

Contributor guide

Open the contributing guide

Research direction

Start at lib/grunt/task.js around line 397, where the missing local npm module is reported with grunt.log.error. Review the surrounding task-loading flow before deciding how prompts and installation should fit there. Done means a missing module can be offered for installation and optionally saved as a development dependency, with the requested confirmation flow working end to end.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.