Files: 64e6e544f024c42315d1103b3b6735dfb4a20f84 / plugs / styles / mcss.js
712 bytesRaw
1 | const path = require('path') |
2 | // const { basename } = path |
3 | const readDirectory = require('read-directory') |
4 | const { each } = require('libnested') |
5 | const nest = require('depnest') |
6 | const getMaramaMCSS = require('marama/lib/get-mcss') |
7 | |
8 | const contents = readDirectory.sync(path.join(__dirname, '../..'), { |
9 | extensions: false, |
10 | filter: '**/*.mcss', |
11 | ignore: '**/node_modules/**' |
12 | }) |
13 | |
14 | exports.gives = nest('styles.mcss') |
15 | |
16 | exports.create = function (api) { |
17 | return nest('styles.mcss', mcss) |
18 | |
19 | function mcss (sofar = {}) { |
20 | sofar.marama = getMaramaMCSS() |
21 | |
22 | each(contents, (content, [filename]) => { |
23 | // const name = basename(filename) |
24 | sofar[`scry-${filename}`] = content |
25 | }) |
26 | |
27 | return sofar |
28 | } |
29 | } |
30 |
Built with git-ssb-web