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
|
Line | |
---|
1 | 'use strict';
|
---|
2 |
|
---|
3 | var create = require('../index').create;
|
---|
4 | var addonCache = require('../addon/cache').addon;
|
---|
5 | var addonStable = require('../addon/stable').addon;
|
---|
6 | var addonNesting = require('../addon/nesting').addon;
|
---|
7 | var addonAtoms = require('../addon/atoms').addon;
|
---|
8 | var addonKeyframes = require('../addon/keyframes').addon;
|
---|
9 | var addonRule = require('../addon/rule').addon;
|
---|
10 | var addonSheet = require('../addon/sheet').addon;
|
---|
11 | var addonJsx = require('../addon/jsx').addon;
|
---|
12 | var addonSourcemaps = require('../addon/sourcemaps').addon;
|
---|
13 |
|
---|
14 | exports.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.