Difference between revisions of "Bower"

From OpenEMR Project Wiki
Line 1: Line 1:
=Bower=
=Overview=
:Added this to attempt to standardize the assets that are used by openemr. Assets that are collected via bower are stored at interface/static; note this location is flexible since we are not sure where we will be storing these in the future as migrate to MVC architecture.
:Added this to attempt to standardize the assets that are used by openemr.
:*The path is set to a global here in the codebase(so the path will be easy to change in the future, if needed, along with changing it in the .bowerrc file):
=Plan=
Assets that are collected via bower are stored at interface/static; note this location is flexible since we are not sure where we will be storing these in the future as migrate to MVC architecture.
:*The path is set to a global ($GLOBALS['assets_static_relative']) here in the codebase(so the path will be easy to change in the future) and also would need to be changed in the .bowerrc file):
::*https://github.com/openemr/openemr/commit/b63b0da6a5eae6f8051234bff104a06cb37db167
::*https://github.com/openemr/openemr/commit/b63b0da6a5eae6f8051234bff104a06cb37db167
::*(also see above commit for a example on using the global/path)
::*(also see above commit for a example on using the global/path)
:*Incorporating the versions in the paths of the libraries. Using "ignoredDependencies" in .bowerrc file to ignore sub-dependencies which makes things messy(would bring in paths without versions of which would be a redundant library).
=Implementation=
:Current assets are:
:Current assets are:
:*font-awesome-4-6-3 (commit is pending)
:*font-awesome-4-6-3 (commit is pending)
Line 9: Line 13:
::*Placed "react" as "ignoredDependencies" in .bowerrc file.
::*Placed "react" as "ignoredDependencies" in .bowerrc file.
:*react-15-1-0 (commit is pending)
:*react-15-1-0 (commit is pending)
=Questions=
:'''<span style="color:red;">Development is ongoing for this project</span>''':
:'''<span style="color:red;">Development is ongoing for this project</span>''':
:*Ideal directory for this stuff
:*Ideal directory for this stuff (this is why we have made it flexible so can easily change this in the future)
:*Ideal syntax of the bower openemr package
:*Ideal syntax of the bower openemr package
:*Incorporating versioning of the assets to allow multiple versions of 1 library (ie. such as jquery)
:*Use this only for front-end libraries (css/js)?
:*Several questions to answer:
:*Use composer for back-end libraries? If so, use separate directory?
::*Use this only for front-end libraries (css/js)?
:*Should we be using bower for this or is it better to manually bring in packages in a standard fashion?
::*Use composer for back-end libraries? If so, use separate directory?
::*Should we be using bower for this or is it better to manually bring in packages in a standard fashion?
 
=Forum=
=Forum=
:*[https://sourceforge.net/p/openemr/discussion/202506/thread/d4ec2b8b/ assets directory]
:*[https://sourceforge.net/p/openemr/discussion/202506/thread/d4ec2b8b/ assets directory]

Revision as of 08:22, 5 July 2016

Overview

Added this to attempt to standardize the assets that are used by openemr.

Plan

Assets that are collected via bower are stored at interface/static; note this location is flexible since we are not sure where we will be storing these in the future as migrate to MVC architecture.

  • The path is set to a global ($GLOBALS['assets_static_relative']) here in the codebase(so the path will be easy to change in the future) and also would need to be changed in the .bowerrc file):
  • Incorporating the versions in the paths of the libraries. Using "ignoredDependencies" in .bowerrc file to ignore sub-dependencies which makes things messy(would bring in paths without versions of which would be a redundant library).

Implementation

Current assets are:
  • font-awesome-4-6-3 (commit is pending)
  • literallycanvas-0-4-13 (commit is pending)
  • Placed "react" as "ignoredDependencies" in .bowerrc file.
  • react-15-1-0 (commit is pending)

Questions

Development is ongoing for this project:
  • Ideal directory for this stuff (this is why we have made it flexible so can easily change this in the future)
  • Ideal syntax of the bower openemr package
  • Use this only for front-end libraries (css/js)?
  • Use composer for back-end libraries? If so, use separate directory?
  • Should we be using bower for this or is it better to manually bring in packages in a standard fashion?

Forum