Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

"files" property in package.json ignores directories #2075

Closed
jbeard4 opened this issue Jan 22, 2012 · 3 comments
Closed

"files" property in package.json ignores directories #2075

jbeard4 opened this issue Jan 22, 2012 · 3 comments

Comments

@jbeard4
Copy link

jbeard4 commented Jan 22, 2012

I'm running the following verisons of npm and node:

jacob@jacob-VirtualBox:$ npm --version
1.1.0-beta-4
jacob@jacob-VirtualBox:
$ node --version
v0.6.6

Documentation states the following about the "files" property in package.json:

files
The "files" field is an array of files to include in your project. If you name a folder in the
array, then it will also include the files inside that folder. (Unless they would be ignored by
another rule.)

I have a npm package with the following structure:

foo/
    package.json
    thisisafile
    thisisadirectory/
        thisisafileinadirectory

package.json is the following:

{
    "name": "foo",
    "version" : "0.0.1",
    "files" : [ "thisisadirectory","thisisafile" ]
}

When running "npm install ./foo", the installed "foo" package has the following directory structure:

foo/
    package.json
    thisisafile

Here's a link to this reduced test case: http://stuff.echo-flow.com/github/foo.tgz

@isaacs
Copy link
Contributor

isaacs commented Mar 27, 2012

Can you try with npm 1.1.13 and see if this problem still exists? Thanks.

@isaacs isaacs closed this as completed Mar 27, 2012
@isaacs isaacs reopened this Mar 27, 2012
@isaacs
Copy link
Contributor

isaacs commented Mar 27, 2012

Oh, actually, yeah, it's still a bug.

@RubaXa
Copy link

RubaXa commented Nov 29, 2017

  • fileapi@2.0.25

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

3 participants