kn-cli 1.0.44 → 1.0.45
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 +3 -0
- package/src/utils/index.js +1 -1
- package/templates/template_admin/.gitignore +6 -0
- package/templates/template_admin/build.sh +2 -0
- package/templates/template_admin/cli.config.js +21 -0
- package/templates/template_admin/dev.sh +89 -0
- package/templates/template_admin/frontend_build.sh +83 -0
- package/templates/template_admin/init/prepare-commit-msg +5 -0
- package/templates/template_admin/init.sh +33 -0
- package/templates/template_admin/package.json +23 -0
- package/templates/template_admin/public/404.html +26 -0
- package/templates/template_admin/public/favicon.ico +0 -0
- package/templates/template_admin/public/favicon.png +0 -0
- package/templates/template_admin/public/index.html +43 -0
- package/templates/template_admin/public/src/_antd.less +4 -0
- package/templates/template_admin/public/src/_reset.less +128 -0
- package/templates/template_admin/public/src/_variable.less +80 -0
- package/templates/template_admin/public/src/assets/iconfont/iconfont.eot +0 -0
- package/templates/template_admin/public/src/assets/iconfont/iconfont.less +57 -0
- package/templates/template_admin/public/src/assets/iconfont/iconfont.svg +36 -0
- package/templates/template_admin/public/src/assets/iconfont/iconfont.ttf +0 -0
- package/templates/template_admin/public/src/assets/iconfont/iconfont.woff +0 -0
- package/templates/template_admin/public/src/assets/iconfont/iconfont.woff2 +0 -0
- package/templates/template_admin/public/src/assets/images/avatar.png +0 -0
- package/templates/template_admin/public/src/assets/images/loading.svg +40 -0
- package/templates/template_admin/public/src/components/Alert/index.jsx +0 -0
- package/templates/template_admin/public/src/components/Alert/index.less +0 -0
- package/templates/template_admin/public/src/components/Auth/index.jsx +44 -0
- package/templates/template_admin/public/src/components/Header/index.jsx +57 -0
- package/templates/template_admin/public/src/components/Header/index.less +57 -0
- package/templates/template_admin/public/src/components/IconFont/index.jsx +10 -0
- package/templates/template_admin/public/src/components/IconFont/index.less +5 -0
- package/templates/template_admin/public/src/components/Layout/Basic/index.jsx +26 -0
- package/templates/template_admin/public/src/components/Layout/Basic/index.less +37 -0
- package/templates/template_admin/public/src/components/Layout/CenterBody/index.jsx +15 -0
- package/templates/template_admin/public/src/components/Layout/CenterBody/index.less +30 -0
- package/templates/template_admin/public/src/components/Layout/Provider/index.jsx +12 -0
- package/templates/template_admin/public/src/components/Layout/index.jsx +27 -0
- package/templates/template_admin/public/src/components/Layout/index.less +63 -0
- package/templates/template_admin/public/src/components/Link/index.jsx +24 -0
- package/templates/template_admin/public/src/components/Link/index.less +11 -0
- package/templates/template_admin/public/src/components/Loading/index.jsx +14 -0
- package/templates/template_admin/public/src/components/Loading/index.less +85 -0
- package/templates/template_admin/public/src/components/Menu/index.jsx +126 -0
- package/templates/template_admin/public/src/components/Menu/index.less +19 -0
- package/templates/template_admin/public/src/components/Page/PageLoading/index.jsx +30 -0
- package/templates/template_admin/public/src/components/Page/PageLoading/index.less +29 -0
- package/templates/template_admin/public/src/components/Popup/index.jsx +22 -0
- package/templates/template_admin/public/src/components/Popup/index.less +18 -0
- package/templates/template_admin/public/src/components/Toast/index.jsx +60 -0
- package/templates/template_admin/public/src/components/Toast/index.less +43 -0
- package/templates/template_admin/public/src/components/TopMenu/index.jsx +228 -0
- package/templates/template_admin/public/src/components/TopMenu/index.less +105 -0
- package/templates/template_admin/public/src/components/mask/index.jsx +47 -0
- package/templates/template_admin/public/src/components/mask/index.less +32 -0
- package/templates/template_admin/public/src/dictionary/index.js +103 -0
- package/templates/template_admin/public/src/hooks/index.jsx +18 -0
- package/templates/template_admin/public/src/hooks/useDelay.jsx +29 -0
- package/templates/template_admin/public/src/hooks/useImageLoader.jsx +27 -0
- package/templates/template_admin/public/src/hooks/useLoading.jsx +42 -0
- package/templates/template_admin/public/src/hooks/useLogin.jsx +33 -0
- package/templates/template_admin/public/src/hooks/useNextPage.jsx +89 -0
- package/templates/template_admin/public/src/hooks/usePreload.jsx +66 -0
- package/templates/template_admin/public/src/hooks/useScrollTop.jsx +32 -0
- package/templates/template_admin/public/src/hooks/useSearch.jsx +137 -0
- package/templates/template_admin/public/src/hooks/useUpdate.jsx +11 -0
- package/templates/template_admin/public/src/index.jsx +50 -0
- package/templates/template_admin/public/src/mock/auth.js +91 -0
- package/templates/template_admin/public/src/mock/index.js +63 -0
- package/templates/template_admin/public/src/mock/user.js +70 -0
- package/templates/template_admin/public/src/mock/utils.js +33 -0
- package/templates/template_admin/public/src/pages/checkLogin/index.jsx +13 -0
- package/templates/template_admin/public/src/pages/index.jsx +23 -0
- package/templates/template_admin/public/src/pages/index.less +22 -0
- package/templates/template_admin/public/src/pages/login/index.jsx +27 -0
- package/templates/template_admin/public/src/pages/login/index.less +44 -0
- package/templates/template_admin/public/src/pages/material/index.jsx +12 -0
- package/templates/template_admin/public/src/pages/order/index.jsx +12 -0
- package/templates/template_admin/public/src/pages/permission/index.jsx +12 -0
- package/templates/template_admin/public/src/pages/subHome/index.jsx +12 -0
- package/templates/template_admin/public/src/pages/subHome2/index.jsx +12 -0
- package/templates/template_admin/public/src/pages/subHome3/index.jsx +12 -0
- package/templates/template_admin/public/src/pages/suggest/index.jsx +12 -0
- package/templates/template_admin/public/src/pages/superAdminLogin/index.jsx +57 -0
- package/templates/template_admin/public/src/pages/superAdminLogin/index.less +44 -0
- package/templates/template_admin/public/src/pages/user/index.jsx +13 -0
- package/templates/template_admin/public/src/pages/userData/index.jsx +12 -0
- package/templates/template_admin/public/src/pages/video/index.jsx +12 -0
- package/templates/template_admin/public/src/provider/app.jsx +119 -0
- package/templates/template_admin/public/src/provider/menu.jsx +20 -0
- package/templates/template_admin/public/src/route.jsx +77 -0
- package/templates/template_admin/public/src/services/auth.js +28 -0
- package/templates/template_admin/public/src/services/index.js +181 -0
- package/templates/template_admin/public/src/services/user.js +26 -0
- package/templates/template_admin/public/src/utils/index.js +38 -0
- package/templates/template_admin/public/static/about.html +1 -0
- package/templates/template_admin/public/static/kssoLogin.html +22 -0
- package/templates/template_admin/readme.md +55 -0
- package/templates/template_admin/report.sh +68 -0
- package/templates/template_admin/tools/iconfont/gulpfile.js +70 -0
- package/templates/template_admin/tools/iconfont/package.json +20 -0
- package/templates/template_admin/tools/iconfont/run.sh +39 -0
- package/templates/template_admin/tools/iconfont/svg/arrowBack.svg +1 -0
- package/templates/template_admin/tools/iconfont/svg/check.svg +1 -0
- package/templates/template_admin/tools/iconfont/svg/close.svg +1 -0
- package/templates/template_admin/tools/iconfont/svg/down.svg +1 -0
- package/templates/template_admin/tools/iconfont/svg/image.svg +1 -0
- package/templates/template_admin/tools/iconfont/svg/play.svg +1 -0
- package/templates/template_admin/tools/iconfont/svg/refresh.svg +1 -0
- package/templates/template_admin/tools/iconfont/svg/warn.svg +1 -0
- package/templates/template_admin/tools/iconfont/templates/_icons.css +26 -0
- package/templates/template_admin/tools/iconfont/templates/_icons.less +29 -0
- package/templates/template_admin/tools/iconfont/templates/index.html +56 -0
- package/templates/template_admin/tools/tinypng/package.json +11 -0
- package/templates/template_admin/tools/tinypng/run.sh +15 -0
- package/templates/template_admin/webpack.api.js +33 -0
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
var gulp = require('gulp');
|
|
2
|
+
const $ = require('gulp-load-plugins')();
|
|
3
|
+
var fs=require('fs');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
var srcPath ='.'
|
|
7
|
+
|
|
8
|
+
/*****************************************
|
|
9
|
+
* svg转iconfont 替代iconfont.com的方案
|
|
10
|
+
*****************************************/
|
|
11
|
+
function clean_iconfont(cb){
|
|
12
|
+
return gulp.src(`${srcPath}/dist`,{read:false,allowEmpty:true})
|
|
13
|
+
.pipe($.clean());
|
|
14
|
+
}
|
|
15
|
+
function iconfontLess(cb){
|
|
16
|
+
var fontName = 'iconfont';
|
|
17
|
+
return gulp.src(`${srcPath}/svg/*.svg`)
|
|
18
|
+
.pipe($.iconfontCss({
|
|
19
|
+
fontName: fontName,
|
|
20
|
+
path: `${srcPath}/templates/_icons.less`,
|
|
21
|
+
targetPath: 'iconfont.less',
|
|
22
|
+
fontPath: '~@/assets/iconfont/'
|
|
23
|
+
}))
|
|
24
|
+
.pipe($.iconfont({
|
|
25
|
+
fontName: fontName,
|
|
26
|
+
formats: ['svg', 'ttf', 'eot', 'woff', 'woff2'],
|
|
27
|
+
normalize: true
|
|
28
|
+
}))
|
|
29
|
+
.pipe(gulp.dest(`${srcPath}/dist/less/`));
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function iconfontCss(cb){
|
|
33
|
+
var fontName = 'iconfont';
|
|
34
|
+
return gulp.src(`${srcPath}/svg/*.svg`)
|
|
35
|
+
.pipe($.iconfontCss({
|
|
36
|
+
fontName: fontName,
|
|
37
|
+
path: `${srcPath}/templates/_icons.css`,
|
|
38
|
+
targetPath: 'iconfont.css',
|
|
39
|
+
fontPath: `${srcPath}/`
|
|
40
|
+
}))
|
|
41
|
+
.pipe($.iconfont({
|
|
42
|
+
fontName: fontName,
|
|
43
|
+
formats: ['svg', 'ttf', 'eot', 'woff', 'woff2'],
|
|
44
|
+
normalize: true
|
|
45
|
+
}))
|
|
46
|
+
.pipe(gulp.dest(`${srcPath}/dist/css/`));
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
function iconfontExample(cb){
|
|
51
|
+
|
|
52
|
+
var files = fs.readdirSync(`${srcPath}/svg/`);
|
|
53
|
+
|
|
54
|
+
let icons=[]
|
|
55
|
+
files.forEach(function(file){
|
|
56
|
+
console.log(file);
|
|
57
|
+
if(/\.svg$/.test(file)){
|
|
58
|
+
icons.push(file.replace(/\.\w+$/, ''))
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
return gulp.src(`${srcPath}/templates/index.html`)
|
|
63
|
+
.pipe($.template({icons: icons}))
|
|
64
|
+
.pipe(gulp.dest(`${srcPath}/dist/css/`));
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
exports.iconfont = gulp.series(clean_iconfont,iconfontLess,iconfontCss,iconfontExample);
|
|
69
|
+
// exports.iconfontCss = gulp.series(clean_iconfont,iconfontCss,iconfontExample);
|
|
70
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "iconfont",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"main": "index.js",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"node": "10.15.0",
|
|
7
|
+
"dependencies": {
|
|
8
|
+
"colors": "^1.4.0",
|
|
9
|
+
"gulp": "^4.0.2",
|
|
10
|
+
"gulp-load-plugins": "^2.0.1",
|
|
11
|
+
"gulp-clean": "^0.4.0",
|
|
12
|
+
"gulp-iconfont": "^11.0.1",
|
|
13
|
+
"gulp-iconfont-css": "^3.0.0",
|
|
14
|
+
"gulp-template": "^5.0.0",
|
|
15
|
+
"lazypipe": "^1.0.2",
|
|
16
|
+
"svgfont2svgicons": "^2.0.0",
|
|
17
|
+
"svgicons2svgfont": "^12.0.0"
|
|
18
|
+
},
|
|
19
|
+
"devDependencies": {}
|
|
20
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
if [ -d "${HOME}/.nvm/" ]
|
|
2
|
+
then
|
|
3
|
+
. ${HOME}/.nvm/nvm.sh
|
|
4
|
+
fi
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
checkNode(){
|
|
8
|
+
for line in `node -v`
|
|
9
|
+
do
|
|
10
|
+
if [ $line != "v10.15.0" ]
|
|
11
|
+
then
|
|
12
|
+
nvm use v10.15.0
|
|
13
|
+
ret=$?
|
|
14
|
+
if [ $ret != 0 ]
|
|
15
|
+
then
|
|
16
|
+
echo -e "\033[41;37m Change Node to v10.15.0 (try nvm use v10.15.0)\033[0m"
|
|
17
|
+
return 0
|
|
18
|
+
else
|
|
19
|
+
return 1
|
|
20
|
+
fi
|
|
21
|
+
else
|
|
22
|
+
return 1
|
|
23
|
+
fi
|
|
24
|
+
done
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
run(){
|
|
29
|
+
npm i
|
|
30
|
+
node_modules/.bin/gulp iconfont
|
|
31
|
+
echo '生成完毕,请前往 dist 查看结果'
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
checkNode
|
|
35
|
+
ret=$?
|
|
36
|
+
if [ $ret = 1 ]
|
|
37
|
+
then
|
|
38
|
+
run
|
|
39
|
+
fi
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1655695159864" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="7044" xmlns:xlink="http://www.w3.org/1999/xlink" width="128" height="128"><defs><style type="text/css"></style></defs><path d="M319.64 512.016l336.016-336.008 45.248 45.248L364.896 557.28z" p-id="7045"></path><path d="M365.216 466.464l339.976 339.968-45.256 45.256-339.976-339.976z" p-id="7046"></path></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="128px" height="128.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#2c2c2c" d="M411.062857 698.514286c16.164571 22.674286 49.883429 22.674286 66.121143 0l269.604571-373.76a10.24 10.24 0 0 0-8.338285-16.310857h-60.050286a40.740571 40.740571 0 0 0-33.133714 17.042285l-201.142857 279.04-91.062858-126.464a40.96 40.96 0 0 0-33.206857-16.969143h-59.977143a10.24 10.24 0 0 0-8.338285 16.237715l159.451428 221.184z" /><path fill="#2c2c2c" d="M983.04 0H40.96A40.96 40.96 0 0 0 0 40.96v942.08c0 22.674286 18.285714 40.96 40.96 40.96h942.08c22.674286 0 40.96-18.285714 40.96-40.96V40.96a40.96 40.96 0 0 0-40.96-40.96z m-51.2 931.84H92.16V92.16h839.68v839.68z" /></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="128px" height="128.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#2c2c2c" d="M596.52729 512.000427L1020.889603 20.56617c7.082661-8.191993 1.109332-20.565316-9.898659-20.565317h-129.023892a26.709311 26.709311 0 0 0-19.88265 8.959993L512.04736 414.293841 161.924985 8.960846A26.197312 26.197312 0 0 0 142.042335 0.000853H13.018443c-11.093324 0-17.066652 12.373323-9.898659 20.565317L427.652764 512.000427 3.119784 1003.434684c-7.082661 8.191993-1.109332 20.565316 9.898659 20.565316h129.023892c7.679994 0 14.847988-3.327997 19.88265-8.959993L512.04736 609.707012l350.122375 405.332995a26.197312 26.197312 0 0 0 19.88265 8.959993h129.023892c11.093324 0 17.066652-12.373323 9.898659-20.565316L596.441956 512.000427z" /></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="128px" height="85.39px" viewBox="0 0 1535 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#2c2c2c" d="M1519.737123 0H1368.198572c-10.239091 0-19.966228 5.119546-26.109682 13.18283L767.931846 796.345324 193.774802 13.18283A32.509115 32.509115 0 0 0 167.793108 0H16.254557C3.071727 0-4.607591 14.846682 3.071727 25.341751L715.456503 997.543468a64.890241 64.890241 0 0 0 104.56672 0L1532.663976 25.341751a15.870591 15.870591 0 0 0-12.798864-25.341751z" /></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="128px" height="96.02px" viewBox="0 0 1365 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#2c2c2c" d="M1316.578377 0.011093H48.638906A47.614929 47.614929 0 0 0 0 46.516713v930.96572c0 25.684755 21.75951 46.50562 48.724237 46.505621H1316.663708a47.614929 47.614929 0 0 0 48.724237-46.505621V46.516713A47.614929 47.614929 0 0 0 1316.578377 0.011093z m-61.011961 919.275316H109.736198v-58.025361l211.024585-239.013289 228.688188 258.895509 355.831994-402.593609 350.285451 396.535078v44.201672z m0-188.838417l-340.984327-386.039315a12.458386 12.458386 0 0 0-18.602249 0L549.534302 736.591853l-219.472395-248.314413a12.458386 12.458386 0 0 0-18.602248 0L109.736198 716.624303v-611.826234h1145.830218V730.447992z" /><path fill="#2c2c2c" d="M365.730438 430.508074c74.067667 0 134.05565-57.257378 134.05565-127.99712 0-70.65441-59.987984-127.99712-134.05565-127.997121s-134.140982 57.34271-134.140982 127.997121c0 70.739742 60.073315 127.99712 134.140982 127.99712z m0-168.700205c23.636802 0 42.665707 18.175591 42.665706 40.703085a41.64173 41.64173 0 0 1-42.665706 40.788415 41.64173 41.64173 0 0 1-42.665707-40.788415c0-22.527493 19.028905-40.703084 42.665707-40.703085z" /></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="128px" height="128.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#2c2c2c" d="M422.765714 723.968l255.268572-200.557714c7.314286-5.778286 7.314286-16.822857 0-22.674286L422.765714 300.032a14.482286 14.482286 0 0 0-23.405714 11.264v401.261714c0 12.068571 13.897143 18.797714 23.405714 11.410286z" /><path fill="#2c2c2c" d="M983.04 0H40.96A40.96 40.96 0 0 0 0 40.96v942.08c0 22.674286 18.285714 40.96 40.96 40.96h942.08c22.674286 0 40.96-18.285714 40.96-40.96V40.96a40.96 40.96 0 0 0-40.96-40.96z m-51.2 931.84H92.16V92.16h839.68v839.68z" /></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1656403559957" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2942" xmlns:xlink="http://www.w3.org/1999/xlink" width="128" height="128"><defs><style type="text/css"></style></defs><path d="M684.032 403.456q-17.408-8.192-15.872-22.016t11.776-22.016q3.072-2.048 19.968-15.872t41.472-33.28q-43.008-49.152-102.4-77.312t-129.024-28.16q-64.512 0-120.832 24.064t-98.304 66.048-66.048 98.304-24.064 120.832q0 63.488 24.064 119.808t66.048 98.304 98.304 66.048 120.832 24.064q53.248 0 100.864-16.896t87.04-47.616 67.584-72.192 41.472-90.624q7.168-23.552 26.624-38.912t46.08-15.36q31.744 0 53.76 22.528t22.016 53.248q0 14.336-5.12 27.648-21.504 71.68-63.488 132.096t-99.84 103.936-128.512 68.096-148.48 24.576q-95.232 0-179.2-35.84t-145.92-98.304-98.304-145.92-36.352-178.688 36.352-179.2 98.304-145.92 145.92-98.304 179.2-36.352q105.472 0 195.584 43.52t153.6 118.272q23.552-17.408 39.424-30.208t19.968-15.872q6.144-5.12 13.312-7.68t13.312 0 10.752 10.752 6.656 24.576q1.024 9.216 2.048 31.232t2.048 51.2 1.024 60.416-1.024 58.88q-1.024 34.816-16.384 50.176-8.192 8.192-24.576 9.216t-34.816-3.072q-27.648-6.144-60.928-13.312t-63.488-14.848-53.248-14.336-29.184-9.728z" p-id="2943"></path></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1656311332811" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2256" xmlns:xlink="http://www.w3.org/1999/xlink" width="128" height="128"><defs><style type="text/css"></style></defs><path d="M512 0a512 512 0 1 0 512 512A512 512 0 0 0 512 0z m0 819.2a51.2 51.2 0 1 1 51.2-51.2 51.2 51.2 0 0 1-51.2 51.2z m51.2-153.6H460.8V204.8h102.4z" p-id="2257"></path></svg>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
@font-face {
|
|
2
|
+
font-family: "<%= fontName %>";
|
|
3
|
+
src: url('<%= fontPath %><%= fontName %>.eot');
|
|
4
|
+
src: url('<%= fontPath %><%= fontName %>.eot?#iefix') format('eot'),
|
|
5
|
+
url('<%= fontPath %><%= fontName %>.woff') format('woff'),
|
|
6
|
+
url('<%= fontPath %><%= fontName %>.ttf') format('truetype'),
|
|
7
|
+
url('<%= fontPath %><%= fontName %>.svg#<%= fontName %>') format('svg');
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.iconfont:before {
|
|
11
|
+
font-family: "<%= fontName %>";
|
|
12
|
+
-webkit-font-smoothing: antialiased;
|
|
13
|
+
-moz-osx-font-smoothing: grayscale;
|
|
14
|
+
font-style: normal;
|
|
15
|
+
font-variant: normal;
|
|
16
|
+
font-weight: normal;
|
|
17
|
+
/* speak: none; only necessary if not using the private unicode range (firstGlyph option) */
|
|
18
|
+
text-decoration: none;
|
|
19
|
+
text-transform: none;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
<% _.each(glyphs, function(glyph) { %>
|
|
23
|
+
.icon-<%= glyph.fileName %>:before {
|
|
24
|
+
content: "\<%= glyph.codePoint %>";
|
|
25
|
+
}
|
|
26
|
+
<% }); %>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
:global{
|
|
2
|
+
@font-face {
|
|
3
|
+
font-family: "<%= fontName %>";
|
|
4
|
+
src: url('<%= fontPath %><%= fontName %>.eot');
|
|
5
|
+
src: url('<%= fontPath %><%= fontName %>.eot?#iefix') format('eot'),
|
|
6
|
+
url('<%= fontPath %><%= fontName %>.woff') format('woff'),
|
|
7
|
+
url('<%= fontPath %><%= fontName %>.ttf') format('truetype'),
|
|
8
|
+
url('<%= fontPath %><%= fontName %>.svg#<%= fontName %>') format('svg');
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.iconfont:before {
|
|
12
|
+
font-family: "<%= fontName %>";
|
|
13
|
+
-webkit-font-smoothing: antialiased;
|
|
14
|
+
-moz-osx-font-smoothing: grayscale;
|
|
15
|
+
font-style: normal;
|
|
16
|
+
font-variant: normal;
|
|
17
|
+
font-weight: normal;
|
|
18
|
+
/* speak: none; only necessary if not using the private unicode range (firstGlyph option) */
|
|
19
|
+
text-decoration: none;
|
|
20
|
+
text-transform: none;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
<% _.each(glyphs, function(glyph) { %>
|
|
24
|
+
.icon-<%= glyph.fileName %>:before {
|
|
25
|
+
content: "\<%= glyph.codePoint %>";
|
|
26
|
+
}
|
|
27
|
+
<% }); %>
|
|
28
|
+
|
|
29
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
|
|
4
|
+
<head>
|
|
5
|
+
<meta charset="UTF-8">
|
|
6
|
+
<title>icon font test</title>
|
|
7
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
8
|
+
<link rel="stylesheet" href="./iconfont.css">
|
|
9
|
+
<style>
|
|
10
|
+
.icon_lists{
|
|
11
|
+
display: flex;
|
|
12
|
+
flex-wrap: wrap;
|
|
13
|
+
}
|
|
14
|
+
.icon_lists li{
|
|
15
|
+
/* float:left; */
|
|
16
|
+
/* display: flex; */
|
|
17
|
+
min-width: 100px;
|
|
18
|
+
height:150px;
|
|
19
|
+
text-align: center;
|
|
20
|
+
list-style: none;
|
|
21
|
+
}
|
|
22
|
+
.icon_lists .iconfont{
|
|
23
|
+
font-size: 42px;
|
|
24
|
+
margin: 10px;
|
|
25
|
+
color:#333;
|
|
26
|
+
-webkit-transition: font-size 0.25s ease-out 0s;
|
|
27
|
+
-moz-transition: font-size 0.25s ease-out 0s;
|
|
28
|
+
transition: font-size 0.25s ease-out 0s;
|
|
29
|
+
|
|
30
|
+
}
|
|
31
|
+
.icon_lists .iconfont:hover{
|
|
32
|
+
font-size: 100px;
|
|
33
|
+
}
|
|
34
|
+
.name {
|
|
35
|
+
font-size: 16px;
|
|
36
|
+
}
|
|
37
|
+
</style>
|
|
38
|
+
</head>
|
|
39
|
+
|
|
40
|
+
<body>
|
|
41
|
+
<h2>Icon Font</h2>
|
|
42
|
+
<ul class="icon_lists clear">
|
|
43
|
+
<% _.each(icons, function(icon,idx) { %>
|
|
44
|
+
<li class="iconfont icon-<%= icon %>">
|
|
45
|
+
<div class="name"><%= idx%>:<%= icon%></div>
|
|
46
|
+
</li>
|
|
47
|
+
<% }); %>
|
|
48
|
+
</ul>
|
|
49
|
+
<div>
|
|
50
|
+
<h2>使用方法</h2>
|
|
51
|
+
<pre>
|
|
52
|
+
<span class="iconfont icon-iconName>"></span>
|
|
53
|
+
</pre>
|
|
54
|
+
</div>
|
|
55
|
+
</body>
|
|
56
|
+
</html>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
if [ -d "${HOME}/.nvm/" ]
|
|
2
|
+
then
|
|
3
|
+
. ${HOME}/.nvm/nvm.sh
|
|
4
|
+
fi
|
|
5
|
+
|
|
6
|
+
echo "开始压缩 ./img/ 下的所有png图片"
|
|
7
|
+
|
|
8
|
+
nvm use v10.15.0
|
|
9
|
+
npm config delete registry -g
|
|
10
|
+
npm config delete registry
|
|
11
|
+
npm i
|
|
12
|
+
cd img
|
|
13
|
+
../node_modules/.bin/super-tinypng
|
|
14
|
+
|
|
15
|
+
echo "压缩完毕"
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
const configs = {
|
|
2
|
+
// 本地研发环境(npm start)
|
|
3
|
+
localdebug: {
|
|
4
|
+
API_HOST: '/api',
|
|
5
|
+
},
|
|
6
|
+
// cicd构建时研发环境
|
|
7
|
+
dev: {
|
|
8
|
+
API_HOST: 'http://dev-drama-admin-api.skitoon.com',
|
|
9
|
+
},
|
|
10
|
+
// cicd构建时生产环境
|
|
11
|
+
prod: {
|
|
12
|
+
API_HOST: 'http://dev-drama-admin-api.skitoon.com',
|
|
13
|
+
},
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
const API_PROXY= {
|
|
17
|
+
'/api/**': {
|
|
18
|
+
target: 'http://dev-drama-admin-api.skitoon.com',
|
|
19
|
+
changeOrigin: true,
|
|
20
|
+
logLevel: 'debug',
|
|
21
|
+
pathRewrite: {
|
|
22
|
+
'^/api': '/', // rewrite path
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
const env = process.env.build_env||'localdebug';
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
module.exports = {
|
|
31
|
+
API_HOSTS:configs[env],
|
|
32
|
+
API_PROXY
|
|
33
|
+
};
|