itsthatguy / avatars-api-middleware

The express middleware for our avatars service
http://avatars.adorable.io
Other
749 stars 96 forks source link

Organize dev and non-dev dependencies. #53

Closed bayleedev closed 7 years ago

bayleedev commented 7 years ago

For smaller bundles.

itsthatguy commented 7 years ago

This would be ideal. The problem is, this wont deploy to our production server. We need to solve this at a higher level, first.

bayleedev commented 7 years ago

Is there anything I can do to help?

itsthatguy commented 7 years ago

@blainesch Let me try to elaborate.

We deploy the avatars-api to heroku. Since we don't track compiled assets, in git, we need heroku to run the build, to generate the compiled assets used on the server. Right now, that means we have to have development dependencies in the dependencies section. We would need to do a number of things, to be able to separate the two:

  1. Remove any reference to static assets in the build tools (Gulpfile.js).
  2. Rewrite avatars-api in something that doesn't use pre-compilation (ie; get rid of coffeescript, and switch to something like babel-node to handle running the server), or run coffee directly from CLI
  3. Remove all bower dependencies

I believe that's it, but I might be missing a few things. There's an existing issue that discusses some of this: https://github.com/itsthatguy/generator-spire/issues/19

I hope that helps clarify things.

bayleedev commented 7 years ago

Makes sense, thanks for clarifying [: