1 | const utils = require('../utils.js');
|
2 | const fs =require('fs');
|
3 | let id = 1;
|
4 |
|
5 | module.exports = function(jsxPath){
|
6 | let jsxContent = fs.readFileSync(jsxPath, 'utf8');
|
7 | let componentName = 'Customer_Component_' + id++;
|
8 |
|
9 | return {
|
10 | data: utils.noox.add(componentName, jsxContent).data,
|
11 | render: (props) => utils.noox.render(componentName, props)
|
12 | }
|
13 | }
|
14 |
|