graph: Specify a technology for the dependency

node v10.24.1
version: 1.0.2
endpointsharetweet
const BemGraph = require('@bem/sdk.graph').BemGraph; const graph = new BemGraph(); graph.vertex({ block: 'a' }) .dependsOn({ block: 'b' }, 'js'); graph.vertex({ block: 'b' }, 'css') .dependsOn({ block: 'common-css' }); graph.vertex({ block: 'b' }, 'js') .dependsOn({ block: 'common-js' }); graph.dependenciesOf({ block: 'a'}); // => [ // { "entity": {"block": "common-js"}, "tech": "js"}, // { "entity": {"block": "b"}, "tech": "js"}, // { "entity": {"block": "a"}} // ]
Loading…

no comments

    sign in to comment