kn-cli 1.0.64 → 1.0.66
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 +2 -1
- package/readme.md +6 -0
- package/src/create.js +2 -0
- package/templates/template_admin/public/src/mock/index.js +0 -2
- package/templates/template_app/public/src/mock/index.js +0 -2
- package/templates/template_oa/public/src/components/IFrame/index.jsx +3 -0
- package/templates/template_oa/public/src/mock/index.js +0 -2
- package/templates/template_oa/webpack.api.js +7 -3
- package/templates/template_oa_jwt/build.sh +7 -0
- package/templates/template_oa_jwt/cli.config.js +30 -0
- package/templates/template_oa_jwt/dev.sh +89 -0
- package/templates/template_oa_jwt/frontend_build.sh +88 -0
- package/templates/template_oa_jwt/init/prepare-commit-msg +5 -0
- package/templates/template_oa_jwt/init.sh +33 -0
- package/templates/template_oa_jwt/jsconfig.json +10 -0
- package/templates/template_oa_jwt/package.json +25 -0
- package/templates/template_oa_jwt/public/404.html +26 -0
- package/templates/template_oa_jwt/public/favicon.ico +0 -0
- package/templates/template_oa_jwt/public/index.html +44 -0
- package/templates/template_oa_jwt/public/src/_antd.less +216 -0
- package/templates/template_oa_jwt/public/src/_reset.less +134 -0
- package/templates/template_oa_jwt/public/src/_variable.less +84 -0
- package/templates/template_oa_jwt/public/src/assets/iconfont/iconfont.eot +0 -0
- package/templates/template_oa_jwt/public/src/assets/iconfont/iconfont.less +57 -0
- package/templates/template_oa_jwt/public/src/assets/iconfont/iconfont.svg +36 -0
- package/templates/template_oa_jwt/public/src/assets/iconfont/iconfont.ttf +0 -0
- package/templates/template_oa_jwt/public/src/assets/iconfont/iconfont.woff +0 -0
- package/templates/template_oa_jwt/public/src/assets/iconfont/iconfont.woff2 +0 -0
- package/templates/template_oa_jwt/public/src/assets/images/NY-pop-bg.png +0 -0
- package/templates/template_oa_jwt/public/src/assets/images/avatar.png +0 -0
- package/templates/template_oa_jwt/public/src/assets/images/loading.svg +40 -0
- package/templates/template_oa_jwt/public/src/components/Alert/index.jsx +0 -0
- package/templates/template_oa_jwt/public/src/components/Alert/index.less +0 -0
- package/templates/template_oa_jwt/public/src/components/Auth/index.jsx +44 -0
- package/templates/template_oa_jwt/public/src/components/Dialog/index.jsx +150 -0
- package/templates/template_oa_jwt/public/src/components/Dialog/index.less +123 -0
- package/templates/template_oa_jwt/public/src/components/Empty/index.jsx +23 -0
- package/templates/template_oa_jwt/public/src/components/Empty/index.less +6 -0
- package/templates/template_oa_jwt/public/src/components/Footer/index.jsx +17 -0
- package/templates/template_oa_jwt/public/src/components/Footer/index.less +28 -0
- package/templates/template_oa_jwt/public/src/components/FormRow/index.jsx +39 -0
- package/templates/template_oa_jwt/public/src/components/FormRow/index.less +67 -0
- package/templates/template_oa_jwt/public/src/components/FormTable/index.jsx +137 -0
- package/templates/template_oa_jwt/public/src/components/FormTable/index.less +18 -0
- package/templates/template_oa_jwt/public/src/components/IFrame/index.jsx +44 -0
- package/templates/template_oa_jwt/public/src/components/IFrame/index.less +4 -0
- package/templates/template_oa_jwt/public/src/components/IconFont/index.jsx +10 -0
- package/templates/template_oa_jwt/public/src/components/IconFont/index.less +5 -0
- package/templates/template_oa_jwt/public/src/components/Layout/Basic/index.jsx +52 -0
- package/templates/template_oa_jwt/public/src/components/Layout/Basic/index.less +82 -0
- package/templates/template_oa_jwt/public/src/components/Layout/CenterBody/index.jsx +15 -0
- package/templates/template_oa_jwt/public/src/components/Layout/CenterBody/index.less +36 -0
- package/templates/template_oa_jwt/public/src/components/Layout/FormBlock/index.jsx +23 -0
- package/templates/template_oa_jwt/public/src/components/Layout/FormBlock/index.less +37 -0
- package/templates/template_oa_jwt/public/src/components/Layout/Provider/index.jsx +12 -0
- package/templates/template_oa_jwt/public/src/components/Layout/index.jsx +27 -0
- package/templates/template_oa_jwt/public/src/components/Layout/index.less +8 -0
- package/templates/template_oa_jwt/public/src/components/Link/index.jsx +24 -0
- package/templates/template_oa_jwt/public/src/components/Link/index.less +11 -0
- package/templates/template_oa_jwt/public/src/components/Loading/index.jsx +16 -0
- package/templates/template_oa_jwt/public/src/components/Loading/index.less +96 -0
- package/templates/template_oa_jwt/public/src/components/Nav/index.jsx +184 -0
- package/templates/template_oa_jwt/public/src/components/Nav/index.less +38 -0
- package/templates/template_oa_jwt/public/src/components/Page/PageLoading/index.jsx +30 -0
- package/templates/template_oa_jwt/public/src/components/Page/PageLoading/index.less +29 -0
- package/templates/template_oa_jwt/public/src/components/Popup/index.jsx +22 -0
- package/templates/template_oa_jwt/public/src/components/Popup/index.less +18 -0
- package/templates/template_oa_jwt/public/src/components/Select/DepSelect/index.jsx +47 -0
- package/templates/template_oa_jwt/public/src/components/Select/StaffSelect/index.jsx +97 -0
- package/templates/template_oa_jwt/public/src/components/Select/StaffSelect/index.less +24 -0
- package/templates/template_oa_jwt/public/src/components/Toast/index.jsx +60 -0
- package/templates/template_oa_jwt/public/src/components/Toast/index.less +43 -0
- package/templates/template_oa_jwt/public/src/components/Upload/index.jsx +358 -0
- package/templates/template_oa_jwt/public/src/components/title/index.jsx +12 -0
- package/templates/template_oa_jwt/public/src/components/title/index.less +21 -0
- package/templates/template_oa_jwt/public/src/dictionary/index.js +20 -0
- package/templates/template_oa_jwt/public/src/hooks/index.jsx +21 -0
- package/templates/template_oa_jwt/public/src/hooks/useDelay.jsx +29 -0
- package/templates/template_oa_jwt/public/src/hooks/useImageLoader.jsx +27 -0
- package/templates/template_oa_jwt/public/src/hooks/useLoading.jsx +42 -0
- package/templates/template_oa_jwt/public/src/hooks/useLogin.jsx +33 -0
- package/templates/template_oa_jwt/public/src/hooks/usePreload.jsx +66 -0
- package/templates/template_oa_jwt/public/src/hooks/useScrollTop.jsx +32 -0
- package/templates/template_oa_jwt/public/src/hooks/useSearch.jsx +137 -0
- package/templates/template_oa_jwt/public/src/hooks/useUpdate.jsx +11 -0
- package/templates/template_oa_jwt/public/src/index.jsx +50 -0
- package/templates/template_oa_jwt/public/src/mock/common.js +484 -0
- package/templates/template_oa_jwt/public/src/mock/index.js +61 -0
- package/templates/template_oa_jwt/public/src/mock/user.js +70 -0
- package/templates/template_oa_jwt/public/src/mock/utils.js +33 -0
- package/templates/template_oa_jwt/public/src/pages/components/pageTitle/index.jsx +13 -0
- package/templates/template_oa_jwt/public/src/pages/components/pageTitle/index.less +20 -0
- package/templates/template_oa_jwt/public/src/pages/components/totalRecord/index.jsx +21 -0
- package/templates/template_oa_jwt/public/src/pages/components/totalRecord/index.less +16 -0
- package/templates/template_oa_jwt/public/src/pages/demo/detail/index.jsx +14 -0
- package/templates/template_oa_jwt/public/src/pages/demo/index.jsx +399 -0
- package/templates/template_oa_jwt/public/src/pages/demo/index.less +15 -0
- package/templates/template_oa_jwt/public/src/pages/login/index.jsx +29 -0
- package/templates/template_oa_jwt/public/src/pages/login/index.less +44 -0
- package/templates/template_oa_jwt/public/src/pages/redirect/index.jsx +31 -0
- package/templates/template_oa_jwt/public/src/provider/app.jsx +66 -0
- package/templates/template_oa_jwt/public/src/route.jsx +45 -0
- package/templates/template_oa_jwt/public/src/services/common.js +133 -0
- package/templates/template_oa_jwt/public/src/services/demo.js +41 -0
- package/templates/template_oa_jwt/public/src/services/index.js +266 -0
- package/templates/template_oa_jwt/public/src/services/token.js +132 -0
- package/templates/template_oa_jwt/public/src/utils/index.js +115 -0
- package/templates/template_oa_jwt/public/static/about.html +1 -0
- package/templates/template_oa_jwt/public/static/kssoLogin.html +22 -0
- package/templates/template_oa_jwt/public/static/noAuth.html +217 -0
- package/templates/template_oa_jwt/public/static/noAuth.png +0 -0
- package/templates/template_oa_jwt/readme.md +71 -0
- package/templates/template_oa_jwt/report.sh +68 -0
- package/templates/template_oa_jwt/tools/iconfont/gulpfile.js +70 -0
- package/templates/template_oa_jwt/tools/iconfont/package.json +20 -0
- package/templates/template_oa_jwt/tools/iconfont/run.sh +39 -0
- package/templates/template_oa_jwt/tools/iconfont/svg/arrowBack.svg +1 -0
- package/templates/template_oa_jwt/tools/iconfont/svg/check.svg +1 -0
- package/templates/template_oa_jwt/tools/iconfont/svg/close.svg +1 -0
- package/templates/template_oa_jwt/tools/iconfont/svg/down.svg +1 -0
- package/templates/template_oa_jwt/tools/iconfont/svg/image.svg +1 -0
- package/templates/template_oa_jwt/tools/iconfont/svg/play.svg +1 -0
- package/templates/template_oa_jwt/tools/iconfont/svg/refresh.svg +1 -0
- package/templates/template_oa_jwt/tools/iconfont/svg/warn.svg +1 -0
- package/templates/template_oa_jwt/tools/iconfont/templates/_icons.css +26 -0
- package/templates/template_oa_jwt/tools/iconfont/templates/_icons.less +29 -0
- package/templates/template_oa_jwt/tools/iconfont/templates/index.html +56 -0
- package/templates/template_oa_jwt/tools/tinypng/package.json +11 -0
- package/templates/template_oa_jwt/tools/tinypng/run.sh +15 -0
- package/templates/template_oa_jwt/versionPublish.sh +27 -0
- package/templates/template_oa_jwt/webpack.api.js +61 -0
- package/templates/template_offcial/public/src/mock/index.js +0 -2
- package/templates/template_admin/.gitignore +0 -6
- package/templates/template_app/.gitignore +0 -6
- package/templates/template_oa/.gitignore +0 -6
- package/templates/template_offcial/.gitignore +0 -6
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
|
|
2
|
+
checkResult(){
|
|
3
|
+
ret=$?
|
|
4
|
+
if [ $ret != 0 ]
|
|
5
|
+
then
|
|
6
|
+
echo "[$1]执行失败"
|
|
7
|
+
exit 2
|
|
8
|
+
return 0
|
|
9
|
+
else
|
|
10
|
+
echo "[$1]执行成功"
|
|
11
|
+
return 0
|
|
12
|
+
fi
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
# version=$(grep -m1 '"version":' package.json | awk -F'"' '{print $4}')
|
|
16
|
+
# checkResult "获取当前版本号"
|
|
17
|
+
|
|
18
|
+
read -p "版本发布备注:" message
|
|
19
|
+
npm version patch -m "[%s]version publish:$message"
|
|
20
|
+
checkResult "版本号升级"
|
|
21
|
+
git push
|
|
22
|
+
checkResult "git push"
|
|
23
|
+
|
|
24
|
+
git push origin --tags
|
|
25
|
+
checkResult "git push tags"
|
|
26
|
+
|
|
27
|
+
echo "版本Tag标记完毕"
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
const configs = {
|
|
2
|
+
// 本地研发环境(npm start)
|
|
3
|
+
localdebug: {
|
|
4
|
+
API_HOST: '/api',
|
|
5
|
+
KSSO_HOST: '/oAuth',
|
|
6
|
+
OA_HOST: '/oaApi',
|
|
7
|
+
OA_MENU_HOST:'//192.168.90.250:8020/oa-menu/?mock=1',
|
|
8
|
+
OA_KSSO_HOST:'http://192.168.90.250:8886/ksso/auto_redirect',
|
|
9
|
+
},
|
|
10
|
+
// cicd构建时研发环境
|
|
11
|
+
dev: {
|
|
12
|
+
API_HOST: 'http://192.168.90.250:8540/api/v1',
|
|
13
|
+
KSSO_HOST: 'http://192.168.90.250:8540',
|
|
14
|
+
OA_HOST: 'http://192.168.90.250:8886',
|
|
15
|
+
OA_MENU_HOST:'//192.168.90.250:8020/oa-menu/',
|
|
16
|
+
OA_KSSO_HOST:'http://192.168.90.250:8886/ksso/auto_redirect',
|
|
17
|
+
},
|
|
18
|
+
// cicd构建时生产环境
|
|
19
|
+
prod: {
|
|
20
|
+
API_HOST: '//case-api.kingnet.com/api/v1',
|
|
21
|
+
KSSO_HOST: '//case-api.kingnet.com',
|
|
22
|
+
OA_HOST: 'https://oa.kingnet.com',
|
|
23
|
+
OA_MENU_HOST:'//micro-front.kingnet.com/oa-menu/',
|
|
24
|
+
OA_KSSO_HOST:'https://oa.kingnet.com/ksso/auto_redirect',
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
const API_PROXY= {
|
|
29
|
+
'/api/**': {
|
|
30
|
+
target: 'http://192.168.90.250:8540/api/v1/',
|
|
31
|
+
changeOrigin: true,
|
|
32
|
+
logLevel: 'debug',
|
|
33
|
+
pathRewrite: {
|
|
34
|
+
'^/api': '/', // rewrite path
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
'/oAuth/**': {
|
|
38
|
+
target: 'http://192.168.90.250:8540/',
|
|
39
|
+
changeOrigin: true,
|
|
40
|
+
logLevel: 'debug',
|
|
41
|
+
pathRewrite: {
|
|
42
|
+
'^/oAuth': '/', // rewrite path
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
'/oaApi/**': {
|
|
46
|
+
target: 'http://192.168.90.250:8886/',
|
|
47
|
+
changeOrigin: true,
|
|
48
|
+
logLevel: 'debug',
|
|
49
|
+
pathRewrite: {
|
|
50
|
+
'^/oaApi': '/', // rewrite path
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
const env = process.env.build_env||'localdebug';
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
module.exports = {
|
|
59
|
+
API_HOSTS:configs[env],
|
|
60
|
+
API_PROXY
|
|
61
|
+
};
|