imooc-cli-dev-components44 1.0.0 → 1.0.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.
Files changed (45) hide show
  1. package/.browserslistrc +3 -0
  2. package/.eslintrc.js +34 -0
  3. package/.gitignore +2 -0
  4. package/.travis.yml +12 -0
  5. package/README.md +8 -24
  6. package/build/rollup.config.js +28 -0
  7. package/build/rollup.esm.config.js +11 -0
  8. package/build/rollup.umd.config.js +14 -0
  9. package/dist/bundle.css +18 -0
  10. package/dist/components/LImage/LImage.vue.d.ts +190 -0
  11. package/dist/components/LImage/index.d.ts +2 -0
  12. package/dist/components/LShape/LShape.vue.d.ts +190 -0
  13. package/dist/components/LShape/index.d.ts +2 -0
  14. package/dist/components/LText/LText.vue.d.ts +280 -0
  15. package/dist/components/LText/index.d.ts +2 -0
  16. package/dist/defaultProps.d.ts +61 -0
  17. package/dist/hooks/useComponentCommon.d.ts +10 -0
  18. package/dist/imooc-cli-dev-components44.esm.js +217 -0
  19. package/dist/imooc-cli-dev-components44.umd.js +232 -0
  20. package/dist/index.d.ts +10 -0
  21. package/examples/README.md +24 -0
  22. package/examples/babel.config.js +5 -0
  23. package/examples/package-lock.json +18240 -0
  24. package/examples/package.json +42 -0
  25. package/jest.config.js +9 -0
  26. package/package.json +70 -25
  27. package/src/components/LImage/LImage.vue +38 -0
  28. package/src/components/LImage/index.ts +7 -0
  29. package/src/components/LShape/LShape.vue +30 -0
  30. package/src/components/LShape/index.ts +7 -0
  31. package/src/components/LText/LText.vue +46 -0
  32. package/src/components/LText/index.ts +7 -0
  33. package/src/defaultProps.ts +110 -0
  34. package/src/hooks/useComponentCommon.ts +17 -0
  35. package/src/index.ts +34 -0
  36. package/src/shims-vue.d.ts +5 -0
  37. package/tests/unit/LText.spec.ts +57 -0
  38. package/tsconfig.json +43 -0
  39. /package/{public → examples/public}/favicon.ico +0 -0
  40. /package/{public → examples/public}/index.html +0 -0
  41. /package/{src → examples/src}/App.vue +0 -0
  42. /package/{src → examples/src}/assets/logo.png +0 -0
  43. /package/{src → examples/src}/components/HelloWorld.vue +0 -0
  44. /package/{src → examples/src}/main.js +0 -0
  45. /package/{vue.config.js → examples/vue.config.js} +0 -0
