Files: c0bb55d9b169c5943cb5dfabbd5a58a241a238af / app / mcss / render.js
564 bytesRaw
1 | const compile = require('micro-css') |
2 | const fs = require('fs') |
3 | const Path = require('path') |
4 | |
5 | module.exports = { |
6 | gives: { |
7 | mcss: true, |
8 | css: true, |
9 | styles: true |
10 | }, |
11 | needs: { |
12 | mcss: 'map', |
13 | css: 'map' |
14 | }, |
15 | create: function (api) { |
16 | var styles = '' |
17 | process.nextTick(function () { |
18 | const mcss = api.mcss().join('\n') |
19 | const css = api.css().join('\n') |
20 | styles = coreStyle + compile(mcss) + css |
21 | }) |
22 | |
23 | return { |
24 | styles: () => styles, |
25 | // export empty styles |
26 | mcss: () => '', |
27 | css: () => '' |
28 | } |
29 | } |
30 | } |
31 |
Built with git-ssb-web