ScottHamper / Cookies

JavaScript Client-Side Cookie Manipulation Library
The Unlicense
1.77k stars 170 forks source link

Add "files" to "package.json" #41

Closed zertosh closed 9 years ago

zertosh commented 9 years ago

Specify what files to include in npm releases - this way tests and bower.json don't get included in the packaged version. (See https://docs.npmjs.com/files/package.json#files)

ScottHamper commented 9 years ago

Cool, thanks Andres!

ScottHamper commented 9 years ago

Hey, what are your thoughts about reducing the list of files even further? Specifically, removing the "src" folder and "CHANGELOG.md"?

If the "files" property is intended to only include files that are relevant for a production ready package, then it seems like it would make sense to only include the "dist" folder. Is there a semantic difference between "tests" and "src" that means we should treat them differently from each other? They both seem like they'd only be relevant when doing development work on the library.

Let me know what you think!

zertosh commented 9 years ago

Hey @ScottHamper, np. I have no opinion on CHANGELOG.md, but yeah src should be excluded too - I missed it.

ScottHamper commented 9 years ago

Ok, cool! Thanks again

zertosh commented 9 years ago

Not sure how familiar you are with npm, so I hope I'm not offending by offering this tip: You can see what your final package will look like by running npm pack. It'll make tar.gz that you can then open and inspect to make sure everything you expect to be there is actually there.

ScottHamper commented 9 years ago

Nice! That's great to know - I am not really that familiar with NPM. I'll have to prepare a new release with these changes soon.