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

Added devDependencies block to bower.json configuration #93

Merged
merged 2 commits into from
Jul 21, 2014

Conversation

ValMilkevich
Copy link
Contributor

No description provided.

@1st8
Copy link
Contributor

1st8 commented Jul 16, 2014

Nice feature!

How does bower know when to install the devDependencies and when not to?
The new bower:install:deployment task should skip devDependencies, if it doesn't already do that.

@SergeyKishenin
Copy link
Collaborator

@1st8 Do we need it to be installed in production? devDependencies are for the development-related scripts, e.g. unit testing, packaging scripts, documentation generation, etc.

@1st8
Copy link
Contributor

1st8 commented Jul 16, 2014

No we don't, sorry if that was unclear. I would say devDependencies MUST NOT be installed in production.

I just couldn't find any bower related flag to tell it NOT to install the devDependencies in production.

@SergeyKishenin
Copy link
Collaborator

There is the -p or --production flag http://stackoverflow.com/a/19341028/532252

@1st8
Copy link
Contributor

1st8 commented Jul 16, 2014

What do you think about using this flag in the bower:install:deployment task?

@SergeyKishenin
Copy link
Collaborator

We can do that now by rake bower:install:deployment['-p'].

But is it the preferred behavior? I don't think so. bower:install:deployment won't update our bower.json if we add/remove some packages, right?

That's why now by default we have install_before_precompile flag to perform plain bower:install task while deploying. bower:install:deployment is very optional and good for specific cases and should be executed manually, I think.

On subject: if we have devDependencies now so the preferred way to perform install task is with -p flag.

@1st8
Copy link
Contributor

1st8 commented Jul 16, 2014

I'm planning to use bower:install:deployment in place of install_before_precompile in my automated deployment procedure. It respects the resolved dependency conflicts in my bower.json, which I don't want to manually resolve on every deployment on multiple hosts again (which would be required with the regular bower:install. This way, I only have to check my bower.json into version control, can push it to my server, and run bower:install:deployment.

I think this is the main use case of a deployment-install, just like bundle install --deployment simply installs the contents of your Gemfile.lock without resolving any dependencies again.

So for me it would be a perfect fit to instruct bower not to install development dependencies by default in a deployment install, but setting the -p-flag is not too much to ask. I can do that manually of course.
Do you think it is useful to describe the whole "Versioning, deployment and dependency conflict"-topic in a readme paragraph? Was thinking about writing one yesterday.

Back to topic - devDependencies are definitely a nice addition which I can see myself using in the future.

@SergeyKishenin
Copy link
Collaborator

@ValMilkevich, great work! But before merge we have to:

  • tell bower not to install devDependencies by default
  • add detailed description to Changelog (it's a minor change and we have to release 0.8.0 version after merge, I think)
  • squash and rebase redundant commits (like 'readme.md')

@1st8 any contributions are welcome, "Versioning, deployment and dependency conflict" would be very useful for current version.

@ValMilkevich
Copy link
Contributor Author

@SergeyKishenin, thanks for the note, I'm going to amend those during the upcoming few days.

@ValMilkevich
Copy link
Contributor Author

@SergeyKishenin, @1st8 please check it out, PR looks ready for me

@SergeyKishenin
Copy link
Collaborator

For me too. But there are some conflicts right now, are you gonna fix it?

@ValMilkevich
Copy link
Contributor Author

Looks like it's just not possible to merge with master, I thought it's something you can do when accepting PR?

I'm pretty new with public PRs, how can I resolve the conflicts?

@ValMilkevich
Copy link
Contributor Author

it can be that github is just tricking around, as there are no conflicts in the branch ( however I forced push after squashing the commits - may it be the reason? )

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

Successfully merging this pull request may close these issues.

3 participants