git ssb

16+

Dominic / patchbay



Tree: a48b8e932c4ae4ce8ffaf7d73f6a8ab26057700c

Files: a48b8e932c4ae4ce8ffaf7d73f6a8ab26057700c / modules_core / style / styles.js

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

Built with git-ssb-web