Files: 55335207126eb15c3a0f1834ffb8bbcbd32658a8 / styles / mcss.js
653 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 | |
7 | const contents = readDirectory.sync(path.join(__dirname, '..'), { |
8 | extensions: false, |
9 | filter: '**/*.mcss', |
10 | ignore: ['**/node_modules/**', 'dist/**'] |
11 | }) |
12 | |
13 | exports.gives = nest('styles.mcss') |
14 | |
15 | exports.create = function (api) { |
16 | return nest('styles.mcss', mcss) |
17 | |
18 | function mcss (sofar = {}) { |
19 | each(contents, (content, [filename]) => { |
20 | // const name = basename(filename) |
21 | // sofar[name] = content |
22 | sofar[filename] = content |
23 | }) |
24 | return sofar |
25 | } |
26 | } |
27 |
Built with git-ssb-web