carbon-preprocess-svelte 0.5.0 → 0.8.0

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/CHANGELOG.md CHANGED
@@ -5,23 +5,34 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
- ## [0.5.0](https://github.com/IBM/carbon-preprocess-svelte/releases/tag/v0.5.0) - 2021-07-05
8
+ ## [0.8.0](https://github.com/carbon-design-system/carbon-preprocess-svelte/releases/tag/v0.8.0) - 2022-04-10
9
9
 
10
- **Features**
10
+ - upgrade `@carbon/icons` to v11.0.1
11
+ - update `optimizeImports` to support `carbon-icons-svelte@11` component imports
12
+
13
+ ## [0.7.0](https://github.com/carbon-design-system/carbon-preprocess-svelte/releases/tag/v0.7.0) - 2022-03-19
14
+
15
+ - upgrade `carbon-components-svelte` to v0.62.0 to account for the removed `Copy` component and inlined icon components
16
+
17
+ ## [0.6.0](https://github.com/carbon-design-system/carbon-preprocess-svelte/releases/tag/v0.6.0) - 2021-07-11
18
+
19
+ - upgrade `carbon-components-svelte` to v0.40.0 to include `Breakpoint`, `Theme` components for `optimizeImports`
20
+
21
+ ## [0.5.0](https://github.com/carbon-design-system/carbon-preprocess-svelte/releases/tag/v0.5.0) - 2021-07-05
11
22
 
12
- - upgrade `carbon-components-svelte` to v0.39 to include `RecursiveList`, `TreeView` components for `optimizeImports`
23
+ - upgrade `carbon-components-svelte` to v0.39.0 to include `RecursiveList`, `TreeView` components for `optimizeImports`
13
24
 
14
- ## [0.4.0](https://github.com/IBM/carbon-preprocess-svelte/releases/tag/v0.4.0) - 2021-06-28
25
+ ## [0.4.0](https://github.com/carbon-design-system/carbon-preprocess-svelte/releases/tag/v0.4.0) - 2021-06-28
15
26
 
16
27
  **Features**
17
28
 
18
- - upgrade `carbon-components-svelte` to v0.38 to include `ProgressBar` component for `optimizeImports`
29
+ - upgrade `carbon-components-svelte` to v0.38.0 to include `ProgressBar` component for `optimizeImports`
19
30
 
20
31
  **Fixes**
21
32
 
22
- - default `include` preprocessor entry test regest to high-level test option
33
+ - default `include` preprocessor entry test regex to high-level test option
23
34
 
24
- ## [0.3.0](https://github.com/IBM/carbon-preprocess-svelte/releases/tag/v0.3.0) - 2021-05-21
35
+ ## [0.3.0](https://github.com/carbon-design-system/carbon-preprocess-svelte/releases/tag/v0.3.0) - 2021-05-21
25
36
 
26
37
  **Features**
27
38
 
@@ -31,7 +42,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
31
42
 
32
43
  - support custom `test` regex per script/markup object in `include` preprocessor
33
44
 
34
- ## [0.2.0](https://github.com/IBM/carbon-preprocess-svelte/releases/tag/v0.2.0) - 2021-05-21
45
+ ## [0.2.0](https://github.com/carbon-design-system/carbon-preprocess-svelte/releases/tag/v0.2.0) - 2021-05-21
35
46
 
36
47
  **Features**
37
48
 
@@ -42,25 +53,25 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
42
53
  - enrich preprocessor descriptions
43
54
  - simplify sample SvelteKit set-up
44
55
 
45
- ## [0.1.0](https://github.com/IBM/carbon-preprocess-svelte/releases/tag/v0.1.0) - 2021-05-11
56
+ ## [0.1.0](https://github.com/carbon-design-system/carbon-preprocess-svelte/releases/tag/v0.1.0) - 2021-05-11
46
57
 
47
58
  **Documentation**
48
59
 
49
60
  - improve preprocessor descriptions, add sample SvelteKit set-up
50
61
 
51
- ## [0.1.0-rc.5](https://github.com/IBM/carbon-preprocess-svelte/releases/tag/v0.1.0-rc.5) - 2021-05-11
62
+ ## [0.1.0-rc.5](https://github.com/carbon-design-system/carbon-preprocess-svelte/releases/tag/v0.1.0-rc.5) - 2021-05-11
52
63
 
53
64
  **Fixes**
54
65
 
55
66
  - add separate entry point for CJS bundle
56
67
 
