3 ms·
The manpage says that directly invoking a script from package.json with `npm run X` aka `npm run-script X` will still work with this preference set to true, but
by jffry 5y ago
The manpage says that directly invoking a script from package.json with `npm run X` aka `npm run-script X` will still work with this preference set to true, but that it will not run pre/post scripts. Perhaps that is good enough for your use-case?
npm help run-script
[...]
ignore-scripts
o Default: false
o Type: Boolean
If true, npm does not run scripts specified in package.json files.
Note that commands explicitly intended to run a particular script, such as npm
start, npm stop, npm restart, npm test, and npm run-script will still run their
intended script if ignore-scripts is set, but they will not run any pre- or
post-scripts.
- schemescape 5y agoEdit: That doesn't work as described on NPM 6.14.14 (the version I had), but it does work on NPM 8.1.0 (the version I just upgraded to). Thanks!
- jffry 5y agoAh, looks like it was introduced in v7.0 - https://github.com/npm/rfcs/pull/185 https://github.com/npm/rfcs/pull/185