Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/qfox/gather-reverse-deps
https://github.com/qfox/gather-reverse-deps
bem deps depsjs reverse topological-sort toposort
Last synced: 23 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/qfox/gather-reverse-deps
- Owner: qfox
- Created: 2017-01-25T00:33:45.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-02-08T20:05:49.000Z (over 7 years ago)
- Last Synced: 2024-04-09T15:37:34.918Z (7 months ago)
- Topics: bem, deps, depsjs, reverse, topological-sort, toposort
- Language: JavaScript
- Size: 102 KB
- Stars: 10
- Watchers: 1
- Forks: 2
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# gather-reverse-deps
BEM related reverse dependencies resolver
[![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)
## Table of Contents
- [Install](#install)
- [Usage](#usage)
- [Contribute](#contribute)
- [License](#license)## Background
## Install
```sh
npm i -g gather-reverse-deps
```## Usage
```sh
$ gather-reverse-deps button *.blocks libs/islands/*.blocks
attach
services-table_type_turkish
m-editor-popup_type_file
i-splendid
m-editor
m-editor-popup_type_picture
m-head-action
... etc
``````js
const gatherDeps = require('gather-reverse-deps');gatherDeps.invoke({}, {
entities: 'button',
levels: [
'/Users/qfox/repos/islands/common.blocks',
'/Users/qfox/repos/islands/deskpad.blocks',
'/Users/qfox/repos/islands/desktop.blocks',
'/Users/qfox/repos/islands/touch-pad.blocks',
'/Users/qfox/repos/islands/touch-phone.blocks',
'/Users/qfox/repos/islands/touch.blocks'
]
})
.then(console.log);
// [ { entity: { block: 'attach' } },
// { entity: { block: 'services-table', mod: [Object] } },
// { entity: { block: 'm-editor-popup', mod: [Object] } },
// { entity: { block: 'i-splendid' } },
// { entity: { block: 'm-editor' } },
// { entity: { block: 'm-editor-popup', mod: [Object] } },
// { entity: { block: 'm-head-action' } },
// { entity: { block: 'm-head' } },
// { entity: { block: 'm-head-menu' } },
// ... etc
```## Contribute
Feel free to open an issue or file a PR.
## License
MIT © 2016 Alexey Yaroshevich