kn-cli 1.0.67 → 1.0.69
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/build/webpack.config.js +6 -3
- package/package.json +1 -1
- package/readme.md +19 -1
- package/src/cli.js +8 -0
- package/src/getTools.js +56 -0
- package/src/utils/parseArgumentsIntoOptions.js +2 -0
- package/templates/template_admin/.gitignore +6 -0
- package/templates/template_admin/readme.md +14 -2
- package/templates/template_app/.gitignore +6 -0
- package/templates/template_app/readme.md +3 -0
- package/templates/template_oa/.gitignore +6 -0
- package/templates/template_oa/readme.md +6 -0
- package/templates/template_oa_jwt/.gitignore +6 -0
- package/templates/template_oa_jwt/readme.md +7 -0
- package/templates/template_offcial/.gitignore +6 -0
- package/templates/template_offcial/readme.md +7 -0
- package/templates/template_admin/tools/iconfont/gulpfile.js +0 -70
- package/templates/template_admin/tools/iconfont/package.json +0 -20
- package/templates/template_admin/tools/iconfont/run.sh +0 -39
- package/templates/template_admin/tools/iconfont/svg/arrowBack.svg +0 -1
- package/templates/template_admin/tools/iconfont/svg/check.svg +0 -1
- package/templates/template_admin/tools/iconfont/svg/close.svg +0 -1
- package/templates/template_admin/tools/iconfont/svg/down.svg +0 -1
- package/templates/template_admin/tools/iconfont/svg/image.svg +0 -1
- package/templates/template_admin/tools/iconfont/svg/play.svg +0 -1
- package/templates/template_admin/tools/iconfont/svg/refresh.svg +0 -1
- package/templates/template_admin/tools/iconfont/svg/warn.svg +0 -1
- package/templates/template_admin/tools/iconfont/templates/_icons.css +0 -26
- package/templates/template_admin/tools/iconfont/templates/_icons.less +0 -29
- package/templates/template_admin/tools/iconfont/templates/index.html +0 -56
- package/templates/template_admin/tools/tinypng/package.json +0 -11
- package/templates/template_admin/tools/tinypng/run.sh +0 -15
- package/templates/template_app/tools/iconfont/gulpfile.js +0 -70
- package/templates/template_app/tools/iconfont/package.json +0 -20
- package/templates/template_app/tools/iconfont/run.sh +0 -39
- package/templates/template_app/tools/iconfont/svg/arrowBack.svg +0 -1
- package/templates/template_app/tools/iconfont/svg/check.svg +0 -1
- package/templates/template_app/tools/iconfont/svg/close.svg +0 -1
- package/templates/template_app/tools/iconfont/svg/down.svg +0 -1
- package/templates/template_app/tools/iconfont/svg/image.svg +0 -1
- package/templates/template_app/tools/iconfont/svg/play.svg +0 -1
- package/templates/template_app/tools/iconfont/svg/refresh.svg +0 -1
- package/templates/template_app/tools/iconfont/svg/warn.svg +0 -1
- package/templates/template_app/tools/iconfont/templates/_icons.css +0 -26
- package/templates/template_app/tools/iconfont/templates/_icons.less +0 -29
- package/templates/template_app/tools/iconfont/templates/index.html +0 -56
- package/templates/template_app/tools/tinypng/package.json +0 -11
- package/templates/template_app/tools/tinypng/run.sh +0 -15
- package/templates/template_oa/tools/iconfont/gulpfile.js +0 -70
- package/templates/template_oa/tools/iconfont/package.json +0 -20
- package/templates/template_oa/tools/iconfont/run.sh +0 -39
- package/templates/template_oa/tools/iconfont/svg/arrowBack.svg +0 -1
- package/templates/template_oa/tools/iconfont/svg/check.svg +0 -1
- package/templates/template_oa/tools/iconfont/svg/close.svg +0 -1
- package/templates/template_oa/tools/iconfont/svg/down.svg +0 -1
- package/templates/template_oa/tools/iconfont/svg/image.svg +0 -1
- package/templates/template_oa/tools/iconfont/svg/play.svg +0 -1
- package/templates/template_oa/tools/iconfont/svg/refresh.svg +0 -1
- package/templates/template_oa/tools/iconfont/svg/warn.svg +0 -1
- package/templates/template_oa/tools/iconfont/templates/_icons.css +0 -26
- package/templates/template_oa/tools/iconfont/templates/_icons.less +0 -29
- package/templates/template_oa/tools/iconfont/templates/index.html +0 -56
- package/templates/template_oa/tools/tinypng/package.json +0 -11
- package/templates/template_oa/tools/tinypng/run.sh +0 -15
- package/templates/template_offcial/tools/iconfont/gulpfile.js +0 -70
- package/templates/template_offcial/tools/iconfont/package.json +0 -20
- package/templates/template_offcial/tools/iconfont/run.sh +0 -39
- package/templates/template_offcial/tools/iconfont/svg/arrowBack.svg +0 -1
- package/templates/template_offcial/tools/iconfont/svg/check.svg +0 -1
- package/templates/template_offcial/tools/iconfont/svg/close.svg +0 -1
- package/templates/template_offcial/tools/iconfont/svg/down.svg +0 -1
- package/templates/template_offcial/tools/iconfont/svg/image.svg +0 -1
- package/templates/template_offcial/tools/iconfont/svg/play.svg +0 -1
- package/templates/template_offcial/tools/iconfont/svg/refresh.svg +0 -1
- package/templates/template_offcial/tools/iconfont/svg/warn.svg +0 -1
- package/templates/template_offcial/tools/iconfont/templates/_icons.css +0 -26
- package/templates/template_offcial/tools/iconfont/templates/_icons.less +0 -29
- package/templates/template_offcial/tools/iconfont/templates/index.html +0 -56
- package/templates/template_offcial/tools/tinypng/package.json +0 -11
- package/templates/template_offcial/tools/tinypng/run.sh +0 -15
package/build/webpack.config.js
CHANGED
|
@@ -360,12 +360,15 @@ const plugins= [
|
|
|
360
360
|
PM_TYPE: JSON.stringify(process.env.pm_type),
|
|
361
361
|
APP_VERSION:JSON.stringify(appVersion)
|
|
362
362
|
}),
|
|
363
|
-
|
|
363
|
+
|
|
364
|
+
];
|
|
365
|
+
if(devMode){
|
|
366
|
+
plugins.push(new webpack.SourceMapDevToolPlugin({
|
|
364
367
|
filename: 'sourcemap/[file].map',
|
|
365
368
|
// publicPath: '..',//resource_path_relative,
|
|
366
369
|
// fileContext: 'js',
|
|
367
|
-
})
|
|
368
|
-
|
|
370
|
+
}))
|
|
371
|
+
}
|
|
369
372
|
|
|
370
373
|
|
|
371
374
|
if(indexHtml){
|
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -22,6 +22,8 @@
|
|
|
22
22
|
|
|
23
23
|
# cli 其它常用方法
|
|
24
24
|
1. 查看版本号: `kn-cli -v`
|
|
25
|
+
2. 创建辅助工具:`kn-cli --tool`
|
|
26
|
+
目前辅助工具有:图片压缩、word转html、iconfont
|
|
25
27
|
|
|
26
28
|
|
|
27
29
|
# cli.config.js - 构建配置文件
|
|
@@ -80,9 +82,25 @@ module.exports = {
|
|
|
80
82
|
};
|
|
81
83
|
```
|
|
82
84
|
|
|
85
|
+
|
|
86
|
+
# 常见问题
|
|
87
|
+
* 调试模式下,localhost可以访问,本地ip访问不了?
|
|
88
|
+
修改`cli.config.js`将devServer的host设置为0.0.0.0
|
|
89
|
+
```
|
|
90
|
+
devServer:{host:'0.0.0.0'}
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
|
|
83
94
|
# 更新日志
|
|
95
|
+
* 1.0.69
|
|
96
|
+
默认生产环境不输出sourcemap
|
|
97
|
+
|
|
98
|
+
* 1.0.68
|
|
99
|
+
1. 更新readme
|
|
100
|
+
2. 增加`kn-cli --tool`功能,用来创建需要的辅助工具
|
|
101
|
+
|
|
84
102
|
* 1.0.67
|
|
85
|
-
变更各模板内的tinypng
|
|
103
|
+
变更各模板内的tinypng工具,从super-tinypng改为super-tinypng-pro
|
|
86
104
|
|
|
87
105
|
* 1.0.66
|
|
88
106
|
各模板内mock/index.js内的错误代码修正
|
package/src/cli.js
CHANGED
|
@@ -4,6 +4,8 @@ const pjson = require("../package.json");
|
|
|
4
4
|
const chalk = require("chalk");
|
|
5
5
|
const createProject = require("./create");
|
|
6
6
|
const build = require('./build');
|
|
7
|
+
const getTool = require("./getTools");
|
|
8
|
+
|
|
7
9
|
// const path= require("path");
|
|
8
10
|
// const ROOT=path.resolve(__dirname,"../");
|
|
9
11
|
// import pjson from "../package.json";
|
|
@@ -49,6 +51,12 @@ module.exports=async (args)=> {
|
|
|
49
51
|
process.exit(2);
|
|
50
52
|
}
|
|
51
53
|
return 1;
|
|
54
|
+
}else if(get(options,"tool")){
|
|
55
|
+
const req = await getTool(options);
|
|
56
|
+
if(!req){
|
|
57
|
+
process.exit(2);
|
|
58
|
+
}
|
|
59
|
+
return 1;
|
|
52
60
|
}
|
|
53
61
|
|
|
54
62
|
}
|
package/src/getTools.js
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
|
|
2
|
+
const chalk= require("chalk");
|
|
3
|
+
const path= require( "path");
|
|
4
|
+
const {Listr} = require('listr2');
|
|
5
|
+
const {TaskNodeVersion,copyDir}= require('./utils');
|
|
6
|
+
const inquirer = require('inquirer');
|
|
7
|
+
const ROOT=path.resolve(__dirname,"../");
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* 创建工具
|
|
11
|
+
* 1. 让用户选择需要哪类个工具
|
|
12
|
+
* 2. 将tools/对应工具模板 复制到当前用户执行命令的文件夹下
|
|
13
|
+
*/
|
|
14
|
+
module.exports=async ()=> {
|
|
15
|
+
const sourceDir = process.cwd();
|
|
16
|
+
const templatesDir = path.resolve(ROOT,"tools");
|
|
17
|
+
let templateName='';
|
|
18
|
+
const answer = await inquirer.prompt([
|
|
19
|
+
{
|
|
20
|
+
name:'type',
|
|
21
|
+
type:'list',
|
|
22
|
+
message:'请选择需要的工具:',
|
|
23
|
+
choices:[
|
|
24
|
+
'图片压缩',
|
|
25
|
+
'word转html',
|
|
26
|
+
'iconFont图标字体',
|
|
27
|
+
],
|
|
28
|
+
default:''
|
|
29
|
+
},
|
|
30
|
+
]);
|
|
31
|
+
if(answer){
|
|
32
|
+
switch(answer.type){
|
|
33
|
+
case '图片压缩':{templateName='tinypng'}break;
|
|
34
|
+
case 'iconFont图标字体':{templateName='iconfont'}break;
|
|
35
|
+
case 'word转html':{templateName='word2html'}break;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
const tasks = new Listr([
|
|
40
|
+
{
|
|
41
|
+
...TaskNodeVersion
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
title: "工具创建中",
|
|
45
|
+
task: () => copyDir(path.resolve(templatesDir,templateName),path.resolve(sourceDir,templateName))
|
|
46
|
+
},
|
|
47
|
+
]);
|
|
48
|
+
try{
|
|
49
|
+
await tasks.run();
|
|
50
|
+
console.log(chalk.green.bold("完成"));
|
|
51
|
+
}catch(err){
|
|
52
|
+
console.log(chalk.red.bold("ERROR:"+err.message));
|
|
53
|
+
return 0;
|
|
54
|
+
}
|
|
55
|
+
return 1;
|
|
56
|
+
}
|
|
@@ -11,6 +11,7 @@ module.exports=function(rawArgs) {
|
|
|
11
11
|
"--test": Boolean,
|
|
12
12
|
"--report":Boolean,
|
|
13
13
|
"-v": "--version",//-v 转译成 --version
|
|
14
|
+
"--tool":Boolean,
|
|
14
15
|
},
|
|
15
16
|
{
|
|
16
17
|
permissive:true,
|
|
@@ -27,5 +28,6 @@ module.exports=function(rawArgs) {
|
|
|
27
28
|
version: get(args, "--version", false),
|
|
28
29
|
test: get(args, "--test", false),
|
|
29
30
|
report: get(args, "--report", false),
|
|
31
|
+
tool: get(args, "--tool", false),
|
|
30
32
|
};
|
|
31
33
|
}
|
|
@@ -4,7 +4,15 @@
|
|
|
4
4
|
git仓库建立完毕后,执行`sh init.sh`
|
|
5
5
|
|
|
6
6
|
### 本地调试
|
|
7
|
-
|
|
7
|
+
sh dev.sh
|
|
8
|
+
|
|
9
|
+
### 安装新的库
|
|
10
|
+
npm i 库名称 --save
|
|
11
|
+
### 模块构建报告
|
|
12
|
+
sh report.sh
|
|
13
|
+
|
|
14
|
+
### 测试环境部署
|
|
15
|
+
1. sh build.sh
|
|
8
16
|
|
|
9
17
|
### 生产环境部署
|
|
10
18
|
1. 向运维申请CICD环境,申请模板如下:
|
|
@@ -41,6 +49,9 @@ kn-cli --dev
|
|
|
41
49
|
执行 `sh versionPublish.sh` 给正式发布的版本打tag里程碑,便于查看及回滚
|
|
42
50
|
|
|
43
51
|
|
|
52
|
+
### 构建辅助工具创建
|
|
53
|
+
kn-cli --tool
|
|
54
|
+
|
|
44
55
|
### 目录介绍
|
|
45
56
|
|
|
46
57
|
* static: 不参与打包,会在打包后将整个文件夹复制到站点根目录下
|
|
@@ -62,7 +73,8 @@ kn-cli --dev
|
|
|
62
73
|
* index.jsx: 站点入口
|
|
63
74
|
* route.jsx: 站点路由配置
|
|
64
75
|
* pluginjs: 第三方静态引入的js库
|
|
65
|
-
* tools: 构建工具
|
|
76
|
+
* tools: 构建工具(通过kn-cli --tool可创建)
|
|
66
77
|
* iconfont: 构建Iconfont工具
|
|
67
78
|
* tinypng: 压缩png工具
|
|
68
79
|
|
|
80
|
+
|
|
@@ -9,6 +9,9 @@ git仓库建立完毕后,执行`sh init.sh`
|
|
|
9
9
|
|
|
10
10
|
> 借助chrome-oa插件 https://gitlab.ops.kingnet.com/changx/chrome-plugin-oa-test-helper 可以在本站内右键直接将oa cookie导入
|
|
11
11
|
|
|
12
|
+
### 安装新的库
|
|
13
|
+
npm i 库名称 --save
|
|
14
|
+
|
|
12
15
|
### 生产环境部署
|
|
13
16
|
1. 向运维申请CICD环境,申请模板如下:
|
|
14
17
|
```
|
|
@@ -46,6 +49,9 @@ git仓库建立完毕后,执行`sh init.sh`
|
|
|
46
49
|
执行 `sh versionPublish.sh` 给正式发布的版本打tag里程碑,便于查看及回滚
|
|
47
50
|
|
|
48
51
|
|
|
52
|
+
### 构建工具创建
|
|
53
|
+
kn-cli --tool
|
|
54
|
+
|
|
49
55
|
### 目录介绍
|
|
50
56
|
|
|
51
57
|
* static: 不参与打包,会在打包后将整个文件夹复制到站点根目录下
|
|
@@ -1,70 +0,0 @@
|
|
|
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
|
-
|
|
@@ -1,20 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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>
|
|
@@ -1 +0,0 @@
|
|
|
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>
|
|
@@ -1 +0,0 @@
|
|
|
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>
|
|
@@ -1 +0,0 @@
|
|
|
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>
|
|
@@ -1 +0,0 @@
|
|
|
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>
|
|
@@ -1 +0,0 @@
|
|
|
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>
|
|
@@ -1 +0,0 @@
|
|
|
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>
|
|
@@ -1 +0,0 @@
|
|
|
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>
|
|
@@ -1,26 +0,0 @@
|
|
|
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
|
-
<% }); %>
|
|
@@ -1,29 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,56 +0,0 @@
|
|
|
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>
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
if [ -d "${HOME}/.nvm/" ]
|
|
2
|
-
then
|
|
3
|
-
. ${HOME}/.nvm/nvm.sh
|
|
4
|
-
fi
|
|
5
|
-
|
|
6
|
-
echo "开始压缩 ./img/ 下的所有png图片"
|
|
7
|
-
|
|
8
|
-
nvm use v16.18.0
|
|
9
|
-
npm config delete registry -g
|
|
10
|
-
npm config delete registry
|
|
11
|
-
npm i
|
|
12
|
-
cd img
|
|
13
|
-
../node_modules/.bin/super-tinypng-pro
|
|
14
|
-
|
|
15
|
-
echo "压缩完毕"
|