cssinjs / jss

JSS is an authoring tool for CSS which uses JavaScript as a host language.
https://cssinjs.org
MIT License
7.07k stars 397 forks source link

Update ignored files #862

Open eddiemonge opened 5 years ago

eddiemonge commented 5 years ago

Expected behavior: Only dist should be distributed in the npm package

Describe the bug: Src, lib and other files are included in the package including .DS_Store files.

Versions (please complete the following information):

HenriBeck commented 5 years ago

I don't see a .DS_Store file when installing.

The src folder is published for flow types, the dist folder contains the UMD build of jss, and the lib folder contains the commonjs build of jss.

All of the files we are being published currently should be released.

eddiemonge commented 5 years ago

image

kof commented 5 years ago

Found .DS_Store files in dist and src. Probably https://github.com/cssinjs/jss/blob/master/packages/jss/package.json#L20 includes all types of files, we need to npmignore them or add each file individually to files in package.

kof commented 5 years ago

Strange https://docs.npmjs.com/misc/developers#keeping-files-out-of-your-package npm should be using .gitignore

kof commented 5 years ago

Probably when in files is something included, it overrides gitignore/npmignore. So when using files, there is no other choice but to list every file individually.

kof commented 5 years ago

Found another way. globs can be used, so we can do this: "dist/*.js", src/**/*.js, lib/**/*.js

HenriBeck commented 5 years ago

I'm not sure if this is still valid, I just double checked and for me, there are no .DS_Store inside the package. If this is still an issue, please comment again, and I will open this issue again.

eddiemonge commented 5 years ago

Still valid.

HenriBeck commented 5 years ago

@kof can you confirm? For me, there are no .DS_Store files.

Also, npm always ignores .DS_Store files, though this might not apply to yarn. https://docs.npmjs.com/files/package.json.html#files

eddiemonge commented 5 years ago

Did you run the commands in my screenshot? I tried it again and got the same results, although thats expected since the version hasn't changed, even though npm says it was last published a day ago. Odd

eddiemonge commented 5 years ago

Found another way. globs can be used, so we can do this: "dist/*.js", src/*/.js, lib/*/.js

Don't forget .map and '.flow files as well.

I still think only dist should be used. If those things are needed then they should go in the folder