git ssb

16+

Dominic / patchbay



Tree: 7478b5388306a177f85de2b6a0c3bcedf8635c87

Files: 7478b5388306a177f85de2b6a0c3bcedf8635c87 / modules_core / style / styles.js

794 bytesRaw
1var h = require('../../h')
2var compile = require('micro-css')
3var fs = require('fs')
4var Path = require('path')
5
6// TODO distribute these styles across all
7// the relevant modules, not as a core style.
8var coreStyle = fs.readFileSync(Path.join(__dirname, '../../style.css'))
9
10module.exports = {
11 needs: {
12 mcss: 'map',
13 css: 'map'
14 },
15 gives: {
16 mcss: true,
17 css: true,
18 styles: true
19 },
20 create: function (api) {
21 var styles = ''
22 process.nextTick(function () {
23 var mcss = api.mcss().join('\n')
24 var css = api.css().join('\n')
25 styles = coreStyle + compile(mcss) + css
26 })
27 return {
28 styles: function () { return styles },
29 // export empty styles
30 mcss: function () { return '' },
31 css: function () { return '' }
32 }
33 }
34}
35

Built with git-ssb-web