profile
viewpoint
Antony Jones antony Desirable Objects Ltd London, UK https://beyonk.com Chief Technical Officer @beyonk-adventures Previously CTA @vendigo-group. Creator of @vudash. Software Quality zealot. Agile fanatic. Open source obsessive

antony/alexa-hapi-tv-skill 3

Example Alexa skill to turn my TV on and off using HapiJS

antony/elasticsearch-grails-plugin 2

ElasticSearch grails plugin

antony/buildlight-milight 1

Use cheap led bulbs (LimitlessLED, MiLight) as build status indicators for CircleCI

antony/currentcost-monitor 1

Provides graphing and detailed logging from your CurrentCost CC128 energy usage meter.

antony/exclusion-plugin 1

Exclusion plugin for Jenkins

antony/akropolis-protocol 0

Pensions fund smart contracts protocol

antony/angucomplete-alt 0

Autocomplete Directive for AngularJS. A fork of Daryl Rowland's angucomplete (https://github.com/darylrowland/angucomplete) with some extra features.

antony/angular-json-editor 0

Directive to edit any JSON object in angular

antony/awesome 0

A curated list of delightful Svelte resources

Pull request review commentbeyonk-adventures/svelte-carousel

parse perPage prop

 	onMount(() => { 		controller = new Siema({ 			selector: siema,-			perPage,+			perPage: isNaN(perPage)? perPage: Number(perPage),

Ah right.

So I think we should probably handle this by saying typeof perPage === 'object' ? perPage : Number(perPage) - what do you reckon?

jokin

comment created time in 12 hours

Pull request review commentbeyonk-adventures/svelte-carousel

parse perPage prop

 	onMount(() => { 		controller = new Siema({ 			selector: siema,-			perPage,+			perPage: isNaN(perPage)? perPage: Number(perPage),

What's the purpose of checking perPage using isNaN?

I feel like this is defensive code when, if people try to pass a non-number, then we should just let the code error.

For instance, what if they pass a string like foo? We just want to try to parse it and throw, right?

jokin

comment created time in 13 hours

issue commentthgh/vercel-sapper

Error: The Serverless Function "index" is 60mb which exceeds the maximum size limit of 50mb

I'd be in favour of not including static files in the lambda ever. Rollup provides good support for importing images where required, so there's no good reason I can think of for them to be in the function.

JamieKieranMartin

comment created time in 19 hours

issue commentsveltejs/svelte

Transitions don't work on table row addition

Weirdly this is only with slide. Fade works as expected.

avimar

comment created time in 20 hours

delete branch sveltejs/sapper

delete branch : gh-735

delete time in 20 hours

pull request commentsveltejs/sapper

Add support for accessing host in preload and in page store

@talltyler It could be a useful feature, but please open a new issue to discuss it rather than necro-ing a year old PR

Conduitry

comment created time in 20 hours

pull request commentsveltejs/svelte

lint without any immediate changes

The CI failed? @antony

The CI can't possibly pass until https://github.com/sveltejs/eslint-config exists (i.e. is published to NPM)

antony

comment created time in 2 days

issue closedsveltejs/svelte

Deploying my app to github pages

I made a small svelte app WITHOUT using sapper and I want to deploy it to github pages. I can’t find out how to do this anywhere. Only with sapper. I also tried to add it but it didn’t work. I already have it in a github repository but I just can’t figure out how to make it work with github pages (or anywhere else, like heroku etc). I used the svelte template as the base of my project. It’s a school project and I’m already past the deadline so asking on here is pretty much my last hope. Does maybe anyone know how I can do it? I’m also on windows so an linux solutions don’t work either.

Here’s my repo (please don’t mind the german texts): https://github.com/SvenjaJeschke/bs-online-konferenz-tools

closed time in 2 days

SvenjaJeschke

issue commentsveltejs/svelte

Deploying my app to github pages

Github issues isn't the right place for support questions, please use the chat.

Your svelte application is compiled to the public directory of your repository, so you either need to tell github pages to serve the contents of public, or change public to something else in rollup.config.js

SvenjaJeschke

comment created time in 2 days

Pull request review commentsveltejs/svelte

lint without any immediate changes

 **/expected.js _output test/*/samples/*/output.js-node_modules

It's the default behaviour of eslint :)

antony

comment created time in 2 days

push eventsveltejs/eslint-config

Antony Jones

commit sha e0c1b4a3fede11320e48c6cd165e6a179da57348

change comma dangle to warn for first cut

view details

push time in 2 days

PR opened sveltejs/svelte

lint without any immediate changes

Second attempt at a lint config, this time with zero code changes (aside from removing a dead rule).

This should give us a good baseline to build a tighter, democratic lint config from. Currently there are 723 warnings which can be fixed by auto-linting (or manual fixing of the issues) - in a separate PR.

This PR depends on the release of https://github.com/sveltejs/eslint-config to work.

Before submitting the PR, please make sure you do the following

  • [ ] It's really useful if your PR relates to an outstanding issue, so please reference it in your PR, or create an explanatory one for discussion. In many cases features are absent for a reason.
  • [ ] This message body should clearly illustrate what problems it solves. If there are related issues, remember to reference them.
  • [ ] Ideally, include a test that fails without this PR but passes with it. PRs will only be merged once they pass CI. (Remember to npm run lint!)

Tests

  • [ ] Run the tests tests with npm test or yarn test)
+919 -331

0 comment

5 changed files

pr created time in 2 days

create barnchantony/svelte

branch : feature/eslint-config-baseline

created branch time in 2 days

delete branch antony/svelte

delete branch : feature/eslint-config

delete time in 2 days

PR closed sveltejs/svelte

Feature/eslint config

Provide common linting rules to the svelte project, based on the rules which existed only here, previously.

Note that this PR depends on the https://github.com/sveltejs/eslint-config project being published under @sveltejs/eslint-config first.

Before submitting the PR, please make sure you do the following

  • [x] It's really useful if your PR relates to an outstanding issue, so please reference it in your PR, or create an explanatory one for discussion. In many cases features are absent for a reason.
  • [x] This message body should clearly illustrate what problems it solves. If there are related issues, remember to reference them.
  • [x] Ideally, include a test that fails without this PR but passes with it. PRs will only be merged once they pass CI. (Remember to npm run lint!)

Tests

  • [x] Run the tests tests with npm test or yarn test)
+1613 -1008

3 comments

223 changed files

antony

pr closed time in 2 days

pull request commentsveltejs/svelte

Feature/eslint config

You're right @benmccann - I had thought I was just fixing the semis rule here but it looks like a bunch of other changes were made. I'm closing this and opening a new PR without any code changes.

antony

comment created time in 2 days

issue commentbeyonk-adventures/svelte-mapbox

Cannot find module

Done - https://github.com/beyonk-adventures/svelte-mapbox/commit/b9f623c82e747006045bf029113efc6bf1457eb0

It's important that you understand that this applies to any library you use with Svelte/Sapper. You do not need runtime dependencies except in very specific circumstances.

mehdiraized

comment created time in 2 days

push eventbeyonk-adventures/svelte-mapbox

Antony Jones

commit sha b9f623c82e747006045bf029113efc6bf1457eb0

Make readme very clear

view details

push time in 2 days

issue closedbeyonk-adventures/svelte-mapbox

Cannot find module

Error: Cannot find module '/front/node_modules/@beyonk/svelte-mapbox/index.mjs'. Please verify that the package.json has a valid "main" entry

at tryPackage (internal/modules/cjs/loader.js:322:19)
    at Function.Module._findPath (internal/modules/cjs/loader.js:683:18)
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:953:27)
    at Function.Module._load (internal/modules/cjs/loader.js:842:27)
    at Module.require (internal/modules/cjs/loader.js:1026:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at Object.<anonymous> (/front/__sapper__/dev/server/server.js:24:20)
    at Module._compile (internal/modules/cjs/loader.js:1138:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
    at Module.load (internal/modules/cjs/loader.js:986:32) {
  code: 'MODULE_NOT_FOUND',
  path: '/front/node_modules/@beyonk/svelte-mapbox/package.json',
  requestPath: '@beyonk/svelte-mapbox'

closed time in 2 days

mehdiraized

issue commentbeyonk-adventures/svelte-mapbox

Cannot find module

Duplicate of #1 and #3

mehdiraized

comment created time in 2 days

issue commentbeyonk-adventures/svelte-mapbox

Cannot find module

You need to ensure you're installing as a development dependency:

npm install --save-dev @beyonk/svelte-mapbox

mehdiraized

comment created time in 2 days

issue commentbeyonk-adventures/svelte-mapbox

Cannot find module

@mehdiraized please post your rollup config, details about how you installed the module, details about how you're importing the module into your project etc

mehdiraized

comment created time in 2 days

issue commentbeyonk-adventures/svelte-mapbox

Cannot find module

@mehdiraized without knowing anything about how you are trying to bundle this into your application, I can't help you.

Please let me know if you are using Rollup or Webpack or Parcel, what stack you are using, etc

mehdiraized

comment created time in 2 days

issue commentthgh/vercel-sapper

Update demo

@benmccann happy to update the demo / accept a PR to update it.

benmccann

comment created time in 2 days

issue commentthgh/vercel-sapper

Error! The property `builds` is not allowed in vercel.json – please remove it.

still working for me too. builds has been deprecated for a while.

adnansmajlovic

comment created time in 2 days

pull request commentsveltejs/svelte

Feature/eslint config

I've upgraded the various eslint plugins to their latest versions, and turned off all the new rules. I've also removed rules which were declared twice with different config, used the most strict, and made them into warnings - right now there are ~300 warnings about indentation, which can be easily fixed, but I didn't want to muddy the PR with all the lint changes.

The first candidates for rule changes should be the new TS rules + the warnings, once this is merged.

antony

comment created time in 2 days

push eventsveltejs/eslint-config

Antony Jones

commit sha b6ac331fc72c471559e0dc86aca8f9d51d94d3c8

upgrade typescript plugin

view details

Antony Jones

commit sha aeae3103910e84e1573a70f2c07835140f5362c9

declare peer dependencies

view details

push time in 2 days

push eventantony/svelte

Antony Jones

commit sha 589a9f4cd09aa9fab8b97b85fe9e3f78231da61a

upgrade eslint plugins, turn off new rules, convert errors to warnings

view details

push time in 2 days

pull request commentsveltejs/svelte

Feature/eslint config

Once eslint-config is published, it can be installed here as a devDep

antony

comment created time in 2 days

PR opened sveltejs/svelte

Feature/eslint config

Provide common linting rules to the svelte project, based on the rules which existed only here, previously.

Note that this PR depends on the https://github.com/sveltejs/eslint-config project being published under @sveltejs/eslint-config first.

Before submitting the PR, please make sure you do the following

  • [ ] It's really useful if your PR relates to an outstanding issue, so please reference it in your PR, or create an explanatory one for discussion. In many cases features are absent for a reason.
  • [ ] This message body should clearly illustrate what problems it solves. If there are related issues, remember to reference them.
  • [ ] Ideally, include a test that fails without this PR but passes with it. PRs will only be merged once they pass CI. (Remember to npm run lint!)

Tests

  • [ ] Run the tests tests with npm test or yarn test)
+387 -462

0 comment

211 changed files

pr created time in 2 days

create barnchantony/svelte

branch : feature/eslint-config

created branch time in 2 days

push eventsveltejs/eslint-config

Antony Jones

commit sha 6f8dad99492ba362d8d017d342723883e943c82e

working lint config

view details

push time in 2 days

push eventantony/svelte

Tan Li Hau

commit sha 7834ca3c5badb8f4833bdcf59623cbc27195b3ff

fix slot with context overflow + without let (#4862)

view details

Richard Harris

commit sha 25488772e2a4f96c252a98d1b912b7363b15a1d9

update changelog

view details

Ben McCann

commit sha 745c7778060eebc77e38f5d33fac804473d33172

site: move .dev TLD info from FAQ to readme (#4883)

view details

Matt Wolff

commit sha 97db5cc7f73c97b7a94f4fa5ee8a0a28978e65bc

docs: add blur to list of svelte/transition exports

view details

Daniel Imfeld

commit sha f624d6e292e6cf960200ba9ae42e3d5fdf7d7003

docs: `value` cannot be set via spread for indirectly bound values (#4832)

view details

Tan Li Hau

commit sha e34f2088434423914bbc91b84a450a7f7477252b

reselect <select> when the option values change (#4885)

view details

Alessandro (Ale) Segala

commit sha 81b6c0b9863cf4b68a01416c43ed8aca651f1a97

docs: adjust readable store example (#4903)

view details

Ben McCann

commit sha d61a7a0b95f7410e5247f182ac50103c8277d0f4

run unit tests on Windows and macOS (#4908)

view details

Tan Li Hau

commit sha 24ef4e1181dc4a497f86d57d396209350825fdeb

set select multiple value with spread (#4894)

view details

Rich Harris

commit sha 3330c3fbab56c1713a0f096922e288e395059eb9

only add event listeners when a block is first mounted (#4860)

view details

Tan Li Hau

commit sha 11967804afbf748d92cfaa93f467ec83ae702ef1

fix reactivity when binding to each context (#4878)

view details

Rich Harris

commit sha b0377cc4e4dbb2b45d141fb2c0eee1f250bac50e

fix `{@html}` assuming it lives inside a <div> (#4863)

view details

Conduitry

commit sha f46b38a3089f0bd88ed645773f4618be94f0f330

-> v3.23.0

view details

Ben McCann

commit sha 4124ec535eddc2a519b210e948028aaaac36e40d

site: update FAQ to point to svelte-check (#4916)

view details

pushkin

commit sha 0da70f46b9cf8f702c6d50ba030939362be17ee5

handle line ending differences in tests (#4915)

view details

Roman Kosov

commit sha a4dadf82be8c5b13915241d6d3999dd54e75e2d4

site: fix some mixed content (#4926)

view details

push time in 2 days

fork antony/template

Template for building basic applications with Svelte

fork in 2 days

issue commentbeyonk-adventures/gdpr-cookie-consent-banner

React version?

Hi @ilPas

You can use the package with React by following the Javascript instructions in the README. I'm afraid I don't use React so I can't give any more specific instructions.

ilPas

comment created time in 3 days

pull request commentsveltejs/sapper

Add example for importing client-side library

I think importing a svelte component with async imports is a bad example, because it encourages a pattern where people lazily write non-ssr compatible components, and then leave it to the consumer to async import them to work around the fact they're not ssr compatible.

The ideal solution in this scenario is to tell the author to make their component SSR compatible, or fork it and do it yourself.

I feel very uncomfortable about adding workarounds for low quality third-party components into the official documentation.

The quill example is fine - except the example isn't written ideally - don't reference element IDs, simplify the import syntax, and don't have the Quill variable declared outside of onMount (since it doesn't need to be):

<script>
	import {onMount} from 'svelte'
       let editor
	
	onMount(async() => {
		const { default: Quill } = await import('quill')
		new Quill(editor)
	})
</script>

<div bind:this={editor}></div>
mateomorris

comment created time in 3 days

issue closedsveltejs/svelte

Keyed {#each} block inside {#await}

Not sure if this is a bug but looks like the key in each block doesn't help much in await block

{#await promise}
    Loading
{:then arr}
    {#each arr as item (item.id)}
        <div>hello</div
    {/each}
{/await}

I had animation in hello div and it starts all over again on all items when I reassign the promises value. When I tried with just each block and the async code in script tags, only the added item got rerendered.

closed time in 3 days

edreal

issue commentsveltejs/svelte

Keyed {#each} block inside {#await}

Hi @edreal

Please use the issue template, and provide a REPL example for your issue so that we can investigate the cause of your issue. The code you have supplied isn't valid code.

edreal

comment created time in 3 days

issue closedsveltejs/svelte

Variable toggled during transition doesn't update from within {#if}

Description

A variable that's toggled on a transition event within an {#if} statement falls out of sync.

  • Within an {#if} statement, I have an element with transition:fade.
  • There are several transition events firing on this element. These events update a variable while the element transitions, in particular on:outrostart and on:outroend.
  • These variables update normally outside the {#if} statement, but not within it, thus they become out of sync.

To Reproduce

Here it is inside of a REPL

Expected behavior

Given the class directive on line 20 of the REPL and the status message on line 24, I expect there to be a background: red on the element while it is transitioning out. I also expect for status to remain in sync / never to read as both true and false.

closed time in 3 days

mattwolff

pull request commentsveltejs/template

translation into Korean

This is great, but I'm not exactly sure what we would do with this right now. Leaving open until we have a concrete plan for offering multi-language template solutions. Ideas welcome.

katanazero86

comment created time in 4 days

issue closedsveltejs/template

Run dev as HTTPS

Pages behave differently in subtle ways when you serve them over HTTPS versus HTTP. Because most apps will eventually be deployed as HTTPS, it’s helpful to configure all of your development and test environments with HTTPS as well.

This is all possible today. However, it requires an extra lift to generate keys and an even a potentially more complicated process to get self-signed keys to be automatically trusted by the browser. There are several ways to do this with various not-so-attractive tradeoffs.

I’ve got a PoC working on my local development environment of the fewest moving parts that I’ve come across. It uses mkcert to generate keys for localhost (or any other hostname) using a trusted certificate authority that it also creates. It’s not yet production ready because it relies on a prerelease version of livereload to open the WebSocket over HTTPS as well.

This issue is mostly to judge whether there’s interest in this. If so, I could put together a PR, and probably queue that up for after livereload@1.0.0 is released.

closed time in 4 days

jmakeig

issue commentsveltejs/template

Run dev as HTTPS

@jmakeig oddly enough a lot of production sites run as HTTP, and then offload certificate handling and SSL to a router / webserver / gateway at the edge.

I think running in HTTPS is out of scope for this template, and IMHO out of scope for this very simplistic template.

However, I have seen this question asked a few times, and I know that using Facebook SSO locally requires running in HTTPS mode (albeit briefly), so I would strongly encourage you ro, rather than open a PR here, create a recipe over at https://github.com/svelte-society/recipes-mvp where we are building a repository of useful things like this.

jmakeig

comment created time in 4 days

issue closedsveltejs/template

Example of babel integration

Can we get an example of how to use babel with the svelte template?

Try as I may, I can't get transforms to work correctly on all the bundle code and polyfills are none existent as well. I'm sure it's some configuration issue, but having an example to work from would be great for the community.

closed time in 4 days

bgreater

issue closedsveltejs/template

Would there be any advantage in upgrading to Rollup 2?

I see there are breaking changes but also apparently some goodies too.

closed time in 4 days

SteveALee

issue commentsveltejs/svelte

destroy function returned from onMount is not called if onMount is passed an async function

@tanhauhau I'm not sure I agree. Using an async function in onMount is a common use-case (for example, we tell people to use await import there for client-side only libraries in Sapper.

What I believe should happen is the Svelte compiler should, when a promise is passed to onMount, realise that a promise has been passed, and await the result of the function to be used as the onDestroy function.

i.e, it should behave the exact same way for an async function as it does for a non-async function (if this is possible)

frederikhors

comment created time in 4 days

issue commentsveltejs/svelte

Async onMount or a valid alternative?

@frederikhors I'm pretty sure this is a bug. It seems that if you use an async function then onDestroy is not properly wired up.

I'm going to rename this issue for you and mark it as a bug.

frederikhors

comment created time in 4 days

push eventsveltejs/eslint-config

Antony Jones

commit sha b40b1a3433f7f234f418c8c3b5f0687d8431333a

add rules from svelte/.eslintrc

view details

push time in 4 days

pull request commentsveltejs/svelte

Disable "one-var" lint rule

@pushkine it's way, way more readable to have the one-var rule.

We're building a repository to hold lint rules, with a democratic voting system for deciding what they are, so don't worry about changing them for now.

pushkine

comment created time in 4 days

PR closed sveltejs/svelte

Disable "one-var" lint rule

Code_2020-05-29_12-32-03 I just don't think it's necessary, maybe I'm missing something ?

+1 -1

1 comment

1 changed file

pushkine

pr closed time in 4 days

issue closedsveltejs/component-template

Storybook implementation

As the main goal of this template is tool publish independent components, it would be a great addition to ship a ready-to-use storybook implementation on it.

Ref: https://storybook.js.org/

It may be optional on setup with a command or an indication on the documentation to properly remove it.

closed time in 4 days

soullivaneuh

issue commentsveltejs/component-template

Storybook implementation

@soullivaneuh Whilst storybook is great, it's too much complexity for this simple component template. The Storybook docs demonstrate how to set it up for those who want it.

There is also a project called Svench which aims to be a much more lightweight alternative to Storybook, and I can see this being another good option when it becomes stable.

soullivaneuh

comment created time in 4 days

Pull request review commentsveltejs/component-template

feat: add ava setup

+import test from 'ava';+import Component from '@/Component.svelte';++test('validate component', t => {+  const target = document.createElement('div');+  const app = new Component({+    target+  });+  t.snapshot(target);+  t.is(typeof app.$$, 'object');+  t.is(typeof app.$$.props, 'object');+  t.is(typeof app.$$.on_mount, 'object');+  t.is(typeof app.$$.on_destroy, 'object');+  t.is(typeof app.$$.before_update, 'object');+  t.is(typeof app.$$.after_update, 'object');

I think this in itself would be a problem for a future PR. Demonstrating testing by writing an incorrect test isn't a very good demonstration.

It might be preferable to add just enough content to the example component that a test makes sense.

vinayakkulkarni

comment created time in 4 days

pull request commentsveltejs/template

Bump rollup to v2.x

I think there is some extra work involved in getting rollup2 support. See the commit where Rollup2 support was added to the Sapper template

himynameisdave

comment created time in 4 days

Pull request review commentsveltejs/component-template

feat: add ava setup

+module.exports = {+  env: {+    test: {+      presets: [+        [+          '@babel/preset-env',+          {+            targets: {+              node: 'current',+            },+          },+        ],+      ],+      plugins: [+        [+          'module-resolver',+          {+            root: ['./'],+            alias: {+              '@': './src',

This isn't the way we encourage people to reference local components. See the documentation about src/node_modules

vinayakkulkarni

comment created time in 4 days

Pull request review commentsveltejs/component-template

feat: add ava setup

+import test from 'ava';+import Component from '@/Component.svelte';++test('validate component', t => {+  const target = document.createElement('div');+  const app = new Component({+    target+  });+  t.snapshot(target);+  t.is(typeof app.$$, 'object');+  t.is(typeof app.$$.props, 'object');+  t.is(typeof app.$$.on_mount, 'object');+  t.is(typeof app.$$.on_destroy, 'object');+  t.is(typeof app.$$.before_update, 'object');+  t.is(typeof app.$$.after_update, 'object');

I don't think there's any value in encouraging component authors to write test validating if the Svelte compiler works correctly.

vinayakkulkarni

comment created time in 4 days

pull request commentsveltejs/component-template

feat: add ava setup

Hi @vinayakkulkarni Thanks for this,

However, ava (whilst good) is a pretty niche choice for testing framework. It might be better to raise such ideas as issues first so that they can be discussed by users + maintainers to see if the idea is on the right track, before putting all the work in.

I'll leave this open so that others can weigh in, but personally I'm undecided if I'd prefer to see ava support vs something like mocha or equivalent which might be familiar to more users.

vinayakkulkarni

comment created time in 4 days

pull request commentsveltejs/sapper

docs: Update "deployments using Vercel (formerly ZEIT Now)" (#1195)

@antony where did you find the info about now v1 ending on August 7th 2020?

They told me a few months ago.

However I was just reminded of the exact date as I run a v1 app, and there is a big fat banner on the site when you log in.

diverent2

comment created time in 4 days

push eventdiverent2/sapper

Antony Jones

commit sha 74bd7c9936daaebaacf9677abbb9077cf301961d

Apply suggestions from code review Removed now v1 info, as it won't even exist after August 7th 2020

view details

push time in 4 days

Pull request review commentsveltejs/sapper

docs: Update "deployments using Vercel (formerly ZEIT Now)" (#1195)

 title: Deployment  Sapper apps run anywhere that supports Node 8 or higher. +### Deploying to Vercel ([formerly ZEIT Now](https://vercel.com/blog/zeit-is-now-vercel)) -### Deploying to Now+#### Using Vercel -> This section relates to Now 1, not Now 2+We can use an unoffical third-party libary like [vercel-sapper](https://www.npmjs.com/package/vercel-sapper) builder to deploy our projects to [Vercel] and even use our sapper runtime environment there. -We can very easily deploy our apps to [Now][]:+Visit the corresponding github repository of [vercel-sapper](https://github.com/thgh/vercel-sapper#readme) builder for implementation details and bug reports regarding [Vercel] deployments. -```bash-npm install -g now-now-```--This will upload the source code to Now, whereupon it will do `npm run build` and `npm start` and give you a URL for the deployed app.--For other hosting environments, you may need to do `npm run build` yourself.+> Note about Now v1+>+> Now v1 is deprecated and using it should be avoided, see [this comment](https://github.com/zeit/now/issues/1805#issuecomment-452470953).  +> If you are still running v1 consider upgrating to the newest version.
diverent2

comment created time in 4 days

Pull request review commentsveltejs/sapper

docs: Update "deployments using Vercel (formerly ZEIT Now)" (#1195)

 title: Deployment  Sapper apps run anywhere that supports Node 8 or higher. +### Deploying to Vercel ([formerly ZEIT Now](https://vercel.com/blog/zeit-is-now-vercel)) -### Deploying to Now+#### Using Vercel -> This section relates to Now 1, not Now 2+We can use an unoffical third-party libary like [vercel-sapper](https://www.npmjs.com/package/vercel-sapper) builder to deploy our projects to [Vercel] and even use our sapper runtime environment there. -We can very easily deploy our apps to [Now][]:+Visit the corresponding github repository of [vercel-sapper](https://github.com/thgh/vercel-sapper#readme) builder for implementation details and bug reports regarding [Vercel] deployments. -```bash-npm install -g now-now-```--This will upload the source code to Now, whereupon it will do `npm run build` and `npm start` and give you a URL for the deployed app.--For other hosting environments, you may need to do `npm run build` yourself.+> Note about Now v1+>+> Now v1 is deprecated and using it should be avoided, see [this comment](https://github.com/zeit/now/issues/1805#issuecomment-452470953).  
diverent2

comment created time in 4 days

Pull request review commentsveltejs/sapper

docs: Update "deployments using Vercel (formerly ZEIT Now)" (#1195)

 title: Deployment  Sapper apps run anywhere that supports Node 8 or higher. +### Deploying to Vercel ([formerly ZEIT Now](https://vercel.com/blog/zeit-is-now-vercel)) -### Deploying to Now+#### Using Vercel -> This section relates to Now 1, not Now 2+We can use an unoffical third-party libary like [vercel-sapper](https://www.npmjs.com/package/vercel-sapper) builder to deploy our projects to [Vercel] and even use our sapper runtime environment there. -We can very easily deploy our apps to [Now][]:+Visit the corresponding github repository of [vercel-sapper](https://github.com/thgh/vercel-sapper#readme) builder for implementation details and bug reports regarding [Vercel] deployments. -```bash-npm install -g now-now-```--This will upload the source code to Now, whereupon it will do `npm run build` and `npm start` and give you a URL for the deployed app.--For other hosting environments, you may need to do `npm run build` yourself.+> Note about Now v1+>
diverent2

comment created time in 4 days

Pull request review commentsveltejs/sapper

docs: Update "deployments using Vercel (formerly ZEIT Now)" (#1195)

 title: Deployment  Sapper apps run anywhere that supports Node 8 or higher. +### Deploying to Vercel ([formerly ZEIT Now](https://vercel.com/blog/zeit-is-now-vercel)) -### Deploying to Now+#### Using Vercel -> This section relates to Now 1, not Now 2+We can use an unoffical third-party libary like [vercel-sapper](https://www.npmjs.com/package/vercel-sapper) builder to deploy our projects to [Vercel] and even use our sapper runtime environment there. -We can very easily deploy our apps to [Now][]:+Visit the corresponding github repository of [vercel-sapper](https://github.com/thgh/vercel-sapper#readme) builder for implementation details and bug reports regarding [Vercel] deployments. -```bash-npm install -g now-now-```--This will upload the source code to Now, whereupon it will do `npm run build` and `npm start` and give you a URL for the deployed app.--For other hosting environments, you may need to do `npm run build` yourself.+> Note about Now v1
diverent2

comment created time in 4 days

issue commentsveltejs/svelte

Feature request: multiple css class with one variable

You can do it however you like, I personally don't like using Javascript to add the classes, and would just use multiple class:className directives. But what I'd really do is use mixins, and it is in fact exactly how I do it myself.

The suggestion you are making is a workaround for a shortcoming/flaw in the way you are using CSS (or the way bootstrap works, however you want to see it), so we don't intend to provide a workaround for this as part of Svelte core.

Your final option is to write a Svelte action - see actions in the docs, to add this functionality yourself. This is a good option if you really don't want to use mixins/write your own classes.

If you want to discuss this further, please do so in the chat, not here on github issues.

lingtalfi

comment created time in 4 days

issue commentsveltejs/svelte

Feature request: multiple css class with one variable

have a look at SCSS + SCSS Mixins in google to understand what I mean. For more help come and chat to us

lingtalfi

comment created time in 4 days

issue closedsveltejs/sapper

TypeError: node.parentNode is null

Hello.

I have a navigation bar that activates different components. When I execute an action on a component (for example, delete an item) and click on another tab, the component is not displayed and I get the following error TypeError: node.parentNode is null in Firefox browser.

Thanks.

closed time in 4 days

JhojanFlp

issue commentsveltejs/sapper

TypeError: node.parentNode is null

@JhojanFlp please read and use the issue template so that we can help you.

JhojanFlp

comment created time in 4 days

issue commentrixo/svench

There is a problem with cli.js in routix

I got a similar issue trying to install svench from fresh into an existing project of mine:

npm install -D svench                                                                08:58:49 
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.11 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.11: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! code ENOENT
npm ERR! syscall chmod
npm ERR! path /home/ant/Projects/beyonk-shared/node_modules/routix/cli.js
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, chmod '/home/ant/Projects/beyonk-shared/node_modules/routix/cli.js'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent 

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/ant/.npm/_logs/2020-05-29T07_59_43_722Z-debug.log
Wolfr

comment created time in 4 days

issue closedsveltejs/svelte

IE11 and `disabled` attribute

On IE11 it seems that the disabled attribute doesn't quite work as intended.

If I have a button

<button {disabled}>click me</button>

with disabled = true it gets rendered as:

<button disabled="true">click me</button>

with disabled = false it gets rendered as:

<button disabled="false">click me</button>

...and the button stays disabled.

The correct behavior would be to remove the attribute altogether.

Hard to demostrate, since the REPL doesn't work on IE11.

closed time in 4 days

arggh

issue commentsveltejs/svelte

IE11 and `disabled` attribute

I really can't reproduce this.

I've created a quick example app at https://ie11-disabled.now.sh and I've included the source (with buble, and polyfills) at https://github.com/antony/svelte-template-ie11-edge if you want to try to see if you can replicate the original issue. I'll re-open if so.

arggh

comment created time in 4 days

create barnchantony/svelte-template-ie11-edge

branch : master

created branch time in 4 days

created repositoryantony/svelte-template-ie11-edge

A template / boilerplate for Svelte which works on IE11 and old Edge (Polyfills, buble)

created time in 4 days

issue closedsveltejs/svelte

Feature request: multiple css class with one variable

Hi, I'm trying to create a bootstrap version of my svelte widget. It comes down to adding the "btn btn-primary" class to a button.

The solution I hoped would have worked was this:

        <button
                    class="btn-add-file"
                    class:"btn btn-primary"={options.useBootstrap}
            >click me</button>

Unfortunately, it doesn't. The current things that work is this:

        <button
                    class="btn-add-file"
                    class:btn={options.useBootstrap}
                    class:btn-primary={options.useBootstrap}
            >click me</button>

That's one more line.

This is not very important, but I noticed it and wanted to share my feedback that's all.

Also, bootstrap usually adds variants by adding classes, so for instance with buttons, we have multiple variants, which would lead to something like this for instance:

        <button
                    class="btn-add-file"
                    class:btn={options.useBootstrap}
                    class:btn-primary={options.useBootstrap}
                    class:btn-small={options.useBootstrap}
            >click me</button>

closed time in 4 days

lingtalfi

issue commentsveltejs/svelte

Feature request: multiple css class with one variable

Hi @lingtalfi

Thanks for your feedback. As you have seen, the class directive is designed to add a single class at a time. The goal of the class directive is to allow you to add/toggle/remove css classes programatically.

The fact you need to add multiple classes to style an element is more of a shortcoming of your CSS setup / css framework. If you find yourself having to add a lot of classes to style an object, you should consider using a mixin approach to your CSS where you can have a single class which "mixes in" various styles in your CSS, rather than trying to append each of the classes to your element directly. I don't know if bootstrap supports this directly, but there are libraries like tailwind which I believe do.

This issue has been raised before, and for the reasons above, there is no intention / desire to add multiple class support for the reasons discussed above.

lingtalfi

comment created time in 4 days

push eventdiverent2/sapper

Antony Jones

commit sha ba08b5b6d84b25207fe6a5e76fb86283d51d54d1

Update site/content/docs/11-deploying.md

view details

push time in 4 days

push eventdiverent2/sapper

Antony Jones

commit sha adcafb66a9a5019259505efce5c4788fb0cbbb51

Update site/content/docs/11-deploying.md

view details

push time in 4 days

Pull request review commentsveltejs/sapper

docs: Update "deployments using Vercel (formerly ZEIT Now)" (#1195)

 Then you can set it using the environment variable, e.g.: SAPPER_TIMESTAMP=$(date +%s%3N) npm run build ``` -When deploying to [Now][], you can pass the environment variable into Now itself:+When deploying to [Vercel], you can pass the environment variable into Now itself:
When deploying to [Vercel], you can pass the environment variable into the Vercel cli tool itself:
diverent2

comment created time in 4 days

Pull request review commentsveltejs/sapper

docs: Update "deployments using Vercel (formerly ZEIT Now)" (#1195)

 title: Deployment  Sapper apps run anywhere that supports Node 8 or higher. +### Deploying to Vercel ([formerly ZEIT Now](https://vercel.com/blog/zeit-is-now-vercel)) -### Deploying to Now+#### Using Now v2
#### Using Vercel
diverent2

comment created time in 4 days

push eventsveltejs/eslint-config

Antony Jones

commit sha a873831453b34ecd4d9a989ab09998a32d6cd235

make label name consistent

view details

push time in 4 days

push eventsveltejs/eslint-config

Antony Jones

commit sha 583590acf8526c02c3f52194a5c588ff7b253322

move package to sveltejs namespace

view details

push time in 4 days

push eventsveltejs/eslint-config

Antony Jones

commit sha 66f362c0fa845da0f770f8bbe3c7aff4b113c00b

dependency cleanup

view details

push time in 4 days

push eventsveltejs/eslint-config

Antony Jones

commit sha 6a7cfefdb5efeba3b5009d353e524f265f1f76ba

remove standard badge

view details

push time in 4 days

push eventsveltejs/eslint-config

Antony Jones

commit sha d1e44dab45c6853da3ff6760568eddc82ab9888f

base rules

view details

push time in 4 days

push eventsveltejs/eslint-config

Antony Jones

commit sha 83da976f63ced0214c5148eeae34601a15ffb917

Baseline readme

view details

push time in 4 days

Pull request review commentsveltejs/sapper

Add docs for --legacy flag

 The output is a Node app that you can run from the project root:  ```bash node __sapper__/build-```\ No newline at end of file+```++### Browser support++By default, Sapper builds your site only for the latest versions of modern evergreen browsers.++If you are using Rollup, you can use the `--legacy` flag to build two bundles: one for modern browsers and one for legacy browsers like Internet Explorer. Sapper will then serve up the correct bundle at runtime.++You may wish to add this flag to a script in your `package.json`:+```+  "scripts": {+    "build": "sapper build --legacy",+  },+```++You will also need to polyfill APIs that are not present in older browsers.
[1] You will also need to polyfill APIs that are not present in older browsers.
[2] Browsers which do not support `async/await` syntax will be served the legacy bundle
benmccann

comment created time in 4 days

Pull request review commentsveltejs/sapper

Add docs for --legacy flag

 The output is a Node app that you can run from the project root:  ```bash node __sapper__/build-```\ No newline at end of file+```++### Browser support++By default, Sapper builds your site only for the latest versions of modern evergreen browsers.++If you are using Rollup, you can use the `--legacy` flag to build two bundles: one for modern browsers and one for legacy browsers like Internet Explorer. Sapper will then serve up the correct bundle at runtime.
If you are using Rollup, you can use the `--legacy` flag to build two bundles: one for modern browsers and one for legacy browsers like Internet Explorer[1]. Sapper will then serve up the correct bundle[2] at runtime.
benmccann

comment created time in 4 days

startedtensorflow/tfjs-models

started time in 5 days

issue closedbeyonk-adventures/svelte-carousel

Dots option not working

I cannot deactivate the dots. I've installed the latest version of svelte-carousel:

npm list @beyonk/svelte-carousel
svelte-components
└── @beyonk/svelte-carousel@2.4.0 

But seems the markup is not up to date to what i can see in this repo. Here you are the component source in node_modules:

<div class="carousel">
	<button class="left" on:click={left}>
		<slot name="left-control"></slot>
	</button>
	<div class="slides" bind:this={siema}>
		<slot></slot>
	</div>
	<ul>
		{#each pips as pip, i}
		<li on:click={() => go(i)} class={currentIndex === i ? "active" : ""}></li>
		{/each}
	</ul>
	<button class="right" on:click={right}>
		<slot name="right-control"></slot>
	</button>
</div>

Can you check it?

closed time in 5 days

CarloAntenucci

issue commentbeyonk-adventures/svelte-carousel

Dots option not working

This was merged but not released - it has now been released in 2.5.0

CarloAntenucci

comment created time in 5 days

created tagbeyonk-adventures/svelte-carousel

tagv2.5.0

A super lightweight, super simple Carousel for Svelte 3

created time in 5 days

push eventbeyonk-adventures/svelte-carousel

Antony Jones

commit sha 66943ec02bd8721477337b7587b519b86acc9219

2.5.0

view details

push time in 5 days

delete branch antony/sapper

delete branch : feature/pushstate-on-successful-navigation

delete time in 5 days

PR closed sveltejs/sapper

Feature/pushstate on successful navigation

This is a tentative fix for https://github.com/sveltejs/sapper/issues/829 - it seems to work but I am not in a position to assess the full impact of the change, or if there are edge cases I have missed.

WIP as I've just noticed failing tests that I need to fix.

Before submitting the PR, please make sure you do the following

  • [ ] It's really useful if your PR relates to an outstanding issue, so please reference it in your PR, or create an explanatory one for discussion. In many cases features are absent for a reason.
  • [ ] This message body should clearly illustrate what problems it solves. If there are related issues, remember to reference them.
  • [ ] Ideally, include a test that fails without this PR but passes with it. PRs will only be merged once they pass CI. (Remember to npm run lint!)

Tests

  • [ ] Run the tests tests with npm test or yarn test)
+8 -4

1 comment

2 changed files

antony

pr closed time in 5 days

issue closedsveltejs/sapper

Clicking two links in rapid succession causes the entire site to break

Describe the bug When performing non-trivial tasks in a preload method, it is possible to click two links in quick succession before the page/view, which results in completely, irrecoverably breaking the Sapper site (other than full reload of the page)

To Reproduce Use the repository at https://github.com/beyonk-adventures/sapper-preload-pushstate-issue

  1. Visit the homepage, and click any link. Preload takes 5 seconds.
  2. During this five second delay you should click some other links on the page.
  3. Notice in the browser console, each consecutive click results in the page loading but the actual detach of the dom node is abandoned since a new route change has taken place.
  4. Notice the URL in your browser (pushstate) changing regardless
  5. Let the next page finally load.
  6. When the word page shows up, hit back, you will notice the url changes to one of the abandoned requests
  7. Notice that the word on the page you are looking at no longer relates to the word in the status bar - the page has entered a "broken" state.

Expected behavior

  1. Hitting back should probably result in each of the previous of abandoned pages loading, or, the urls should not have been pushed into the browser history, and the homepage should load instead.

Information about your Sapper Installation:

  • Chrome (any version), seems worse on Safari.
  • Ubuntu Linux 19.04
  • Locally hosted
  • Sapper 0.27.0
  • Svelte 3.6.9
  • Rollup

Severity Blocker Severity - We are currently blocked from a v3 upgrade as the site quickly becomes broken for users on iPhone which is ~80% of our userbase. You can play with it at https://qa.beyonk.com/uk and see that visiting an adventure and hitting back, and then hitting another, causes a scroll, making it very easy to click two links in rapid succession and completely break the site.

Additional context

  1. The broken state of the page is intensified on a non-trivial app, the entire site's navigation is now broken and only a refresh will fix it.
  2. The broken state of a page extends to all javascript in the client - in a non trivial site, this means that the site now appears "frozen/crashed" to a user. Any javascript on the page will no longer function.
  3. A refresh of the browser is the only way to recover a Sapper site from this state.
  4. The issue is far more prevalent on iOS Safari / Safari desktop - I'm not sure why.
  5. The issue is far easier to reproduce on a non-trivial site, as part of a page-change operation, Sapper tries to restore scroll state, meaning that the current page will scroll to the top briefly, making it very easy for a user to "double click" and click two links in quick succession, breaking the site.

closed time in 5 days

antony

issue commentsveltejs/sapper

Clicking two links in rapid succession causes the entire site to break

Ah, you found this. I thought I'd lost it :)

It was fixed by the transition fixes.

antony

comment created time in 5 days

issue commentsveltejs/sapper

handle session.user check internally, suggestion to decorate routes somehow

There is a working example of how you can handle an auth + route guarding scenario, for both client and server, as you're detailing above, implemented by https://github.com/beyonk-adventures/sapper-rbac.

I think route guarding is something we'd like to consider for the upcoming router implementation.

pnmcosta

comment created time in 5 days

pull request commentsveltejs/svelte

remove legacy mode

Hi @pushkine - it would be great to see a discussion (via raising an issue) about such changes before opening PRs such as this one. I personally use legacy mode, since I do have to support users on older browsers.

Would you mind going into more detail about why it's important that we remove this?

pushkine

comment created time in 5 days

startedjohngribbin/808

started time in 5 days

issue closedsveltejs/sapper

'import' and 'export' may only appear at the top level

Describe the bug On fresh Sapper project , running sapper dev results into an unknown error 'import' and 'export' may only appear at the top level

Running sapper build proceeds with no fail

Logs

$ yarn run dev
yarn run v1.22.4
warning package.json: No license field
$ sapper dev
✗ client
'import' and 'export' may only appear at the top level
11: }
12: 
13: export function connect(port) {
    ^
14:   if (source || !window.EventSource) return;
✔ server (719ms)
✔ service worker (180ms)
> Listening on http://localhost:3000

To Reproduce

  • git clone the sapper-rollup-template git clone https://github.com/sveltejs/sapper-template-rollup.git
  • Install dependencies yarn or npm install
  • Run develop yarn run dev or npm run dev

Expected behavior Application runs with no problems

Stacktraces If you have a stack trace to include, we recommend putting inside a <details> block for the sake of the thread's readability:

<details> <summary>Stack trace</summary>

$ yarn run dev
yarn run v1.22.4
warning package.json: No license field
$ sapper dev
✗ client
'import' and 'export' may only appear at the top level
11: }
12: 
13: export function connect(port) {
    ^
14:   if (source || !window.EventSource) return;
✔ server (719ms)
✔ service worker (180ms)
> Listening on http://localhost:3000

</details>

Information about your Sapper Installation:

  • Your browser and the version: not applicable

  • Your operating system: MacOS 10.15.4

  • Your hosting environment: Local

  • Sapper version ^0.27.0 and ^0.27.12

  • Svelte version ^3.0.0 and ^3.20.1

  • dynamic application.

  • Rollup

Severity

Medium

Blocking usage of Sapper as local development can not run

Additional context sapper build works

closed time in 6 days

TheBeachMaster

issue commentsveltejs/sapper

What is the preferred method to ensure props update on page navigation?

Hi @khrome83 that's ok - apology accepted.

I can completely understand your frustration, as I have been in the same place myself. I can only say that the features I hoped for over the years finally got merged in, but it was a waiting game, and I did end up running off my own fork for a short while.

Please allow me to apologise for the lack of communication around your PRs. We do genuinely appreciate the contributions, and we will merge them as soon as we are able, however the team of core maintainers is vastly under-resourced as we all have full time jobs and situations, that somehow, became even more demanding of our time during covid.

We're absolutely not ignoring PRs, but there is a significant amount of effort and thought that needs to go into every merge and feature add, which means that the rate at which we can merge them can seem slow. It's a tough balance.

I personally don't tend to merge things into core, because I'm certainly not at the level where I can truly appreciate all of the things which need to be considered in order to do so, but I can "proof read" and vet PRs, which I attempt to do when I have some spare time.

Also please don't mistake our time spent closing issues / chatting on discord to be time where we're not merging PRs, it's a completely different head-space. Trying to keep on top of what does and what doesn't belong in github issues is part of the process of getting things into an order whereby things can be addressed. If immediate answers aren't given on discord (due to lack of context / time / sleep), then StackOverflow is another good place to get answers.

So, I don't have any definitives for you or answers, certainly, but all I can say is that we will do our best to get your MRs merged as promptly as possible, and I hope that we can grow our core team over time to spread the load a bit, too.

nealalpert

comment created time in 6 days

push eventsveltejs/integrations

Antony Jones

commit sha dc256356b4e630a88e280acad235bc1f9d937dce

Remove old Svelte VSCode plugin

view details

push time in 6 days

more