arisu.js 1.0.4 → 2.0.1-alpha.1
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/README.md +3 -1
- package/dist/arisu.commonjs.js +1 -0
- package/dist/arisu.esm.js +1 -0
- package/dist/arisu.umd.js +1 -0
- package/dist/types/index.d.ts +7 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/js/base.d.ts +152 -0
- package/dist/types/js/base.d.ts.map +1 -0
- package/dist/types/js/utils/GoTop.d.ts +9 -0
- package/dist/types/js/utils/GoTop.d.ts.map +1 -0
- package/dist/types/js/utils/IAccordion.d.ts +17 -0
- package/dist/types/js/utils/IAccordion.d.ts.map +1 -0
- package/package.json +23 -6
- package/dist/arisu.commonjs.min.js +0 -1
- package/dist/arisu.js +0 -4985
- package/dist/arisu.min.js +0 -1
- package/dist/arisu.module.min.js +0 -1
- package/dist/arisu.window.min.js +0 -1
- package/src/js/base.js +0 -2000
- package/src/js/main.js +0 -594
- package/src/js/utils.js +0 -2304
- package/webpack.config.js +0 -137
package/webpack.config.js
DELETED
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
const path = require( 'path' );
|
|
2
|
-
const base = 'dist';
|
|
3
|
-
/**
|
|
4
|
-
// demo 1
|
|
5
|
-
// 打包方式一
|
|
6
|
-
// const name = 'libraryD1ScriptTag';
|
|
7
|
-
// 打包方式二
|
|
8
|
-
// const name = 'libraryD1Commonjs';
|
|
9
|
-
// 打包方式三
|
|
10
|
-
// const name = 'libraryD1Module';
|
|
11
|
-
// 打包方式四,兼容方式一和二,调用方法有变动
|
|
12
|
-
const name = 'libraryD1UMD';
|
|
13
|
-
module.exports = {
|
|
14
|
-
entry: './src/lib-demo-1.js',
|
|
15
|
-
mode: 'production',
|
|
16
|
-
// 打包方式三
|
|
17
|
-
// experiments: {
|
|
18
|
-
// outputModule: true
|
|
19
|
-
// },
|
|
20
|
-
output: {
|
|
21
|
-
path: path.resolve( __dirname, base ),
|
|
22
|
-
filename: name + '.js',
|
|
23
|
-
// clean: true,
|
|
24
|
-
// 打包方式一
|
|
25
|
-
// library: {
|
|
26
|
-
// name: name,
|
|
27
|
-
// type: 'window'
|
|
28
|
-
// }
|
|
29
|
-
// 打包方式二
|
|
30
|
-
// library: {
|
|
31
|
-
// name: name,
|
|
32
|
-
// type: 'commonjs'
|
|
33
|
-
// }
|
|
34
|
-
// 打包方式三
|
|
35
|
-
// library: {
|
|
36
|
-
// type: 'module'
|
|
37
|
-
// }
|
|
38
|
-
// 打包方式四,兼容方式一和二,调用方法有变动
|
|
39
|
-
library: {
|
|
40
|
-
name: name,
|
|
41
|
-
type: 'umd'
|
|
42
|
-
},
|
|
43
|
-
globalObject: 'globalThis'
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
**/
|
|
47
|
-
/**
|
|
48
|
-
//demo 2, 引入第三方库及使用JSON数据
|
|
49
|
-
module.exports = {
|
|
50
|
-
entry: './src/index.js',
|
|
51
|
-
mode: 'production',
|
|
52
|
-
output: {
|
|
53
|
-
path: path.resolve( __dirname, base ),
|
|
54
|
-
filename: 'webpack-numbers.js',
|
|
55
|
-
library: {
|
|
56
|
-
name: "webpackNumbers",
|
|
57
|
-
type: "umd"
|
|
58
|
-
},
|
|
59
|
-
globalObject: 'globalThis'
|
|
60
|
-
},
|
|
61
|
-
externals: {
|
|
62
|
-
lodash: {
|
|
63
|
-
commonjs: 'lodash',
|
|
64
|
-
commonjs2: 'lodash',
|
|
65
|
-
amd: 'lodash',
|
|
66
|
-
root: '_',
|
|
67
|
-
},
|
|
68
|
-
},
|
|
69
|
-
};
|
|
70
|
-
**/
|
|
71
|
-
/**
|
|
72
|
-
// 打包方式一、二、三
|
|
73
|
-
module.exports = {
|
|
74
|
-
entry: './src/js/main.js',
|
|
75
|
-
mode: 'production',
|
|
76
|
-
// 打包方式三
|
|
77
|
-
// experiments: {
|
|
78
|
-
// outputModule: true
|
|
79
|
-
// },
|
|
80
|
-
output: {
|
|
81
|
-
path: path.resolve( __dirname, base ),
|
|
82
|
-
// clean: true,
|
|
83
|
-
// 打包方式一
|
|
84
|
-
filename: 'arisu.window.min.js',
|
|
85
|
-
library: {
|
|
86
|
-
name: 'arisu',
|
|
87
|
-
type: 'window'
|
|
88
|
-
},
|
|
89
|
-
// 打包方式二
|
|
90
|
-
// filename: 'arisu.commonjs.min.js',
|
|
91
|
-
// library: {
|
|
92
|
-
// name: 'arisu',
|
|
93
|
-
// type: 'commonjs'
|
|
94
|
-
// }
|
|
95
|
-
// 打包方式三
|
|
96
|
-
// filename: 'arisu.module.min.js',
|
|
97
|
-
// library: {
|
|
98
|
-
// type: 'module'
|
|
99
|
-
// }
|
|
100
|
-
// 取消压缩
|
|
101
|
-
// optimization: {
|
|
102
|
-
// minimize: false
|
|
103
|
-
// }
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
**/
|
|
107
|
-
|
|
108
|
-
// 打包方式四
|
|
109
|
-
module.exports = {
|
|
110
|
-
entry: './src/js/main.js',
|
|
111
|
-
mode: 'production',
|
|
112
|
-
output: {
|
|
113
|
-
path: path.resolve( __dirname, base ),//dist目录,供上线发布
|
|
114
|
-
// path: path.resolve( __dirname, "D:/develop/nodejs/node_modules/arisu/dist" ),//生成在本地测试目录,需要管理员权限打开cmd,同全局安装
|
|
115
|
-
// filename: 'arisu.min.js',
|
|
116
|
-
filename: 'arisu.js',
|
|
117
|
-
library: {
|
|
118
|
-
name: "a",
|
|
119
|
-
type: "umd"
|
|
120
|
-
},
|
|
121
|
-
globalObject: 'globalThis',
|
|
122
|
-
},
|
|
123
|
-
// 取消压缩
|
|
124
|
-
optimization: {
|
|
125
|
-
minimize: false
|
|
126
|
-
},
|
|
127
|
-
// externals: {
|
|
128
|
-
// handlebars: {
|
|
129
|
-
// commonjs: 'handlebars',
|
|
130
|
-
// commonjs2: 'handlebars',
|
|
131
|
-
// amd: 'handlebars',
|
|
132
|
-
// root: 'handlebars'
|
|
133
|
-
// }
|
|
134
|
-
// }
|
|
135
|
-
};
|
|
136
|
-
|
|
137
|
-
|