Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/azproduction/gitmodules-bower
.gitmodules to bower.json translator
https://github.com/azproduction/gitmodules-bower
Last synced: 22 days ago
JSON representation
.gitmodules to bower.json translator
- Host: GitHub
- URL: https://github.com/azproduction/gitmodules-bower
- Owner: azproduction
- License: mit
- Created: 2014-02-04T15:06:51.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2014-02-04T15:12:20.000Z (almost 11 years ago)
- Last Synced: 2024-04-15T12:20:57.799Z (7 months ago)
- Language: JavaScript
- Homepage: http://azproduction.github.io/gitmodules-bower/
- Size: 137 KB
- Stars: 5
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# gitmodules-bower
[![NPM Version](https://badge.fury.io/js/gitmodules-bower.png)]
(https://npmjs.org/package/gitmodules-bower)Translates .gitmodules into bower.json
## Installation
`gitmodules-bower` can be installed using `npm`:
```
npm install gitmodules-bower
```## Example
```js
var bowerify = require('gitmodules-bower'),
fs = require('fs');var gitmodules = fs.readFileSync('./.gitmodules', 'utf8'),
bowerrc = JSON.parse(fs.readFileSync('./.bowerrc', 'utf8')),
bowerJson = bowerify(gitmodules, bowerrc);fs.writeFileSync('./bower.json', JSON.stringify(bowerJson, null, 4));
```Where .gitmodules
```ini
[submodule "static/bem-bl"]
path = static/bem-bl
url = git://github.com/bem/bem-bl.git
branch = 0.3
[submodule "static/bem-bl-bh"]
path = static/bem-bl-bh
url = git://github.com/bem/bem-bl-bh.git
branch = master
[submodule "static/services-bh"]
path = static/services-bh
url = git://github.com/bem/services-bh.git```
Where .bowerrc
```js
{
"directory": "static"
}
```Result bower.json
```js
{
dependencies: {
'static/bem-bl': 'git://github.com/bem/bem-bl.git#0.3',
'static/bem-bl-bh': 'git://github.com/bem/bem-bl-bh.git#master',
'static/services-bh': 'git://github.com/bem/services-bh.git'
}
}
```