57
- ## [0.1.0-rc.4](https://github.com/IBM/carbon-preprocess-svelte/releases/tag/v0.1.0-rc.4) - 2021-05-10
68
+ ## [0.1.0-rc.4](https://github.com/carbon-design-system/carbon-preprocess-svelte/releases/tag/v0.1.0-rc.4) - 2021-05-10
58
69
 
59
70
  **Fixes**
60
71
 
61
72
  - add TypeScript as a direct dependency
62
73
 
63
- ## [0.1.0-rc.3](https://github.com/IBM/carbon-preprocess-svelte/releases/tag/v0.1.0-rc.3) - 2021-05-10
74
+ ## [0.1.0-rc.3](https://github.com/carbon-design-system/carbon-preprocess-svelte/releases/tag/v0.1.0-rc.3) - 2021-05-10
64
75
 
65
76
  **Features**
66
77
 
@@ -70,7 +81,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
70
81
 
71
82
  - list available theme options for the `elements` preprocessor
72
83
 
73
- ## [0.1.0-rc.2](https://github.com/IBM/carbon-preprocess-svelte/releases/tag/v0.1.0-rc.2) - 2021-05-08
84
+ ## [0.1.0-rc.2](https://github.com/carbon-design-system/carbon-preprocess-svelte/releases/tag/v0.1.0-rc.2) - 2021-05-08
74
85
 
75
86
  **Fixes**
76
87
 
@@ -80,7 +91,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
80
91
 
81
92
  - add `optimizeCss` API to README
82
93
 
83
- ## [0.1.0-rc.1](https://github.com/IBM/carbon-preprocess-svelte/releases/tag/v0.1.0-rc.1) - 2021-05-08
94
+ ## [0.1.0-rc.1](https://github.com/carbon-design-system/carbon-preprocess-svelte/releases/tag/v0.1.0-rc.1) - 2021-05-08
84
95
 
85
96
  **Fixes**
86
97
 
@@ -93,6 +104,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
93
104
 
94
105
  - use ESM instead of CJS syntax in `svelte.config.js` usage examples
95
106
 
96
- ## [0.1.0-rc.0](https://github.com/IBM/carbon-preprocess-svelte/releases/tag/v0.1.0-rc.0) - 2021-05-07
107
+ ## [0.1.0-rc.0](https://github.com/carbon-design-system/carbon-preprocess-svelte/releases/tag/v0.1.0-rc.0) - 2021-05-07
97
108
 
98
109
  - initial release
package/LICENSE CHANGED
@@ -186,7 +186,7 @@
186
186
  same "printed page" as the copyright notice for easier
187
187
  identification within third-party archives.
188
188
 
189
- Copyright [yyyy] [name of copyright owner]
189
+ Copyright 2021 IBM
190
190
 
191
191
  Licensed under the Apache License, Version 2.0 (the "License");
192
192
  you may not use this file except in compliance with the License.
package/README.md CHANGED
@@ -3,18 +3,29 @@
3
3
  [![NPM][npm]][npm-url]