@@ -0,0 +1,3 @@
1
+ > 1%
2
+ last 2 versions
3
+ not dead
package/.eslintrc.js ADDED
@@ -0,0 +1,34 @@
1
+ module.exports = {
2
+ root: true,
3
+
4
+ env: {
5
+ node: true
6
+ },
7
+
8
+ 'extends': [
9
+ 'plugin:vue/vue3-essential',
10
+ 'eslint:recommended',
11
+ '@vue/typescript/recommended'
12
+ ],
13
+
14
+ parserOptions: {
15
+ ecmaVersion: 2020
16
+ },
17
+
18
+ rules: {
19
+ 'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
20
+ 'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off'
21
+ },
22
+
23
+ overrides: [
24
+ {
25
+ files: [
26
+ '**/__tests__/*.{j,t}s?(x)',
27
+ '**/tests/unit/**/*.spec.{j,t}s?(x)'
28
+ ],
29
+ env: {
30
+ jest: true
31
+ }
32
+ }
33
+ ]
34
+ }
package/.gitignore ADDED
@@ -0,0 +1,2 @@
1
+ node_modules/
2
+ examples/node_modules/
package/.travis.yml ADDED
@@ -0,0 +1,12 @@
1
+ language: node_js
2
+ node_js:
3
+ - node
4
+ deploy:
5
+ provider: npm
6
+ email: vikingmute@gmail.com
7
+ skip_cleanup: true
8
+ api_key:
9
+ secure: VrYEXlKywrSuhAk/zA36UXMFDj3Dn7I0UKathAtWUirYj9QdT8hEoJDYEcQCX+8/EGJjVXVcdEfNUDbSfb5ibxsXfYzv+VNxX1KECuM8xuwMUmbFW7JWhmjtxm/XktljY7h7G8KabZQGJSFvaSw4cAHctlFcLWcATMhkGuDUskVdHOu82nx5B7c3N9fnE/pD1WJXsixvutrorZOOily8jmD8IMy5lunarGfn30F/yyTYSxiO4dEDcQeZ98hx3n+Zugl+Zktqg0p3bNL3TGx7epCOSsHxN3XxlHKxZBW2OL0XcLXyIFQYI+rsWHp1YC6kdeYTzvYY7SkLexLx9hMKKShmFBOos8bOnHlSQD8/E9uehOCMshzv6lEQEA/zeYojeXMcESshuAdga0OG3+rOhmlAAPDR0hYfnP6olhWrdJ6hEX21IIqhTDeZb7+UvkP4Vd3tDfz03ylf1jtJcoQNhTlYDlAJVQt3DczqpvQ2YIaknqdJe3fxeKyfp3aM8GYBHuzgLZn12mOOEUaratQAaxNR460WTEjzvWm5gINi2N0gl+UvQal9JeH+DwBskiaaMYUL04y2KInNIJRfdemGJ6LMjHqimhUW2gTBuuaKtKkg19FB2+JqoF/kqljE9Z4ZNnMWCGvbKTCRQrtFItwICQPyD18wNqHqpiIw7j8/szs=
10
+ on:
11
+ tags: true
12
+
package/README.md CHANGED
@@ -1,24 +1,8 @@
1
- # examples
2
-
3
- ## Project setup
4
- ```
5
- npm install
6
- ```
7
-
8
- ### Compiles and hot-reloads for development
9
- ```
10
- npm run serve
11
- ```
12
-
13
- ### Compiles and minifies for production
14
- ```
15
- npm run build
16
- ```
17
-
18
- ### Lints and fixes files
19
- ```
20
- npm run lint
21
- ```
22
-
23
- ### Customize configuration
24
- See [Configuration Reference](https://cli.vuejs.org/config/).
1
+ # 慕课乐高业务组件库
2
+
3
+ ## 特性
4
+ * **typescript**
5
+ * Vue3
6
+ * 单元测试
7
+ * 提交发布前验证
8
+ * travis 实现自动发布
@@ -0,0 +1,28 @@
1
+ import vue from 'rollup-plugin-vue'
2
+ import css from 'rollup-plugin-css-only'
3
+ import typescript from 'rollup-plugin-typescript2'
4
+ import { nodeResolve } from '@rollup/plugin-node-resolve'
5
+ import pkg from '../package.json' with { type: 'json' }
6
+ const name = pkg.name
7
+ const file = type => `dist/${name}.${type}.js`
8
+ const overrides = {
9
+ compilerOptions: { declaration: true },
10
+ exclude: ["tests/**/*.ts", "tests/**/*.tsx"]
11
+ }
12
+
13
+ export { file, name }
14
+ export default {
15
+ input: 'src/index.ts',
16
+ output: {
17
+ name: "imooc-cli-dev-components",
18
+ file: file('esm'),
19
+ format: 'es'
20
+ },
21
+ plugins: [
22
+ nodeResolve(),
23
+ typescript({ tsconfigOverride: overrides }),
24
+ vue(),
25
+ css({ output: 'bundle.css' })
26
+ ],
27
+ external: ['vue', 'lodash-es']
28
+ }
@@ -0,0 +1,11 @@
1
+ import basicConfig, { file,name } from './rollup.config.js'
2
+ export default {
3
+ ...basicConfig,
4
+ output: {
5
+ name,
6
+ file: file('esm'),
7
+ format: 'es',
8
+ banner: '/* eslint-disable */',
9
+ footer: '/* Powered by www.imooc.com */',
10
+ }
11
+ }
@@ -0,0 +1,14 @@
1
+ import basicConfig, { file } from './rollup.config.js'
2
+ export default {
3
+ ...basicConfig,
4
+ output: {
5
+ name: 'LegoComponents',
6
+ file: file('umd'),
7
+ format: 'umd',
8
+ globals: {
9
+ 'vue': 'Vue',
10
+ 'lodash-es': '_'
11
+ },
12
+ exports: 'named'
13
+ }
14
+ }
@@ -0,0 +1,18 @@
1
+
2
+ h2.l-text-component[data-v-6bf95b7a], p.l-text-component[data-v-6bf95b7a] {
3
+ margin-bottom: 0;
4
+ }
5
+ button.l-text-component[data-v-6bf95b7a] {
6
+ padding: 5px 10px;
7
+ cursor: pointer;
8
+ }
9
+ .l-text-component[data-v-6bf95b7a] {
10
+ box-sizing: border-box;
11
+ white-space: pre-wrap;
12
+ position: relative !important;
13
+ }
14
+
15
+ .l-image-component[data-v-1e970aa2] {
16
+ max-width: 100%;
17
+ position: relative !important;
18
+ }
@@ -0,0 +1,190 @@
1
+ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
2
+ src: {
3
+ type: StringConstructor;
4
+ default: string;
5
+ };
6
+ actionType: {
7
+ type: StringConstructor;
8
+ default: string;
9
+ };
10
+ url: {
11
+ type: StringConstructor;
12
+ default: string;
13
+ };
14
+ height: {
15
+ type: StringConstructor;
16
+ default: string;
17
+ };
18
+ width: {
19
+ type: StringConstructor;
20
+ default: string;
21
+ };
22
+ paddingLeft: {
23
+ type: StringConstructor;
24
+ default: string;
25
+ };
26
+ paddingRight: {
27
+ type: StringConstructor;
28
+ default: string;
29
+ };
30
+ paddingTop: {
31
+ type: StringConstructor;
32
+ default: string;
33
+ };
34
+ paddingBottom: {
35
+ type: StringConstructor;
36
+ default: string;
37
+ };
38
+ borderStyle: {
39
+ type: StringConstructor;
40
+ default: string;
41
+ };
42
+ borderColor: {
43
+ type: StringConstructor;
44
+ default: string;
45
+ };
46
+ borderWidth: {
47
+ type: StringConstructor;
48
+ default: string;
49
+ };
50
+ borderRadius: {
51
+ type: StringConstructor;
52
+ default: string;
53
+ };
54
+ boxShadow: {
55
+ type: StringConstructor;
56
+ default: string;
57
+ };
58
+ opacity: {
59
+ type: StringConstructor;
60
+ default: string;
61
+ };
62
+ position: {
63
+ type: StringConstructor;
64
+ default: string;
65
+ };
66
+ left: {
67
+ type: StringConstructor;
68
+ default: string;
69
+ };
70
+ top: {
71
+ type: StringConstructor;
72
+ default: string;
73
+ };
74
+ right: {
75
+ type: StringConstructor;
76
+ default: string;
77
+ };
78
+ isEditing: {
79
+ type: BooleanConstructor;
80
+ default: boolean;
81
+ };
82
+ }>, {
83
+ styleProps: import("vue").ComputedRef<Partial<Readonly<Partial<import("../../defaultProps").CommonComponentProps & {
84
+ isEditing: boolean;
85
+ }>>>>;
86
+ handleClick: () => void;
87
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
88
+ src: {
89
+ type: StringConstructor;
90
+ default: string;
91
+ };
92
+ actionType: {
93
+ type: StringConstructor;
94
+ default: string;
95
+ };
96
+ url: {
97
+ type: StringConstructor;
98
+ default: string;
99
+ };
100
+ height: {
101
+ type: StringConstructor;
102
+ default: string;
103
+ };
104
+ width: {
105
+ type: StringConstructor;
106
+ default: string;
107
+ };
108
+ paddingLeft: {
109
+ type: StringConstructor;
110
+ default: string;
111
+ };
112
+ paddingRight: {
113
+ type: StringConstructor;
114
+ default: string;
115
+ };
116
+ paddingTop: {
117
+ type: StringConstructor;
118
+ default: string;
119
+ };
120
+ paddingBottom: {
121
+ type: StringConstructor;
122
+ default: string;
123
+ };
124
+ borderStyle: {
125
+ type: StringConstructor;
126
+ default: string;
127
+ };
128
+ borderColor: {
129
+ type: StringConstructor;
130
+ default: string;
131
+ };
132
+ borderWidth: {
133
+ type: StringConstructor;
134
+ default: string;
135
+ };
136
+ borderRadius: {
137
+ type: StringConstructor;
138
+ default: string;
139
+ };
140
+ boxShadow: {
141
+ type: StringConstructor;
142
+ default: string;
143
+ };
144
+ opacity: {
145
+ type: StringConstructor;
146
+ default: string;
147
+ };
148
+ position: {
149
+ type: StringConstructor;
150
+ default: string;
151
+ };
152
+ left: {
153
+ type: StringConstructor;
154
+ default: string;
155
+ };
156
+ top: {
157
+ type: StringConstructor;
158
+ default: string;
159
+ };
160
+ right: {
161
+ type: StringConstructor;
162
+ default: string;
163
+ };
164
+ isEditing: {
165
+ type: BooleanConstructor;
166
+ default: boolean;
167
+ };
168
+ }>> & Readonly<{}>, {
169
+ src: string;
170
+ actionType: string;
171
+ url: string;
172
+ height: string;
173
+ width: string;
174
+ paddingLeft: string;
175
+ paddingRight: string;
176
+ paddingTop: string;
177
+ paddingBottom: string;
178
+ borderStyle: string;
179
+ borderColor: string;
180
+ borderWidth: string;
181
+ borderRadius: string;
182
+ boxShadow: string;
183
+ opacity: string;
184
+ position: string;
185
+ left: string;
186
+ top: string;
187
+ right: string;
188
+ isEditing: boolean;
189
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
190
+ export default _default;
@@ -0,0 +1,2 @@
1
+ import LImage from './LImage.vue';
2
+ export default LImage;
@@ -0,0 +1,190 @@
1
+ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
2
+ backgroundColor: {
3
+ type: StringConstructor;
4
+ default: string;
5
+ };
6
+ actionType: {
7
+ type: StringConstructor;
8
+ default: string;
9
+ };
10
+ url: {
11
+ type: StringConstructor;
12
+ default: string;
13
+ };
14
+ height: {
15
+ type: StringConstructor;
16
+ default: string;
17
+ };
18
+ width: {
19
+ type: StringConstructor;
20
+ default: string;
21
+ };
22
+ paddingLeft: {
23
+ type: StringConstructor;
24
+ default: string;
25
+ };
26
+ paddingRight: {
27
+ type: StringConstructor;
28
+ default: string;
29
+ };
30
+ paddingTop: {
31
+ type: StringConstructor;
32
+ default: string;
33
+ };
34
+ paddingBottom: {
35
+ type: StringConstructor;
36
+ default: string;
37
+ };
38
+ borderStyle: {
39
+ type: StringConstructor;
40
+ default: string;
41
+ };
42
+ borderColor: {
43
+ type: StringConstructor;
44
+ default: string;
45
+ };
46
+ borderWidth: {
47
+ type: StringConstructor;
48
+ default: string;
49
+ };
50
+ borderRadius: {
51
+ type: StringConstructor;
52
+ default: string;
53
+ };
54
+ boxShadow: {
55
+ type: StringConstructor;
56
+ default: string;
57
+ };
58
+ opacity: {
59
+ type: StringConstructor;
60
+ default: string;
61
+ };
62
+ position: {
63
+ type: StringConstructor;
64
+ default: string;
65
+ };
66
+ left: {
67
+ type: StringConstructor;
68
+ default: string;
69
+ };
70
+ top: {
71
+ type: StringConstructor;
72
+ default: string;
73
+ };
74
+ right: {
75
+ type: StringConstructor;
76
+ default: string;
77
+ };
78
+ isEditing: {
79
+ type: BooleanConstructor;
80
+ default: boolean;
81
+ };
82
+ }>, {
83
+ styleProps: import("vue").ComputedRef<Partial<Readonly<Partial<import("../../defaultProps").CommonComponentProps & {
84
+ isEditing: boolean;
85
+ }>>>>;
86
+ handleClick: () => void;
87
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
88
+ backgroundColor: {
89
+ type: StringConstructor;
90
+ default: string;
91
+ };
92
+ actionType: {
93
+ type: StringConstructor;
94
+ default: string;
95
+ };
96
+ url: {
97
+ type: StringConstructor;
98
+ default: string;
99
+ };
100
+ height: {
101
+ type: StringConstructor;
102
+ default: string;
103
+ };
104
+ width: {
105
+ type: StringConstructor;
106
+ default: string;
107
+ };
108
+ paddingLeft: {
109
+ type: StringConstructor;
110
+ default: string;
111
+ };
112
+ paddingRight: {
113
+ type: StringConstructor;
114
+ default: string;
115
+ };
116
+ paddingTop: {
117
+ type: StringConstructor;
118
+ default: string;
119
+ };
120
+ paddingBottom: {
121
+ type: StringConstructor;
122
+ default: string;
123
+ };
124
+ borderStyle: {
125
+ type: StringConstructor;
126
+ default: string;
127
+ };
128
+ borderColor: {
129
+ type: StringConstructor;
130
+ default: string;
131
+ };
132
+ borderWidth: {
133
+ type: StringConstructor;
134
+ default: string;
135
+ };
136
+ borderRadius: {
137
+ type: StringConstructor;
138
+ default: string;
139
+ };
140
+ boxShadow: {
141
+ type: StringConstructor;
142
+ default: string;
143
+ };
144
+ opacity: {
145
+ type: StringConstructor;
146
+ default: string;
147
+ };
148
+ position: {
149
+ type: StringConstructor;
150
+ default: string;
151
+ };
152
+ left: {
153
+ type: StringConstructor;
154
+ default: string;
155
+ };
156
+ top: {
157
+ type: StringConstructor;
158
+ default: string;
159
+ };
160
+ right: {
161
+ type: StringConstructor;
162
+ default: string;
163
+ };
164
+ isEditing: {
165
+ type: BooleanConstructor;
166
+ default: boolean;
167
+ };
168
+ }>> & Readonly<{}>, {
169
+ backgroundColor: string;
170
+ actionType: string;
171
+ url: string;
172
+ height: string;
173
+ width: string;
174
+ paddingLeft: string;
175
+ paddingRight: string;
176
+ paddingTop: string;
177
+ paddingBottom: string;
178
+ borderStyle: string;
179
+ borderColor: string;
180
+ borderWidth: string;
181
+ borderRadius: string;
182
+ boxShadow: string;
183
+ opacity: string;
184
+ position: string;
185
+ left: string;
186
+ top: string;
187
+ right: string;
188
+ isEditing: boolean;
189
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
190
+ export default _default;
@@ -0,0 +1,2 @@
1
+ import LShape from './LShape.vue';
2
+ export default LShape;