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

Dist Directory When Not Building Artifacts #33

Closed
ghost opened this issue Sep 6, 2015 · 3 comments
Closed

Dist Directory When Not Building Artifacts #33

ghost opened this issue Sep 6, 2015 · 3 comments

Comments

@ghost
Copy link

ghost commented Sep 6, 2015

I had a question, and potential workflow issue, when using the latest release of release-it programmatically (as compared to v0.0.15).

I tend to setup an npm run-script called build that will lint my node module using jscs and jshint. I also setup a an npm run-script called test to run my Jasmine/Mocha tests. Lastly, I set the buildCommand option to be npm run build && npm run test.

The idea is that linting and unit testing will be executed before the project is tagged and published.

However, it seems the recent version of release-it will, when buildCommand is set, create a dist/ directory. That causes my working directory to include a dist/ directory.

Now, in my case, because the dist/ directory is empty, git will not attempt to add the directory to my index. Furthermore, git will not show the directory when running git status.

@webpro
Copy link
Collaborator

webpro commented Sep 7, 2015

Yes, the dist folder is created automatically, which isn't nice if you're not building anything.

If I understand correctly, this is not directly an issue for you now. So either you add the dist.baseDir to your .gitignore, or this tool should somehow have an option or way to not create this directory. A potential "fix" is to allow dist.baseDir to be null, and I can install some checks to handle this case.

Any thoughts?

@ghost
Copy link
Author

ghost commented Sep 8, 2015

@webpro, yes, you're correct. It's not an issue at this time.

For a little more insight, I actually maintain a package that bundles release-it with conventional-changelog to provide a complete release workflow for other package developers. Therefore, I wouldn't want to impose on each project by requiring that they add dist/ to their .gitignore file. This is also why I wanted to avoid the extra dist/ directory being created in each project, since it's unexpected for those same developers.

The idea of setting dist.baseDir to null seems interesting.

Another idea, and I'm just throwing this out there, is to set baseDir to null by default, unless the project has setup a dist repo, or has manually set baseDir?

I'm also of the opinion, contrary to #31, that each project should manage their own dist/ directory as part of their build. If the project's build wasn't creating a dist/ directory that met the developer's expectations originally, then it shouldn't be up to release-it to compensate.

@webpro
Copy link
Collaborator

webpro commented Sep 9, 2015

@destroyerofbuilds Thanks for the feedback. The .gitignore idea was a temporary fix, I'm going to allow dist.baseDir to be null. Regarding managing that dist folder, the idea is that in most cases it's convenient, but you disable it (as of the next release).

@webpro webpro closed this as completed in 71a3c7f Sep 9, 2015
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