[bug] .npmignore can't exclude .npmignore

(Bluelovers) #1

What I Wanted to Do




  • .npmignore
  • lib/
    • lib/static/
      • lib/static/.npmignore

What Happened Instead

when publish, /lib/static/.npmignore still got ingore

Reproduction Steps


Platform Info

$ npm --versions
<!-- paste output here -->
$ node -p process.platform
<!-- paste output here -->

(Erick Wilder) #2

.npmignore should be placed in the root directory of your package. By your example I assume that it is not (i.e., under lib/static/.npmignore)

(John Gee) #3

You don’t want the exclamation point starting that line. It negates the pattern, and I think that will mean exclude everything except this file. The opposite of what you are trying to do.


(Bluelovers) #4

i know where .npmignore should put

but /lib/static/.npmignore this file is tpl file for create new module

im doing something like this

fs.copy('./lib/static', target_path)