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

Exclude folders / files when publishing or installing a package #248

Closed
sporto opened this issue Oct 20, 2016 · 3 comments
Closed

Exclude folders / files when publishing or installing a package #248

sporto opened this issue Oct 20, 2016 · 3 comments

Comments

@sporto
Copy link

sporto commented Oct 20, 2016

I often put example folders in my packages. I find it very useful to have this in the same repo because when working on a new version of a lib I can change the lib and the example at the same time to make sure everything works fine.

However when users download the package, they get the examples with it. This has caused some issues for some users apparently sporto/hop#40.

It would be nice if we could set something in elm-package to exclude files or folders when the user install the package. e.g. http://doc.crates.io/manifest.html#the-exclude-and-include-fields-optional

@process-bot
Copy link

Thanks for the issue! Make sure it satisfies this checklist. My human colleagues will appreciate it!

Here is what to expect next, and if anyone wants to comment, keep these things in mind.

@lydell
Copy link

lydell commented Oct 20, 2016

Something that has worked great for me in the npm world, is to use the files field of package.json. (Go follow that link! It’s very short and tells exactly how files work.) If elm-package.json had a similar field, it looks like "files": ["src"] would do it for hop’s case.

@evancz
Copy link
Contributor

evancz commented Jul 11, 2017

@sporto, longer term, I would like to only distribute the files that are absolutely necessary.

Many package managers force you to list all the files that are needed. Haskell does this. I think this is pointless because the compiler can figure it out faster and never make mistakes.

So in the long run, we will have a more elaborate publication process that verifies builds, tests, licenses, etc. and it will be able to strip out anything unnecessary. In the meantime, I recommend keeping stuff in your repository. Unless you have some sort of insane artifacts, it should not be a huge size difference.

@evancz evancz closed this as completed Jul 11, 2017
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

4 participants