neo-cmp-cli 1.2.5 → 1.2.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/bin/neo.js ADDED
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ require('../src/module/index');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "neo-cmp-cli",
3
- "version": "1.2.5",
3
+ "version": "1.2.7",
4
4
  "description": "前端脚手架:自定义组件开发工具,支持react 和 vue2.0技术栈。",
5
5
  "keywords": [
6
6
  "neo-cli",
@@ -11,7 +11,6 @@ const getCmpPreview = (cmpsDir, cmpName) => {
11
11
  const cpmDir = resolveToCurrentRoot(`${cmpsDir}/${cmpName}`);
12
12
  const cpmModelDir = resolveToCurrentRoot(`${cmpsDir}/${cmpName}/model`);
13
13
 
14
- /*
15
14
  if (!fs.existsSync(cpmDir)) {
16
15
  console.error(`未找到 ${cmpName} 组件入口文件,请检查 ${cpmDir} 是否存在。`);
17
16
 
@@ -20,12 +19,14 @@ const getCmpPreview = (cmpsDir, cmpName) => {
20
19
  }
21
20
 
22
21
  if (!fs.existsSync(cpmModelDir)) {
23
- console.error(`未找到 ${cmpName} 组件模型文件,请检查 ${cpmModelDir} 是否存在。`);
24
-
25
- // 退出进程
26
- process.exit(1);
22
+ return `
23
+ import * as React from 'react';
24
+ import ReactDOM from 'react-dom';
25
+ import CustomCmp from '${cpmDir}';
26
+ import '$public/css/base.css';
27
+ ReactDOM.render(<CustomCmp />, document.getElementById('root'),);
28
+ `;
27
29
  }
28
- */
29
30
 
30
31
  return `
31
32
  import * as React from 'react';
@@ -114,8 +114,6 @@ export default class ContactForm extends React.PureComponent<
114
114
  });
115
115
  }
116
116
 
117
- console.log('提交联系人数据:', submitData);
118
-
119
117
  // 调用 API 提交数据
120
118
  const response: any = await createXObject('customContact__c', {
121
119
  method: 'POST',
@@ -123,8 +121,6 @@ export default class ContactForm extends React.PureComponent<
123
121
  });
124
122
 
125
123
  if (response && response.code === '200') {
126
- console.log('联系人创建成功:', response.data);
127
-
128
124
  message.success('联系人创建成功!');
129
125
  // 成功后重置表单
130
126
  setTimeout(() => {
@@ -650,8 +650,6 @@ export default class XObjectTable extends React.PureComponent<
650
650
  const systemInfo = curAmisData.__NeoSystemInfo || {};
651
651
  const columns = this.generateColumns();
652
652
 
653
- console.log('xobject-table-container:', this, this.props);
654
-
655
653
  return (
656
654
  <div className="xobject-table-container">
657
655
  <Card>