forked from carrot/plugin-directory
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.js
More file actions
37 lines (33 loc) · 1.05 KB
/
app.js
File metadata and controls
37 lines (33 loc) · 1.05 KB
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
37
const htmlStandards = require('reshape-standard')
const cssStandards = require('spike-css-standards')
const jsStandards = require('spike-js-standards')
const Records = require('spike-records')
const name = 'spike'
const locals = {
title: `${name[0].toUpperCase() + name.slice(1)} Plugin Directory`,
githubUrl: `https://github.com/static-dev/${name}`,
gitterUrl: `https://gitter.im/static-dev/${name}`,
documentationUrl: `https://webpack.github.io/docs/plugins.html`
}
const pluginBlacklist = [name, `${name}-core`]
module.exports = {
matchers: { html: '**/*.sgr', css: '**/*.sss' },
ignore: ['**/layout.sgr', '**/_*', '**/.*'],
reshape: htmlStandards({ locals }),
postcss: cssStandards(),
babel: jsStandards(),
plugins: [
new Records({
addDataTo: locals,
plugins: {
url:
`https://api.npms.io/v2/search?q=keywords:${name}plugin&size=100`,
transform: (res) => {
return res.results.filter((p) => {
return pluginBlacklist.indexOf(p.package.name) < 0
})
}
}
})
]
}