Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hugojosefson/update-bower-from-component
Updates or creates bower.json based on repo, version and main in component.json.
https://github.com/hugojosefson/update-bower-from-component
Last synced: 29 days ago
JSON representation
Updates or creates bower.json based on repo, version and main in component.json.
- Host: GitHub
- URL: https://github.com/hugojosefson/update-bower-from-component
- Owner: hugojosefson
- Created: 2013-05-14T18:12:20.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2013-05-15T19:31:04.000Z (over 11 years ago)
- Last Synced: 2024-09-17T01:21:27.500Z (4 months ago)
- Language: JavaScript
- Homepage:
- Size: 137 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
- Changelog: History.md
Awesome Lists containing this project
README
# update-bower-from-component
Updates or creates `bower.json` based on `repo`, `version` and `main` in `component.json`.
This is so that you can maintain your [component](https://github.com/component/component) configuration in the
`component.json` file, and also easily make it available for Bower consumption.Note that this is probably only useful for projects where the following are true:
* You want your Bower package to be *githubUsername-githubRepo*.
* The `main` entry in your `component.json` should be the `main` entry of your `bower.json`.
* The `main` entry file is useful for inclusion in HTML with a simple `` tag.Typically this would be a AngularJS module, where the `main` entry file registers the AngularJS module.
See [image-url-for-angular](https://github.com/hugojosefson/image-url-for-angular) for an example of this setup.
## Installation
$ component install hugojosefson/update-bower-from-component
## Example usage in Makefile
This is from [image-url-for-angular](https://github.com/hugojosefson/image-url-for-angular)'s `Makefile`.
all: build bower.json
build: components index.js
@component build --devcomponents: component.json
@component install --devbower.json: components component.json
@node components/hugojosefson-update-bower-from-component/bin/update-bower-from-componentclean:
rm -fr build components.PHONY: clean components build
Required `development` dependency declaration in `component.json` for the above to work:
"development": {
"hugojosefson/update-bower-from-component": "0.1.0"
}## API
Updates or creates `bower.json` based on what's in `component.json`:
require("update-bower-from-component")();
## License
MIT