git ssb

3+

arj / patchbook



Tree: 6082c91df5aa7de144ad3c569dd3028c3782ed38

Files: 6082c91df5aa7de144ad3c569dd3028c3782ed38 / styles / mcss.js

616 bytesRaw
1const path = require('path')
2const { basename } = path
3const readDirectory = require('read-directory')
4const { each } = require('libnested')
5const nest = require('depnest')
6
7const contents = readDirectory.sync(path.join(__dirname, '..'), {
8 extensions: false,
9 filter: '**/*.mcss',
10 ignore: '**/node_modules/**'
11})
12
13exports.gives = nest('styles.mcss')
14
15exports.create = function (api) {
16 return nest('styles.mcss', mcss)
17
18 function mcss (sofar = {}) {
19 each(contents, (content, [filename]) => {
20 const name = 'patch-book-' + basename(filename)
21 sofar[name] = content
22 })
23 return sofar
24 }
25}
26
27

Built with git-ssb-web