forked from tachyons-css/tachyons-modules
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
36 lines (32 loc) · 837 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
'use strict'
var isPresent = require('is-present')
var githubRepos = require('github-repositories')
var Promise = require('pinkie-promise')
var reposToIgnore = [
'tachyons',
'tachyons-cli',
'tachyons-docs',
'tachyons-cms',
'tachyons-modules',
'tachyons-css.github.io',
'tachyons-sass',
'tachyons-styles',
'tachyons-queries',
'tachyons-webpack',
'tachyons-build-css',
'tachyons-display-verbose',
'tachyons-verbose',
'react-native-style-tachyons'
]
module.exports = function tachyonsModules () {
return githubRepos('tachyons-css').then(function (repos) {
if (isPresent(repos)) {
return repos.filter(isCssModule)
} else {
return Promise.reject(new Error('No results found for tachyons-css'))
}
})
}
function isCssModule (repo) {
return reposToIgnore.indexOf(repo.name) === -1
}