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

Expose a rake task to npm install #59

Merged
merged 2 commits into from
Jan 16, 2015
Merged

Expose a rake task to npm install #59

merged 2 commits into from
Jan 16, 2015

Conversation

seanpdoyle
Copy link
Contributor

Assumes either:

  • bower is a globally accessible command
  • package.json includes:
"tasks": {
  "postinstall": "/path/to/bower/bin/bower install"
}

Corresponds to #33

Assumes that the `package.json` includes:

```json
"tasks": {
  "postinstall": "bower install"
}
```

So that we only depend on a global `npm` installation (not `npm` and
`bower`)
@rondale-sc
Copy link
Collaborator

@seanpdoyle This looks really promising. I'm going to test this today or tomorrow and talk to @rwz about it.

/cc @rwz

@seanpdoyle
Copy link
Contributor Author

Great! I really dislike the fact that you need to depend on postinstall pointing to a bower, but its a start

@@ -25,10 +25,18 @@ def non_production?
!Rails.env.production? && Rails.configuration.consider_all_requests_local
end

def inject_install_dependencies_task!
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we move the definition if this task into a separate file? Kind if like the way it's described here

@rwz
Copy link
Collaborator

rwz commented Jan 16, 2015

Looks good to me!

@rondale-sc
Copy link
Collaborator

👍

* Extract task definition into `.rake` file according to http://blog.nathanhumbert.com/2010/02/rails-3-loading-rake-tasks-from-gem.html
* invoke `npm` with `Helpers.which`
rwz added a commit that referenced this pull request Jan 16, 2015
Expose a rake task to `npm install`
@rwz rwz merged commit d966a47 into tricknotes:master Jan 16, 2015
@rwz
Copy link
Collaborator

rwz commented Jan 16, 2015

Yay! Now I guess we need to describe this process in README somehow.

@rwz
Copy link
Collaborator

rwz commented Jan 16, 2015

Thanks for PR @seanpdoyle

@rondale-sc
Copy link
Collaborator

@seanpdoyle Yeah, thanks! 🍻

@seanpdoyle seanpdoyle deleted the install-dependencies branch January 16, 2015 15:59
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