@ldmjs/ui 1.0.0-dev-1 → 1.0.0-dev-2

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.
@@ -13,7 +13,7 @@ module.exports = {
13
13
  umdNamedDefine: true,
14
14
  libraryTarget: 'umd',
15
15
  library: 'ldm-ui',
16
- filename: 'main.umd.js',
16
+ filename: 'index.js',
17
17
  path: path.resolve(__dirname, '../dist'),
18
18
  },
19
19
  externals: {
@@ -126,5 +126,13 @@ module.exports = {
126
126
  new DefinePlugin({
127
127
  '$DEV': false,
128
128
  }),
129
+ new CopyWebpackPlugin({
130
+ patterns: [
131
+ {
132
+ from: 'src/index.d.ts',
133
+ to: './index.d.ts'
134
+ }
135
+ ]
136
+ })
129
137
  ]
130
138
  }
@@ -0,0 +1 @@
1
+ declare module '@ldmjs/ui'
@@ -278,27 +278,34 @@ IconButtonComponent = ld_iconvue_type_script_lang_js_external_decorate([
278
278
  const ld_icon_exports_ = ld_iconvue_type_script_lang_js_external;
279
279
 
280
280
  /* harmony default export */ const ld_icon = (ld_icon_exports_);
281
- ;// CONCATENATED MODULE: ./src/index.ts
281
+ ;// CONCATENATED MODULE: ./src/ld-icon/index.ts
282
282
 
283
283
 
284
+ function packageRegister(vue, options) {
285
+ if (false) {}
286
+ let cmp = (0,external_vue_.defineComponent)(ld_icon);
287
+ cmp = cmp.setup.__vccOpts;
288
+ cmp = {
289
+ ...cmp,
290
+ props: {
291
+ ...cmp.props,
292
+ path: {
293
+ default: options?.path ?? 'icons',
294
+ },
295
+ map: {
296
+ default: options?.map ?? { icons: [] }
297
+ }
298
+ }
299
+ };
300
+ vue.component('ld-icon', (0,external_vue_.defineComponent)(cmp));
301
+ }
302
+ /* harmony default export */ const src_ld_icon = (packageRegister);
303
+
304
+ ;// CONCATENATED MODULE: ./src/index.ts
305
+
284
306
  const ldmuiPlugin = {
285
307
  install(vue, options) {
286
- if (false) {}
287
- let cmp = (0,external_vue_.defineComponent)(ld_icon);
288
- cmp = cmp.setup.__vccOpts;
289
- cmp = {
290
- ...cmp,
291
- props: {
292
- ...cmp.props,
293
- path: {
294
- default: options.LdIcon.path
295
- },
296
- map: {
297
- default: options.LdIcon.map
298
- }
299
- }
300
- };
301
- vue.component('ld-icon', (0,external_vue_.defineComponent)(cmp));
308
+ src_ld_icon(vue, options.LdIcon);
302
309
  },
303
310
  };
304
311
  /* harmony default export */ const src = (ldmuiPlugin);
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@ldmjs/ui",
3
- "version": "1.0.0-dev-1",
3
+ "version": "1.0.0-dev-2",
4
4
  "description": "ldm ui",
5
- "main": "dist/main.umd.js",
5
+ "main": "dist/index.js",
6
6
  "scripts": {
7
7
  "dev": "webpack serve --config config/webpack.config.dev.js --progress --profile",
8
8
  "build": "webpack --config config/webpack.config.build.js --stats-error-details"
package/src/index.d.ts ADDED
@@ -0,0 +1 @@
1
+ declare module '@ldmjs/ui'
package/src/index.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { App, defineComponent } from 'vue';
2
- import ldicon from '@/ld-icon/ld-icon.vue';
1
+ import { App } from 'vue';
2
+ import ldiconRegister from './ld-icon';
3
3
 
4
4
  const ldmuiPlugin = {
5
5
  install(vue: App, options?: {
@@ -10,34 +10,7 @@ const ldmuiPlugin = {
10
10
  }
11
11
  }
12
12
  }) {
13
- if ($DEV) {
14
- ldicon.props = {
15
- ...ldicon.props,
16
- path: {
17
- default: options?.LdIcon?.path ?? 'icons',
18
- },
19
- map: {
20
- default: options?.LdIcon?.map ?? { icons: [] }
21
- }
22
- }
23
- vue.component('ld-icon', ldicon);
24
- return;
25
- }
26
- let cmp: any = defineComponent(ldicon);
27
- cmp = cmp.setup.__vccOpts;
28
- cmp = {
29
- ...cmp,
30
- props: {
31
- ...cmp.props,
32
- path: {
33
- default: options.LdIcon.path
34
- },
35
- map: {
36
- default: options.LdIcon.map
37
- }
38
- }
39
- };
40
- vue.component('ld-icon', defineComponent(cmp));
13
+ ldiconRegister(vue, options.LdIcon)
41
14
  },
42
15
  };
43
16
 
@@ -1,2 +1,2 @@
1
1
  Все иконки можно посмотреть, открыв страничку по адресу:
2
- localhost:3000/assets/icons/icons.html
2
+ localhost:4000/assets/icons/icons.html
@@ -0,0 +1,35 @@
1
+ import { App, defineComponent } from 'vue';
2
+ import ldicon from '@/ld-icon/ld-icon.vue';
3
+
4
+ function packageRegister(vue: App, options: { path: string; map: { icons: Array<[string, string]> } }) {
5
+ if ($DEV) {
6
+ ldicon.props = {
7
+ ...ldicon.props,
8
+ path: {
9
+ default: options?.path ?? 'icons',
10
+ },
11
+ map: {
12
+ default: options?.map ?? { icons: [] }
13
+ }
14
+ }
15
+ vue.component('ld-icon', ldicon);
16
+ return;
17
+ }
18
+ let cmp: any = defineComponent(ldicon);
19
+ cmp = cmp.setup.__vccOpts;
20
+ cmp = {
21
+ ...cmp,
22
+ props: {
23
+ ...cmp.props,
24
+ path: {
25
+ default: options?.path ?? 'icons',
26
+ },
27
+ map: {
28
+ default: options?.map ?? { icons: [] }
29
+ }
30
+ }
31
+ };
32
+ vue.component('ld-icon', defineComponent(cmp));
33
+ }
34
+
35
+ export default packageRegister;
@@ -1,13 +0,0 @@
1
- /*! #__NO_SIDE_EFFECTS__ */
2
-
3
- /**
4
- * vue-class-component v8.0.0-rc.1
5
- * (c) 2015-present Evan You
6
- * @license MIT
7
- */
8
-
9
- /**
10
- * @vue/shared v3.4.21
11
- * (c) 2018-present Yuxi (Evan) You and Vue contributors
12
- * @license MIT
13
- **/