Skip to content

Commit d250a0c

Browse files
committed
v0.12.0
1 parent 4f69b19 commit d250a0c

File tree

16 files changed

+167
-155
lines changed

16 files changed

+167
-155
lines changed

CHANGELOG.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
- Selectable/expandable `DataTable`
1111

12+
## [0.12.0](https://github.com/IBM/carbon-components-svelte/releases/tag/v0.12.0) - 2020-09-13
13+
14+
**Features**
15+
16+
- css: ship precompiled CSS StyleSheets for each Carbon theme (70e0875)
17+
18+
**Documentation**
19+
20+
- examples: add example set-ups using popular bundlers/frameworks
21+
- update README guidance on consuming the library
22+
1223
## [0.11.0](https://github.com/IBM/carbon-components-svelte/releases/tag/v0.11.0) - 2020-09-05
1324

1425
**Features**
@@ -21,7 +32,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2132

2233
- UI Shell: add Close/AppSwitcher as default icons for `HeaderAction` component (5f62cde)
2334
- ButtonSet: add `stacked` prop (c8e0a59)
24-
- Link: set `rel` attribute to "noopener noreferrer" if `target` is "_blank" (4b7d254)
35+
- Link: set `rel` attribute to "noopener noreferrer" if `target` is "\_blank" (4b7d254)
2536

2637
**Fixes**
2738

@@ -123,7 +134,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
123134

124135
## [0.8.0](https://github.com/IBM/carbon-components-svelte/releases/tag/v0.8.0) - 2020-07-19
125136

