Use bower for front-end dependencies

RESOLVED FIXED

Status

Webmaker
webmaker.org
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: inactivate account for kate, Assigned: inactivate account for kate)

Tracking

Details

(Whiteboard: s=20130729 p=1)

Attachments

(1 attachment)

(Assignee)

Description

5 years ago
After discussing this with Gavin, Jon, and Dale we think using bower to manage our front end dependencies would be a great thing to do going forward.

It allows us to:
- easily keep things like font-awesome up to date
- write and maintain frontend libraries as separate modules for re-use across our other projects. In this patch, for example, I include the makeapi-client as a bower dependency instead of symlinking it or rendering config options into nunjucks templates and reading with js.
- reduces the amount of code in the repo

Using bower should feel -very- familiar to the team since it uses similar syntax to npm and follows similar conventions.

Installing it is also super simple: npm install -g bower
(Assignee)

Comment 1

5 years ago
Created attachment 781406 [details] [review]
https://github.com/mozilla/webmaker.org/pull/293
Attachment #781406 - Flags: review?(jon)
Attachment #781406 - Flags: feedback?(gavin)
(Assignee)

Comment 2

5 years ago
Also, since bower is node, we can include a postinstall script in our package.json that should work with our deployment tools.

Comment 3

5 years ago
Comment on attachment 781406 [details] [review]
https://github.com/mozilla/webmaker.org/pull/293

This is awesome! Some nits noted in the PR to fix up and unfortunately events don't work at all due to a jquery path error:

--
[11:52:35.766] Error: Script error for: jquery
http://requirejs.org/docs/errors.html#scripterror @ http://localhost:7777/ext/requirejs/require.js:163
Attachment #781406 - Flags: review?(jon) → review-
(Assignee)

Updated

5 years ago
Whiteboard: s=20130729 p=1
(Assignee)

Updated

5 years ago
Depends on: 899077
(Assignee)

Comment 4

5 years ago
Comment on attachment 781406 [details] [review]
https://github.com/mozilla/webmaker.org/pull/293

Updated, moved bower stuff to bower_components
Attachment #781406 - Flags: review- → review?(jon)

Comment 5

5 years ago
Comment on attachment 781406 [details] [review]
https://github.com/mozilla/webmaker.org/pull/293

r+ with nits, remove that rogue console.log
Attachment #781406 - Flags: review?(jon) → review+

Updated

5 years ago
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Attachment mime type: text/plain → text/x-github-pull-request
(Assignee)

Updated

5 years ago
Attachment #781406 - Flags: feedback?(gavin) → feedback?
(Assignee)

Updated

5 years ago
Attachment #781406 - Flags: feedback?
You need to log in before you can comment on or make changes to this bug.