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

Build from slc arc doesn't exclude files and folders in .npmignore #1716

Open
nodejsbspa opened this issue Feb 2, 2016 · 0 comments
Open

Comments

@nodejsbspa
Copy link

Hi,
I tried to build a tar file of my app using slc arc but I found something odd to me because the final .tar file included some files and folders that shouldn't have been there.

I had created the .npmignore file since it's mandatory in order to exclude folders and files I don't want to be in production but that seemed to be ineffective. It seems to me that strong-arc don't consider the .npmignore.

I looked into the code and went through the modules strong-arc (version 1.8.8) -> strong-build(version 2.1.0) -> strong-pack (version 1.0.0).

In the modules strong-pack (which creates the .tar file), in the index.js, line 23, the files to be excluded from the final .tar file are listed in the variable FILTER (https://github.com/strongloop/strong-pack/blob/master/index.js#L9). They aren't taken from the .npmignore.

Would be possible to modify the function pack in index.js of module strong-pack (https://github.com/strongloop/strong-pack/blob/master/index.js#L21) to accept a second argument to override the global variable FILTER?
That function is called at the line 223 in the file index.js in module strong-build (https://github.com/strongloop/strong-build/blob/master/index.js#L223) would have to pass as second parameter the list of files to exclude. The module strong-build would also have to read the .npmignore (of course).

Might that be a good point?
Thanks

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

No branches or pull requests

1 participant