126-
- use $$restProps API (requires Svelte version >=3.20)
137+
- use \$\$restProps API (requires Svelte version >=3.20)
127138
- upgrade `carbon-icons-svelte` to version >=10.13.0
128139
- use svelte class:{value} API instead of `cx`
129140
- add ref prop to "interactive" components like text inputs, anchor links... ([Issue #196](https://github.com/IBM/carbon-components-svelte/issues/196))

COMPONENT_INDEX.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Component Index
22

3-
> 144 components exported from carbon-components-svelte 0.11.0
3+
> 144 components exported from carbon-components-svelte 0.12.0
44
55
- Accordion
66
- [AccordionSkeleton](#accordionskeleton)

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ The quickest way to get started is to customize a template from the [examples](e
2121

2222
Example set-ups demonstrate usage with popular application bundlers and frameworks. They feature a mix of Singe-page Applications (SPA), Server-side rendering (SSR) and statically exported approaches.
2323

24-
- **[rollup](examples/rollup/)**: SPA bundled using [Rollup](https://github.com/rollup/rollup)
25-
- **[rollup-typescript](examples/rollup-typescript/)**: SPA bundled using [Rollup](https://github.com/rollup/rollup) with TypeScript support
26-
- **[routify](examples/routify/)**: SPA + static export using [Routify](https://github.com/roxiness/routify)
27-
- **[sapper](examples/sapper/)**: SSR + static export using [Sapper](https://github.com/sveltejs/sapper)
28-
- **[svite](examples/svite/)**: SPA developed with Svite, bundled with [Rollup](https://github.com/rollup/rollup)
29-
- **[webpack](examples/webpack/)**: SPA bundled with [webpack](https://github.com/webpack/webpack)
24+
- **[examples/rollup](examples/rollup/)**: SPA bundled using [Rollup](https://github.com/rollup/rollup)
25+
- **[examples/rollup-typescript](examples/rollup-typescript/)**: SPA bundled using [Rollup](https://github.com/rollup/rollup) with TypeScript support
26+
- **[examples/routify](examples/routify/)**: SPA + static export using [Routify](https://github.com/roxiness/routify)
27+
- **[examples/sapper](examples/sapper/)**: SSR + static export using [Sapper](https://github.com/sveltejs/sapper)
28+
- **[examples/svite](examples/svite/)**: SPA developed with Svite, bundled with [Rollup](https://github.com/rollup/rollup)
29+
- **[examples/webpack](examples/webpack/)**: SPA bundled with [webpack](https://github.com/webpack/webpack)
3030

3131
### Scaffolding
3232

docs/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,4 +78,4 @@ Build and deploy the app:
7878
yarn build
7979
ibmcloud target --cf
8080
ibmcloud cf push
81-
```
81+
```

docs/cypress/integration/Button.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,7 @@ describe("Button", () => {
44
});
55

66
it("clicks", () => {
7-
cy.get(".bx--btn--primary")
8-
.first()
9-
.as("btn")
10-
.contains("Primary button");
7+
cy.get(".bx--btn--primary").first().as("btn").contains("Primary button");
118

129
cy.get("@btn").trigger("click");
1310
cy.get("@log").should("be.calledWith", "click");

docs/cypress/plugins/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@
1818
module.exports = (on, config) => {
1919
// `on` is used to hook into various events Cypress emits
2020
// `config` is the resolved Cypress config
21-
}
21+
};

docs/src/service-worker.js

Lines changed: 58 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { timestamp, files, shell, routes } from '@sapper/service-worker';
1+
import { timestamp, files, shell, routes } from "@sapper/service-worker";
22

33
const ASSETS = `cache${timestamp}`;
44

@@ -7,76 +7,79 @@ const ASSETS = `cache${timestamp}`;
77
const to_cache = shell.concat(files);
88
const cached = new Set(to_cache);
99

10-
self.addEventListener('install', event => {
11-
event.waitUntil(
12-
caches
13-
.open(ASSETS)
14-
.then(cache => cache.addAll(to_cache))
15-
.then(() => {
16-
self.skipWaiting();
17-
})
18-
);
10+
self.addEventListener("install", (event) => {
11+
event.waitUntil(
12+
caches
13+
.open(ASSETS)
14+
.then((cache) => cache.addAll(to_cache))
15+
.then(() => {
16+
self.skipWaiting();
17+
})
18+
);
1919
});
2020

21-
self.addEventListener('activate', event => {
22-
event.waitUntil(
23-
caches.keys().then(async keys => {
24-
// delete old caches
25-
for (const key of keys) {
26-
if (key !== ASSETS) await caches.delete(key);
27-
}
21+
self.addEventListener("activate", (event) => {
22+
event.waitUntil(
23+
caches.keys().then(async (keys) => {
24+
// delete old caches
25+
for (const key of keys) {
26+
if (key !== ASSETS) await caches.delete(key);
27+
}
2828

29-
self.clients.claim();
30-
})
31-
);
29+
self.clients.claim();
30+
})
31+
);
3232
});
3333

34-
self.addEventListener('fetch', event => {
35-
if (event.request.method !== 'GET' || event.request.headers.has('range')) return;
34+
self.addEventListener("fetch", (event) => {
35+
if (event.request.method !== "GET" || event.request.headers.has("range"))
36+
return;
3637

37-
const url = new URL(event.request.url);
38+
const url = new URL(event.request.url);
3839

39-
// don't try to handle e.g. data: URIs
40-
if (!url.protocol.startsWith('http')) return;
40+
// don't try to handle e.g. data: URIs
41+
if (!url.protocol.startsWith("http")) return;
4142

42-
// ignore dev server requests
43-
if (url.hostname === self.location.hostname && url.port !== self.location.port) return;
43+
// ignore dev server requests
44+
if (
45+
url.hostname === self.location.hostname &&
46+
url.port !== self.location.port
47+
)
48+
return;
4449

45-
// always serve static files and bundler-generated assets from cache
46-
if (url.host === self.location.host && cached.has(url.pathname)) {
47-
event.respondWith(caches.match(event.request));
48-
return;
49-
}
50+
// always serve static files and bundler-generated assets from cache
51+
if (url.host === self.location.host && cached.has(url.pathname)) {
52+
event.respondWith(caches.match(event.request));
53+
return;
54+
}
5055

51-
// for pages, you might want to serve a shell `service-worker-index.html` file,
52-
// which Sapper has generated for you. It's not right for every
53-
// app, but if it's right for yours then uncomment this section
54-
/*
56+
// for pages, you might want to serve a shell `service-worker-index.html` file,
57+
// which Sapper has generated for you. It's not right for every
58+
// app, but if it's right for yours then uncomment this section
59+
/*
5560
if (url.origin === self.origin && routes.find(route => route.pattern.test(url.pathname))) {
5661
event.respondWith(caches.match('/service-worker-index.html'));
5762
return;
5863
}
5964
*/
6065

61-
if (event.request.cache === 'only-if-cached') return;
66+
if (event.request.cache === "only-if-cached") return;
6267

63-
// for everything else, try the network first, falling back to
64-
// cache if the user is offline. (If the pages never change, you
65-
// might prefer a cache-first approach to a network-first one.)
66-
event.respondWith(
67-
caches
68-
.open(`offline${timestamp}`)
69-
.then(async cache => {
70-
try {
71-
const response = await fetch(event.request);
72-
cache.put(event.request, response.clone());
73-
return response;
74-
} catch(err) {
75-
const response = await cache.match(event.request);
76-
if (response) return response;
68+
// for everything else, try the network first, falling back to
69+
// cache if the user is offline. (If the pages never change, you
70+
// might prefer a cache-first approach to a network-first one.)
71+
event.respondWith(
72+
caches.open(`offline${timestamp}`).then(async (cache) => {
73+
try {
74+
const response = await fetch(event.request);
75+
cache.put(event.request, response.clone());
76+
return response;
77+
} catch (err) {
78+
const response = await cache.match(event.request);
79+
if (response) return response;
7780

78-
throw err;
79-
}
80-
})
81-
);
81+
throw err;
82+
}
83+
})
84+
);
8285
});

examples/rollup-typescript/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ Starts the app in development mode.
2020

2121
### `yarn build`
2222

23-
Builds the app for production.
23+
Builds the app for production.

examples/rollup/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ Starts the app in development mode.
2020

2121
### `yarn build`
2222

23-
Builds the app for production.
23+
Builds the app for production.

examples/routify/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ Starts the app in development mode.
2020

2121
### `yarn build`
2222

23-
Builds the app for production.
23+
Builds the app for production.

0 commit comments

Comments
 (0)