UNPKG

358 BJavaScriptView Raw
1const utils = require('../utils.js');
2const fs =require('fs');
3let id = 1;
4
5module.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