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

Ignore unnecessary files at release time #499

Merged
merged 1 commit into from
Jul 16, 2016

Conversation

astorije
Copy link
Member

  • client/views/ contains templates whose built version is provided with each releases
  • .gitignore doesn't appear in our releases, but I'm not sure if this comes from npm itself or Travis CI publishing for us. Adding it here for completeness. None of the documentations (npm or Travis CI) mentions this explicitly, so ¯_(ツ)_/¯. If someone knows more about this, please share.
  • Surprisingly, .npmignore itself is not ignored...
  • All other files and directories are for development purposes only

screen shot 2016-07-14 at 00 34 06

- `client/views/` contains templates whose built version is provided
  with each releases
- `.gitignore` doesn't appear in our releases, but I'm not sure if this
  comes from npm itself or Travis CI publishing for us. Adding it here
  for completeness.
- Surprisingly, `.npmignore` itself is not ignored...
- All other files and directories are for development purposes only
@astorije astorije added the Type: Feature Tickets that describe a desired feature or PRs that add them to the project. label Jul 14, 2016
@AlMcKinlay
Copy link
Member

Looks good to me.

Regarding .gitignore being ignored, it appears that is because of npm: issue here. However, no one seems to explain why this is the case.

tl;dr If .npmignore doesn't exist, the .gitignore gets renamed to .npmignore in the package. If .npmignore exists, .gitignore is just ignored. You can't change this either, as putting !.gitignore doesn't fix it. So there literally seems no way to get .gitignore into an npm package without renaming it.

But I agree to keep it in there, because I expect this will be fixed at some point, and it future proofs us.

Only question is: have you checked what happens when you install the package without all these things? It will try and rerun the build, because we have the build on prepublish, which is run on publish and install. So I imagine this would fail.

@astorije
Copy link
Member Author

Only question is: have you checked what happens when you install the package without all these things? It will try and rerun the build, because we have the build on prepublish, which is run on publish and install. So I imagine this would fail.

Running the build doesn't apply when you run npm install thelounge[@next], it is only run when calling npm install without arguments. From the doc:

  • prepublish: Run BEFORE the package is published. (Also run on local npm install without any arguments.)

This is also why things that are part of the build (like the font-awesome package, or grunt) are listed in dependencies and not devDependencies: they would not be installed in a production environment.

@AlMcKinlay
Copy link
Member

Alright, well 👍 from me then. Looks sensible.

@maxpoulin64 maxpoulin64 merged commit 9333851 into master Jul 16, 2016
@maxpoulin64 maxpoulin64 deleted the astorije/better-npmignore branch July 16, 2016 18:56
@astorije astorije added this to the 2.0.0 milestone Jul 17, 2016
matburnham pushed a commit to matburnham/lounge that referenced this pull request Sep 6, 2017
…nore

Ignore unnecessary files at release time
@AlMcKinlay AlMcKinlay removed their assignment Mar 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature Tickets that describe a desired feature or PRs that add them to the project.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants