Files: 3d3edbbfdd8ca30c4cc7695192b3883fb399ab26 / app / sync / initialise / styles.js
452 bytesRaw
1 | const nest = require('depnest') |
2 | const insertCss = require('insert-css') |
3 | |
4 | exports.gives = nest('app.sync.initialise') |
5 | |
6 | exports.needs = nest({ |
7 | 'styles.css': 'reduce', |
8 | }) |
9 | |
10 | |
11 | exports.create = function (api) { |
12 | return nest('app.sync.initialise', styles) |
13 | |
14 | function styles () { |
15 | const css = values(api.styles.css()).join('\n') |
16 | insertCss(css) |
17 | } |
18 | } |
19 | |
20 | function values (object) { |
21 | const keys = Object.keys(object) |
22 | return keys.map(k => object[k]) |
23 | } |
24 | |
25 |
Built with git-ssb-web