Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extra folders with package.json/files #40

Open
unional opened this issue May 26, 2016 · 3 comments
Open

Extra folders with package.json/files #40

unional opened this issue May 26, 2016 · 3 comments
Labels

Comments

@unional
Copy link

unional commented May 26, 2016

As I configure:

// package.json
{
  "files": [ "dist/", "typings.json" ]
  ...
}

When I install the package jspm i bit:abc (bit is my registry), all folders in the git repo are created:

bit
+--- [email protected]
      +--- src
      +--- dist
      +--- spec

Those folders are correctly empty thou.
Also tried

{
  "jspm": {
    "files": ["dist/", "typings.json" ]
  }
}

with same result.

@subesokun
Copy link
Contributor

Hi @unional, sorry to hear that you've still issues with that. Actually it's not really recommended to use the files filter. My recommendation would be to create a separate distribution repository that contains just the files that shall be part of your distribution. Generally it's not a good idea to put the dist folder under version control in the same repository as the src folder. Having them mixed in one repo makes also your jspm install ... command slower as jspm removes the files first after downloading the whole package/repository. So on every install you're currently downloading many files which will be thrown away afterwards. With a separate repository you could avoid this issue and make your jspm faster.

Anyhow this issue sound like a duplicate of #33 or is it a different question? Also it seems like the issue jspm/jspm-cli#1699 is still open.

@unional
Copy link
Author

unional commented Jul 2, 2016

Anyhow this issue sound like a duplicate of #33

It is a bit different as #33 is about the whole repo remains after install. Now seems like the files are removed but not the folders.

it's not really recommended to use the files filter....jspm removes the files first after downloading the whole package/repository.

Does npm do the same thing?

@subesokun
Copy link
Contributor

It is a bit different as #33 is about the whole repo remains after install. Now seems like the files are removed but not the folders.

I see, but as the whole processing / filtering of the files is happing within the core of jspm you've to file this issue there as well. jspm-git just downloads the repository and reads out the package.json but the rest is done by jspm itself.

Does npm do the same thing?

As far as I know yes. It just downloads a tar archive and then in a later step it applies the files filter. But usually you run a npm publish within the dist folder so that would be the same as creating a separate dist repo for jspm.

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

No branches or pull requests

2 participants