neo-cmp-cli 1.8.8 → 1.8.9

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.8.8",
3
+ "version": "1.8.9",
4
4
  "description": "Neo 自定义组件开发工具,支持react 和 vue2.0技术栈。",
5
5
  "keywords": [
6
6
  "neo-cli",
@@ -0,0 +1,13 @@
1
+ <html lang="en">
2
+ <head>
3
+ <meta charset="UTF-8">
4
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
5
+ <meta name="format-detection" content="telephone=no"/>
6
+ <meta name="viewport" content="initial-scale=1.0,user-scalable=no,width=device-width,viewport-fit=cover">
7
+ <meta http-equiv="X-UA-Compatible" content="ie=edge">
8
+ <title>自定义组件预览页</title>
9
+ </head>
10
+ <body>
11
+ <div id="root"></div>
12
+ </body>
13
+ </html>
@@ -0,0 +1,138 @@
1
+ 'use strict';
2
+ const path = require('path');
3
+
4
+ // 统一路径解析
5
+ function resolve(dir) {
6
+ return path.resolve(__dirname, dir);
7
+ }
8
+
9
+ // 包括生产和开发的环境配置信息
10
+ module.exports = {
11
+ settings: {
12
+ enableESLint: true, // 调试模式是否开启ESLint,默认开启ESLint检测代码格式
13
+ enableESLintFix: true, // 是否自动修正代码格式,默认不自动修正
14
+ enableStyleLint: false, // 是否开启StyleLint,默认开启ESLint检测代码格式
15
+ enableStyleLintFix: false // 是否需要StyleLint自动修正代码格式
16
+ },
17
+ webpack: {
18
+ target: ['web', 'es5'], // 指定目标环境为 web 和 es5,确保兼容性
19
+ resolve: {
20
+ // webpack的resolve配置
21
+ extensions: ['.js', '.jsx', '.ts', '.tsx', '.umd.js', '.min.js', '.json'], // 用于配置webpack在尝试过程中用到的后缀列表
22
+ alias: {
23
+ '@': resolve('src'),
24
+ $assets: resolve('src/assets'),
25
+ $public: resolve('public')
26
+ }
27
+ },
28
+ // sassResources 中的 sass 文件会自动注入项目中每一个 sass 文件中
29
+ sassResources: [
30
+ resolve('./src/assets/css/common.scss'),
31
+ resolve('./src/assets/css/mixin.scss')
32
+ ],
33
+ // createDeclaration: true, // 打包时是否创建ts声明文件
34
+ ignoreNodeModules: false // 打包时是否忽略 node_modules
35
+ // allowList: [], // ignoreNodeModules 为 true 时生效
36
+ // projectDir: ['src'],
37
+ // template: resolve('./public/template.html'), // 自定义html模板
38
+ // plugins: [],
39
+ // babelPlugins: [],
40
+ },
41
+ // 用于添加 Neo 共享依赖模块的配置信息
42
+ /*
43
+ neoCommonModule: {
44
+ // exports: ['xxModule'], // 数组写法,用于导出当前自定义组件中的第三方依赖模块
45
+ exports: { // 对象写法,可用于导出自定义组件中的某个内容模块(需要使用绝对路径导出)
46
+ 'xxModule': path.resolve('./src/components/xxModule'), // 导出 xx组件 或 xx模块
47
+ },
48
+ // remoteDeps: ['xxCmpType'], // 远程依赖组件,表示当前自定义组件会用到的依赖组件,需要和 externals 配合使用
49
+ // externals: ['xxModule'], // 自定义组件中需要剔除的模块,仅支持数组写法
50
+ },
51
+ */
52
+ preview: {
53
+ // 用于开启本地预览模式的相关配置信息
54
+ /*
55
+ 【特别说明】以下配置项都自带默认值,非必填。如需自定义请自行配置。
56
+ entry: { // 根据 src/components 目录下的文件自动生成 entry 相关配置
57
+ // 本地预览自定义组件内容
58
+ index: './src/preview.jsx',
59
+ },
60
+ NODE_ENV: 'development',
61
+ port: 80, // 设置基础端口,如果被占用则自动寻找可用端口
62
+ assetsPublicPath: '/', // 设置静态资源的引用路径(根域名+路径)
63
+ assetsSubDirectory: '',
64
+ hostname: 'localhost',
65
+ proxyTable: {
66
+ '/apiTest': {
67
+ target: 'http://api-test.com.cn', // 不支持跨域的接口根地址
68
+ ws: true,
69
+ changeOrigin: true,
70
+ },
71
+ },
72
+ */
73
+ },
74
+ linkDebug: {
75
+ // 用于开启本地调试模式的相关配置信息
76
+ /*
77
+ 【特别说明】以下配置项都自带默认值,非必填。如需自定义请自行配置。
78
+ entry: { // 根据 src/components 目录下的文件自动生成 entry 相关配置
79
+ // 外链调试(在线上页面设计器端预览自定义组件)
80
+ index: [
81
+ './src/components/xxCmp/register.ts',
82
+ './src/components/xxCmp/model.ts',
83
+ ],
84
+ },
85
+ NODE_ENV: 'development',
86
+ port: 80, // 设置基础端口,如果被占用则自动寻找可用端口
87
+ closeHotReload: true, // 是否关闭热更新
88
+ assetsPublicPath: '/', // 设置静态资源的引用路径(根域名+路径)
89
+ assetsSubDirectory: '',
90
+ hostname: 'localhost',
91
+ proxyTable: {
92
+ '/apiTest': {
93
+ target: 'http://api-test.com.cn', // 不支持跨域的接口根地址
94
+ ws: true,
95
+ changeOrigin: true,
96
+ },
97
+ }
98
+ */
99
+ },
100
+ // 授权码授权模式下的 NeoCRM 平台配置
101
+ neoConfig: {
102
+ authType: 'oauth2', // 授权类型,可选值:oauth2(默认)、password
103
+ neoBaseURL: 'https://crm-cd.xiaoshouyi.com', // 平台根地址(默认:https://crm.xiaoshouyi.com)
104
+ // 当 authType 为 oauth2 时,loginURL 配置项必填
105
+ loginURL: 'https://login-cd.xiaoshouyi.com/auc/oauth2/auth', // 登录授权 URL(默认:https://login.xiaoshouyi.com/auc/oauth2/auth)
106
+ tokenAPI: 'https://login-cd.xiaoshouyi.com/auc/oauth2/token' // Token 获取接口地址(默认:https://login.xiaoshouyi.com/auc/oauth2/token)
107
+ },
108
+ /*
109
+ // 密码授权模式下的 NeoCRM 平台配置
110
+ neoConfig: {
111
+ authType: 'password', // 授权类型,可选值:oauth2(默认)、password
112
+ neoBaseURL: 'https://crm-cd.xiaoshouyi.com', // 平台根地址(默认:https://crm.xiaoshouyi.com)
113
+ tokenAPI: 'https://login-cd.xiaoshouyi.com/auc/oauth2/token', // Token 获取接口地址(默认:https://login.xiaoshouyi.com/auc/oauth2/token)
114
+ // 当 authType 为 password 时,auth 配置项必填
115
+ auth: {
116
+ client_id: auth.client_id || 'xx', // 客户端 ID,从创建连接器的客户端信息中获取(Client_Id)
117
+ client_secret: auth.client_secret || 'xxx', // 客户端秘钥,从创建连接器的客户端信息中获取(Client_Secret)
118
+ username: auth.username || 'xx', // 用户在销售易系统中的用户名
119
+ // password 为 用户在销售易系统中的账号密码加上 8 位安全令牌。
120
+ // 例如,用户密码为 123456,安全令牌为 ABCDEFGH,则 password 的值应为 123456ABCDEFGH。
121
+ password: auth.password || 'xx xx', // 用户账户密码 + 8 位安全令牌
122
+ },
123
+ },
124
+ */
125
+ pushCmp: {
126
+ // 用于构建并发布至 NeoCRM 的相关配置
127
+ /*
128
+ 【特别说明】以下配置项都自带默认值,非必填。如需自定义请自行配置。
129
+ NODE_ENV: 'production',
130
+ entry: { // 根据 src/components 目录下的文件自动生成 entry 相关配置
131
+ InfoCardModel: './src/components/xxCmp/model.ts',
132
+ infoCard: './src/components/xxCmp/register.ts'
133
+ },
134
+ cssExtract: false, // 不额外提取css文件
135
+ assetsRoot: resolve('dist') // 上传指定目录下的脚本文件
136
+ */
137
+ }
138
+ };
@@ -1,7 +1,7 @@
1
1
  const { execSync } = require('child_process');
2
2
 
3
3
  // 所有需要废弃的版本
4
- const versionsToDeprecate = ["1.8.6-beta.1", "1.8.6-beta.2", "1.8.6-beta.3", "1.8.6-beta.5", "1.8.6-beta.6"];
4
+ const versionsToDeprecate = ["1.8.6", "1.8.7", "1.8.8"];
5
5
 
6
6
  const packageName = 'neo-cmp-cli';
7
7
  const deprecateMessage = '此版本为开发中版本(存在 bug),请升级到最新版本。';