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

Switch to bower for managing frontend dependencies. #2272

Closed
ErisDS opened this issue Feb 26, 2014 · 3 comments · Fixed by #2326
Closed

Switch to bower for managing frontend dependencies. #2272

ErisDS opened this issue Feb 26, 2014 · 3 comments · Fixed by #2326
Assignees
Labels
affects:admin Anything relating to Ghost Admin
Milestone

Comments

@ErisDS
Copy link
Member

ErisDS commented Feb 26, 2014

To date we've had no management around our various frontend dependencies. As we switch to ember, we're going to want to use bower.

I think it would be really good to do this in master for our current setup and merge it back into the ember branch... thoughts?

We can probably put the majority of our dependencies in bower.json, and then run bower install as part of npm install:

https://github.com/stefanpenner/ember-app-kit/blob/master/package.json#L17

This should be reasonably straight forward to do, however there are a couple of considerations:

  • what to do about our shared vs client dependencies - the intention was always that 'shared' should contain anything that might be shared between the admin client and the theme. This has become a little bit confused over time.
  • /shared/vendor/showdown/github.js is a heavily modified version of the original used on both the client and server
  • /client/assets/vendor/showdown/extensions/ghostdown.js is a custom extension used client side only to manage image uploads + deal with multiple underscores

If we can make a sensible decision about how to sort these bits out, this might even be a good candidate for a beginner issue?

@ErisDS ErisDS added this to the 0.5 milestone Feb 26, 2014
@ErisDS ErisDS added the client label Feb 26, 2014
@hswolff
Copy link
Contributor

hswolff commented Feb 26, 2014

I think it would be really good to do this in master for our current setup and merge it back into the ember branch... thoughts?

+1

what to do about our shared vs client dependencies - the intention was always that 'shared' should contain anything that might be shared between the admin client and the theme. This has become a little bit confused over time.

I also find that confusing. I'd prefer a clean separation of client and server libs, as most of them will be outside of git and included via bower or npm.

/shared/vendor/showdown/github.js is a heavily modified version of the original used on both the client and server
/client/assets/vendor/showdown/extensions/ghostdown.js is a custom extension used client side only to manage image uploads + deal with multiple underscores

If these are custom and modified only for our uses then we should probably take them out of vendor, as they're Ghost specific.

With switching to bower we should add the vendor folder to the .gitignore file as it no longer needs to be included in the repo.

@ErisDS
Copy link
Member Author

ErisDS commented Feb 26, 2014

what to do about our shared vs client dependencies - the intention was always that 'shared' should contain anything that might be shared between the admin client and the theme. This has become a little bit confused over time.

I also find that confusing. I'd prefer a clean separation of client and server libs, as most of them will be outside of git and included via bower or npm.

They are meant to be client libs - admin client and theme client. However it has also been used for stuff shared between server and client such as showdown/github.js

And yes, I've had an item on my todo list to move github.js and ghostdown.js out of vendor for about 5 months.... sigh

@ErisDS
Copy link
Member Author

ErisDS commented Mar 3, 2014

Link to our conversation about this in IRC: http://107.20.237.151:8081/logs/%23ghost/20140303#pm41635

halfdan added a commit to halfdan/Ghost that referenced this issue Mar 4, 2014
fixes TryGhost#2272
- Remove libraries from shared/vendor
- Remove libraries from client/assets/vendor
- Add bower to package.json and postinstall
- Add bower.json with dependencies
- Add scripts from bower_components to concat/uglify
- Fix tests
- Serve jquery from /ghost/built/theme/
ErisDS added a commit to ErisDS/Ghost that referenced this issue Mar 10, 2014
issue TryGhost#2272

- handlebars version should match node (1.3.0)
- iCheck isn't used
@ErisDS ErisDS modified the milestones: 0.4.2, 0.5 Mar 10, 2014
ErisDS pushed a commit that referenced this issue Mar 14, 2014
fixes #2272
- Remove libraries from shared/vendor
- Remove libraries from client/assets/vendor
- Add bower to package.json and postinstall
- Add bower.json with dependencies
- Add scripts from bower_components to concat/uglify
- Fix tests
- Serve jquery from /ghost/built/theme/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects:admin Anything relating to Ghost Admin
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants