neo-cmp-cli 1.2.7 → 1.2.8

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "neo-cmp-cli",
3
- "version": "1.2.7",
3
+ "version": "1.2.8",
4
4
  "description": "前端脚手架:自定义组件开发工具,支持react 和 vue2.0技术栈。",
5
5
  "keywords": [
6
6
  "neo-cli",
@@ -18,16 +18,6 @@ const getCmpPreview = (cmpsDir, cmpName) => {
18
18
  process.exit(1);
19
19
  }
20
20
 
21
- if (!fs.existsSync(cpmModelDir)) {
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
- `;
29
- }
30
-
31
21
  return `
32
22
  import * as React from 'react';
33
23
  import ReactDOM from 'react-dom';
@@ -39,9 +29,6 @@ const curDefaultComProps = new CustomCmpModel().defaultComProps;
39
29
  const previewComProps = new CustomCmpModel().previewComProps;
40
30
  const curPreviewComProps = Object.assign(curDefaultComProps, previewComProps);
41
31
 
42
- /* 引入公共的静态资源 */
43
- import '$public/css/base.css';
44
-
45
32
  // 预览 自定义组件
46
33
  ReactDOM.render(
47
34
  <CustomCmp {...curPreviewComProps} />,