diff --git a/plugins/sql/src/plugin.rs b/plugins/sql/src/plugin.rs index 24109ad4..48d2e241 100644 --- a/plugins/sql/src/plugin.rs +++ b/plugins/sql/src/plugin.rs @@ -348,7 +348,9 @@ impl Builder { drop(lock); app.manage(instances); - app.manage(Migrations(Mutex::new(self.migrations.take().unwrap_or_default()))); + app.manage(Migrations(Mutex::new( + self.migrations.take().unwrap_or_default(), + ))); Ok(()) }) diff --git a/plugins/websocket/examples/svelte-app/README.md b/plugins/websocket/examples/svelte-app/README.md index 7b1ba836..5fdf6998 100644 --- a/plugins/websocket/examples/svelte-app/README.md +++ b/plugins/websocket/examples/svelte-app/README.md @@ -1,4 +1,4 @@ -*Looking for a shareable component template? Go here --> [sveltejs/component-template](https://github.com/sveltejs/component-template)* +_Looking for a shareable component template? Go here --> [sveltejs/component-template](https://github.com/sveltejs/component-template)_ --- @@ -13,8 +13,7 @@ npx degit sveltejs/template svelte-app cd svelte-app ``` -*Note that you will need to have [Node.js](https://nodejs.org) installed.* - +_Note that you will need to have [Node.js](https://nodejs.org) installed._ ## Get started @@ -47,12 +46,11 @@ npm run build You can run the newly built app with `npm run start`. This uses [sirv](https://github.com/lukeed/sirv), which is included in your package.json's `dependencies` so that the app will work when you deploy to platforms like [Heroku](https://heroku.com). - ## Single-page app mode By default, sirv will only respond to requests that match files in `public`. This is to maximise compatibility with static fileservers, allowing you to deploy your app anywhere. -If you're building a single-page app (SPA) with multiple routes, sirv needs to be able to respond to requests for *any* path. You can make it so by editing the `"start"` command in package.json: +If you're building a single-page app (SPA) with multiple routes, sirv needs to be able to respond to requests for _any_ path. You can make it so by editing the `"start"` command in package.json: ```js "start": "sirv public --single" diff --git a/plugins/websocket/examples/svelte-app/public/global.css b/plugins/websocket/examples/svelte-app/public/global.css index bb28a941..d8d4fb96 100644 --- a/plugins/websocket/examples/svelte-app/public/global.css +++ b/plugins/websocket/examples/svelte-app/public/global.css @@ -1,63 +1,68 @@ -html, body { - position: relative; - width: 100%; - height: 100%; +html, +body { + position: relative; + width: 100%; + height: 100%; } body { - color: #333; - margin: 0; - padding: 8px; - box-sizing: border-box; - font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; + color: #333; + margin: 0; + padding: 8px; + box-sizing: border-box; + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, + Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; } a { - color: rgb(0,100,200); - text-decoration: none; + color: rgb(0, 100, 200); + text-decoration: none; } a:hover { - text-decoration: underline; + text-decoration: underline; } a:visited { - color: rgb(0,80,160); + color: rgb(0, 80, 160); } label { - display: block; + display: block; } -input, button, select, textarea { - font-family: inherit; - font-size: inherit; - -webkit-padding: 0.4em 0; - padding: 0.4em; - margin: 0 0 0.5em 0; - box-sizing: border-box; - border: 1px solid #ccc; - border-radius: 2px; +input, +button, +select, +textarea { + font-family: inherit; + font-size: inherit; + -webkit-padding: 0.4em 0; + padding: 0.4em; + margin: 0 0 0.5em 0; + box-sizing: border-box; + border: 1px solid #ccc; + border-radius: 2px; } input:disabled { - color: #ccc; + color: #ccc; } button { - color: #333; - background-color: #f4f4f4; - outline: none; + color: #333; + background-color: #f4f4f4; + outline: none; } button:disabled { - color: #999; + color: #999; } button:not(:disabled):active { - background-color: #ddd; + background-color: #ddd; } button:focus { - border-color: #666; + border-color: #666; } diff --git a/plugins/websocket/examples/svelte-app/public/index.html b/plugins/websocket/examples/svelte-app/public/index.html index 63cf2502..1e84363f 100644 --- a/plugins/websocket/examples/svelte-app/public/index.html +++ b/plugins/websocket/examples/svelte-app/public/index.html @@ -1,20 +1,17 @@ +
+ + - - - +