{"action":"created","issue":{"url":"https://api.github.com/repos/bem/bem-decl/issues/19","labels_url":"https://api.github.com/repos/bem/bem-decl/issues/19/labels{/name}","comments_url":"https://api.github.com/repos/bem/bem-decl/issues/19/comments","events_url":"https://api.github.com/repos/bem/bem-decl/issues/19/events","html_url":"https://github.com/bem/bem-decl/issues/19","id":66038978,"number":19,"title":"File List by Declaration","user":{"login":"blond","id":2225579,"avatar_url":"https://avatars.githubusercontent.com/u/2225579?v=3","gravatar_id":"","url":"https://api.github.com/users/blond","html_url":"https://github.com/blond","followers_url":"https://api.github.com/users/blond/followers","following_url":"https://api.github.com/users/blond/following{/other_user}","gists_url":"https://api.github.com/users/blond/gists{/gist_id}","starred_url":"https://api.github.com/users/blond/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blond/subscriptions","organizations_url":"https://api.github.com/users/blond/orgs","repos_url":"https://api.github.com/users/blond/repos","events_url":"https://api.github.com/users/blond/events{/privacy}","received_events_url":"https://api.github.com/users/blond/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/bem/bem-decl/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-04-03T00:18:30Z","updated_at":"2015-04-03T01:11:42Z","closed_at":null,"body":"**Methods:**\r\n\r\n* [ ] toFiles\r\n* [ ] toFilesSync\r\n\r\nThe method should get files by declaration.\r\n\r\n```\r\n.\r\n├── common.blocks/\r\n│   └── block/\r\n│       ├── block.css/\r\n│       └── block.js/\r\n└── bemconf.json\r\n```\r\n```js\r\nvar toFiles = require('bem-decl').toFilesSync,\r\n    decl = [\r\n        { block: 'block' }\r\n    ];\r\n\r\ntoFiles(decl); \r\n// [\r\n//     'common.blocks/block/block.css',\r\n//     'common.blocks/block/block.js'\r\n// ]\r\n```"},"comment":{"url":"https://api.github.com/repos/bem/bem-decl/issues/comments/89104068","html_url":"https://github.com/bem/bem-decl/issues/19#issuecomment-89104068","issue_url":"https://api.github.com/repos/bem/bem-decl/issues/19","id":89104068,"user":{"login":"blond","id":2225579,"avatar_url":"https://avatars.githubusercontent.com/u/2225579?v=3","gravatar_id":"","url":"https://api.github.com/users/blond","html_url":"https://github.com/blond","followers_url":"https://api.github.com/users/blond/followers","following_url":"https://api.github.com/users/blond/following{/other_user}","gists_url":"https://api.github.com/users/blond/gists{/gist_id}","starred_url":"https://api.github.com/users/blond/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blond/subscriptions","organizations_url":"https://api.github.com/users/blond/orgs","repos_url":"https://api.github.com/users/blond/repos","events_url":"https://api.github.com/users/blond/events{/privacy}","received_events_url":"https://api.github.com/users/blond/received_events","type":"User","site_admin":false},"created_at":"2015-04-03T01:11:42Z","updated_at":"2015-04-03T01:11:42Z","body":"> why it's a method of bem-decl\r\n\r\nthis method work with declaration\r\n\r\n> what's the difference from scaner/walker\r\n\r\nScanner talks about all the entities found in levels.\r\n\r\nThis method get only files from BEMDECL (translate BEMDECL to Array<File>).\r\n\r\n> how it knows about levels and levelSchema?\r\n\r\nIn this example, the information is taken from the `bemconf.json` file.\r\n\r\n> what are use cases for it\r\n\r\nWith the declaration to get a list of files for further processing."}}