Neat CLI commands #13

Closed
wants to merge 17 commits into
from

Projects

None yet

3 participants

@kaishin
kaishin commented Oct 22, 2012

We need to provide an easier workflow for non-Rails projects using install and update commands (like we do for bourbon).

@mike-burns
Member

Proposal: a bourbon plugin infrastructure for installation and updates.

From the user's perspective, they type bourbon install neat and bourbon update neat.

Tech details:

On the bourbon side this will require the file neat/plugin. Neat::Plugin looks like this:

module Neat
  class Plugin < Bourbon::Plugin
  end
end

Instance of Neat::Plugin can be used to #install and #update neat. The inherited installer and updater simply copy the relevant files from app/assets/stylesheets.

@kaishin
kaishin commented Sep 4, 2012

Just to make sure we're on the same page, would this requires the Neat gem to be installed locally?

@mike-burns
Member

Yes, that part does not change. The Gemfile still needs this line:

gem 'neat'
@plapier
Contributor
plapier commented Sep 4, 2012

Mike, I have plans for improving the install and update commands. Like specifying a location.

bourbon install ./stylesheets/scss/
bourbon update ./stylesheets/scss/

I don't necessarily think bourbon should require neat. If we build a plugin system, we should think about building it so that other members of the open source community can use it too. Bourbon should not have to require all the plugins we may build for it.

Neat should require bourbon, but not vice versa.

Though, I do like the simplicity of bourbon install neat & bourbon install neat ./stylesheets/scss/ (location specified)

@mike-burns
Member

Sorry, I miscommunicated. Bourbon will not depend on Neat, but the Ruby code will translate bourbon install neat into require neat/plugin.

I definitely want hooks that the community can build atop, and I see Neat as a good testbed for that.

@plapier
Contributor
plapier commented Sep 4, 2012

Gotcha. I'm fine with with the proposal then.

@kaishin
kaishin commented Sep 4, 2012

Is there a way to make bourbon install neat install the actual Neat gem if it's missing? That way we can skip the gem install neat altogether.

@mike-burns
Member

It can, yes, but this will interact oddly with bundle/Gemfile. If this is actually an option you want then I recommend something like bourbon install neat --remote or --system or something extra.

@kaishin
kaishin commented Sep 4, 2012

I guess what bothers me is this exact sequence:

$ gem install neat
$ bourbon install neat
@mike-burns
Member

Let's optimize for the common case. So, what is the common case: will people who use bourbon install often use Bundler and Gemfiles, or will they instead type gem install neat?

@kaishin
kaishin commented Sep 4, 2012

Unless @plapier has some concrete data for Bourbon, my hunch tells me it's the latter. Either way, those who use Gemfile are well covered regardless of he direction we take. I'm fine with bourbon install neat for a start, just thinking of ways to make it even simpler.

@mike-burns mike-burns referenced this pull request in thoughtbot/bourbon Oct 12, 2012
Closed

Plugin infrastructure #116

@kaishin
kaishin commented Oct 22, 2012

I think we should temporarily provide a way to install and update Neat on non-Rails projects . I added this functionality in the present PR.

@kaishin kaishin referenced this pull request Oct 22, 2012
Closed

Package 'neat' into a gem #10

@kaishin kaishin closed this Oct 29, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment