Skip to content
This repository has been archived by the owner on Sep 5, 2019. It is now read-only.

read package.json and npm-shrinkwrap.json by default? #6

Open
pdehaan opened this issue Nov 2, 2015 · 1 comment
Open

read package.json and npm-shrinkwrap.json by default? #6

pdehaan opened this issue Nov 2, 2015 · 1 comment

Comments

@pdehaan
Copy link
Contributor

pdehaan commented Nov 2, 2015

This is my current boilerplate for grunt-nsp:

module.exports = function (grunt) {
  grunt.config('nsp', {
    package: grunt.file.readJSON('package.json'),
    shrinkwrap: grunt.file.readJSON('npm-shrinkwrap.json')
  });
};

Not sure if there is an easy way to just default to package.json and npm-shrinkwrap.json by default if they were not specified. It seems like this would be the 98.3% use case anyways. (I think this is how grunt-nsp-shrinkwrap worked too.)

@evilpacket
Copy link

I think default behavior would be nice to have. I would probably default it to loading package always and if it can find a shrinkwrap to load that as well. Seems like it would catch most situations.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants