source: imaps-frontend/node_modules/nano-css/preset/vdom.js

main
Last change on this file was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago

Update repo after prototype presentation

  • Property mode set to 100644
File size: 1.2 KB
RevLine 
[d565449]1'use strict';
2
3var create = require('../index').create;
4var addonCache = require('../addon/cache').addon;
5var addonStable = require('../addon/stable').addon;
6var addonNesting = require('../addon/nesting').addon;
7var addonAtoms = require('../addon/atoms').addon;
8var addonKeyframes = require('../addon/keyframes').addon;
9var addonRule = require('../addon/rule').addon;
10var addonSheet = require('../addon/sheet').addon;
11var addonJsx = require('../addon/jsx').addon;
12var addonSourcemaps = require('../addon/sourcemaps').addon;
13
14exports.preset = function (config) {
15 if (process.env.NODE_ENV !== 'production') {
16 if (!config || !(config instanceof Object) || !config.h) {
17 console.error(
18 'For "vdom" nano-css preset you have to provide virtual DOM ' +
19 'hyperscript function h. Such as: preset({h: require("react").createElement})'
20 );
21 }
22 }
23
24 var nano = create(config);
25
26 addonCache(nano);
27 addonStable(nano);
28 addonNesting(nano);
29 addonAtoms(nano);
30 addonKeyframes(nano);
31 addonRule(nano);
32 addonSheet(nano);
33 addonJsx(nano);
34
35 if (process.env.NODE_ENV !== 'production') {
36 addonSourcemaps(nano);
37 }
38
39 return nano;
40};
Note: See TracBrowser for help on using the repository browser.