4
4
  ![GitHub](https://img.shields.io/github/license/ibm/carbon-preprocess-svelte?color=262626&style=for-the-badge)
5
5
  ![npm downloads to date](https://img.shields.io/npm/dt/carbon-preprocess-svelte?color=262626&style=for-the-badge)
6
- [![Build][build]][build-badge]
7
6
 
8
7
  > Collection of [Svelte preprocessors](https://svelte.dev/docs#svelte_preprocess) for the Carbon Design System
9
8
 
10
9
  ## Installation
11
10
 
12
- ```bash
11
+ **Yarn**
12
+
13
+ ```sh
13
14
  yarn add -D carbon-preprocess-svelte
14
- # OR
15
+ ```
16
+
17
+ **NPM**
18
+
19
+ ```sh
15
20
  npm i -D carbon-preprocess-svelte
16
21
  ```
17
22
 
23
+ **pnpm**
24
+
25
+ ```sh
26
+ pnpm i -D carbon-preprocess-svelte
27
+ ```
28
+
18
29
  ## Usage
19
30
 
20
31
  This library contains the following preprocessors and plugins:
@@ -32,9 +43,9 @@ This library contains the following preprocessors and plugins:
32
43
 
33
44
  The preprocessor optimizes imports from the following packages:
34
45
 
35
- - [carbon-components-svelte](https://github.com/IBM/carbon-components-svelte)
36
- - [carbon-icons-svelte](https://github.com/IBM/carbon-icons-svelte)
37
- - [carbon-pictograms-svelte](https://github.com/IBM/carbon-pictograms-svelte)
46
+ - [carbon-components-svelte](https://github.com/carbon-design-system/carbon-components-svelte)
47
+ - [carbon-icons-svelte](https://github.com/carbon-design-system/carbon-icons-svelte)
48
+ - [carbon-pictograms-svelte](https://github.com/carbon-design-system/carbon-pictograms-svelte)
38
49
 
39
50
  **Example**
40
51
 
@@ -73,10 +84,8 @@ import { optimizeCss } from "carbon-preprocess-svelte";
73
84
 
74
85
  export default {
75
86
  kit: {
76
- target: "#svelte",
77
87
  adapter: adapter(),
78
88
  vite: {
79
- optimizeDeps: { include: ["clipboard-copy"] },
80
89
  plugins: [process.env.NODE_ENV === "production" && optimizeCss()],
81
90
  },
82
91
  },
@@ -186,7 +195,7 @@ interface ElementsOptions {
186
195
 
187
196
  `icons` is a Svelte markup preprocessor that inlines [Carbon SVG icons](https://www.carbondesignsystem.com/guidelines/icons/library/).
188
197
 
189
- The only required attribute is `name`, which represents the module name of the icon. Refer to [carbon-icons-svelte/ICON_INDEX.md](https://github.com/IBM/carbon-icons-svelte/blob/master/ICON_INDEX.md) for a list of supported icons.
198
+ The only required attribute is `name`, which represents the module name of the icon. Refer to [carbon-icons-svelte/ICON_INDEX.md](https://github.com/carbon-design-system/carbon-icons-svelte/blob/master/ICON_INDEX.md) for a list of supported icons.
190
199
 
191
200
  **Example**
192
201
 
@@ -210,7 +219,7 @@ export default {
210
219
 
211
220
  `pictograms` is a Svelte markup preprocessor that inlines [Carbon SVG pictograms](https://www.carbondesignsystem.com/guidelines/pictograms/library/).
212
221
 
213
- The only required attribute is `name`, which represents the module name of the pictogram. Refer to [carbon-pictograms-svelte/PICTOGRAM_INDEX.md](https://github.com/IBM/carbon-pictograms-svelte/blob/master/PICTOGRAM_INDEX.md) for a list of supported pictograms.
222
+ The only required attribute is `name`, which represents the module name of the pictogram. Refer to [carbon-pictograms-svelte/PICTOGRAM_INDEX.md](https://github.com/carbon-design-system/carbon-pictograms-svelte/blob/master/PICTOGRAM_INDEX.md) for a list of supported pictograms.
214
223
 
215
224
  **Example**
216
225
 
@@ -439,10 +448,8 @@ import { optimizeImports, optimizeCss } from "carbon-preprocess-svelte";
439
448
  export default {
440
449
  preprocess: [optimizeImports()],
441
450
  kit: {
442
- target: "#svelte",
443
451
  adapter: adapter(),
444
452
  vite: {
445
- optimizeDeps: { include: ["clipboard-copy"] },
446
453
  plugins: [process.env.NODE_ENV === "production" && optimizeCss()],
447
454
  },
448
455
  },
@@ -459,5 +466,3 @@ Refer to the [contributing guidelines](CONTRIBUTING.md).
459
466
 
460
467
  [npm]: https://img.shields.io/npm/v/carbon-preprocess-svelte.svg?color=262626&style=for-the-badge
461
468
  [npm-url]: https://npmjs.com/package/carbon-preprocess-svelte
462
- [build]: https://img.shields.io/travis/com/ibm/carbon-preprocess-svelte?color=24a148&style=for-the-badge
463
- [build-badge]: https://travis-ci.com/ibm/carbon-preprocess-svelte
@@ -1,6 +1,9 @@
1
- import { BuildApi } from "../build";
1
+ import type { BuildApi } from "../build";
2
+ declare type ExportName = string;
3
+ interface BuildComponentsApi {
4
+ path: string;
5
+ }
2
6
  export interface BuildComponents extends BuildApi {
3
- components: Record<string, {
4
- path: string;
5
- }>;
7
+ components: Record<ExportName, BuildComponentsApi>;
6
8
  }
9
+ export {};
@@ -11,5 +11,9 @@ export interface BuildApi {
11
11
  * @example "0.32.0"
12
12
  */
13
13
  version: string;
14
+ /**
15
+ * Number of exports
16
+ */
17
+ exports: number;
14
18
  };
15
19
  }