Installing ignored files using NPM

The package is specified in the project dependencies:

  "name": "project",
  "devDependencies": {
    "package": "*"
  }

Some of the files in the installed package are ignored by the black list ( .npmignore) or white list:

  "name": "package",
  "files": [
    "lib/",
    "index.js",
    "LICENSE",
    "README.md"
  ],

Dismissing and changing ignore options is not an option for me. I would prefer that he be in node_modulesand to requirehim, like a regular package, and doing something like git clonein an npm installscript looks like a terrible idea, because it is a dependency on dev and should not be installed for users who add projectas a dependency.

Can a packagerepo be fully installed on npm i, including ignored files? What are the options?

+4
1

npm, zip- .

, package.json. , hapi github, package.json :

"dependencies": {
  "hapi": "hapijs/hapi"
}

github, URL- :

"dependencies": {
  "some-package": "https://git-repo-provider.com/user/repo.git"
}

, #branch-name #tag URL- .

npm install .

0

Source: https://habr.com/ru/post/1629083/


All Articles