Difference between revisions of "Bower"
From OpenEMR Project Wiki
Bradymiller (talk | contribs) |
Bradymiller (talk | contribs) |
||
Line 28: | Line 28: | ||
:*Placed "imagesloaded" as "ignoredDependencies" in .bowerrc file. | :*Placed "imagesloaded" as "ignoredDependencies" in .bowerrc file. | ||
===react-15-1-0=== | ===react-15-1-0=== | ||
===shortcut.js-2-01-B=== | ===shortcut.js-2-01-B (pending Ray's optho form)=== | ||
:*Not supported by bower, so brought in manually to the manual-added-packages sub-directory. | :*Not supported by bower, so brought in manually to the manual-added-packages sub-directory. | ||
===undone.js-0-0-1 (pending Ray's optho form)=== | ===undone.js-0-0-1 (pending Ray's optho form)=== |
Revision as of 08:24, 9 July 2016
Overview
- Added this to attempt to standardize the assets that are used by openemr.
- Assets that are collected via bower are stored at public/assets; 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
- (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).
Current Assets
AnythingSlider-1-9-4 (pending Ray's optho form)
- Removed .gitignore and .gitattributes files.
bootstrap-3-3-4 (pending Ray's optho form)
- Placed "jquery" as "ignoredDependencies" in .bowerrc file.
Chart.js-2-1-3 (pending Ray's optho form)
- Removed .gitignore file.
font-awesome-4-6-3
- Removed .gitignore file.
jquery-panelslider-0-1-1 (pending Ray's optho form)
- Placed "jquery" as "ignoredDependencies" in .bowerrc file.
jquery-ui-1-11-4 (pending Ray's optho form)
- Removed .gitignore file.
- Placed "jquery" as "ignoredDependencies" in .bowerrc file.
literallycanvas-0-4-13
- Placed "react" as "ignoredDependencies" in .bowerrc file.
pure-0-5-0 (pending Ray's optho form)
qtip2-2-2-1 (pending Ray's optho form)
- Placed "imagesloaded" as "ignoredDependencies" in .bowerrc file.
react-15-1-0
shortcut.js-2-01-B (pending Ray's optho form)
- Not supported by bower, so brought in manually to the manual-added-packages sub-directory.
undone.js-0-0-1 (pending Ray's optho form)
- Removed .gitignore and .gitattributes files.
Add New Asset
Bower
- Add entry to the bower.json file.
- 'bower install' command
- Remove .gitignore and .gitattributes files(if they are present) from the installed package.
Manual
- If there is no bower support or package is not a supported git repo, then will need to bring in manually. See above shortcut.js-2-01-B asset for example.
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? And for packages that are not offered via bower, should we add a manually-added directory for these?