Yes, please do contribute! We want you to feel as involved as you need or want to be. Here are some tips to get rolling.
- ⭐ Star our repository!
- 🐝 Get help:
import { getStorage, storageSync } from '$shared/state-utils.svelte'; | |
const SYNC_KEY = 'some_synced_var'; | |
class SomeSvelteClass { | |
some_synced_var = $state(getStorage(SYNC_KEY) || 'foo'); | |
constructor() { | |
storageSync(SYNC_KEY, () => this.some_synced_var); | |
} | |
} |
/* global localStorage */ | |
import { writable } from 'svelte/store' | |
const storage = typeof localStorage !== 'undefined' ? localStorage : { | |
removeItem: key => { if (storage[key]) { delete storage[key] } }, | |
} | |
/** | |
* Tracks storage both in `localStorage` and in svelte's `writable` stores | |
* Usage: `const name = storable('name', 'arxpoetica')` |
{ | |
"errors": [ | |
{ | |
"message": "Assignment to constant variable.", | |
"locations": [ | |
{ | |
"line": 2, | |
"column": 3 | |
} | |
], |
import './src/_server/build/config' | |
import resolve from 'rollup-plugin-node-resolve'; | |
import replace from 'rollup-plugin-replace'; | |
import commonjs from 'rollup-plugin-commonjs'; | |
// import builtins from 'rollup-plugin-node-builtins' | |
// import globals from 'rollup-plugin-node-globals' | |
import svelte from 'rollup-plugin-svelte'; | |
import babel from 'rollup-plugin-babel'; | |
import { terser } from 'rollup-plugin-terser'; |
mixin head | |
svelte:head | |
block | |
mixin title(expression) | |
+head | |
title!= expression | |
mixin if(expression) | |
!= '{#if ' + expression + '}' | |
block | |
!= '{/if}' |
Yes, please do contribute! We want you to feel as involved as you need or want to be. Here are some tips to get rolling.
import StateMachine from './StateMachine' | |
export default { | |
data() { | |
return { | |
screenWidth: 0, | |
screenHeight: 0, | |
} | |
}, |
I hereby claim:
To claim this, I am signing this object:
// happy forms: http://happyjs.com/ | |
!function(a){function b(b){return"".trim?b.val().trim():a.trim(b.val())}a.fn.isHappy=function(c){function g(a){return!!(a&&a.constructor&&a.call&&a.apply)}function h(b){var d=c.classes&&c.classes.message||"unhappyMessage";return a('<span id="'+b.id+'" class="'+d+'" role="alert">'+b.message+"</span>")}function i(a){return g(c.errorTemplate)?c.errorTemplate(a):h(a)}function j(){var a,b,e=!1;for(a=0,b=d.length;b>a;a+=1)d[a].testValid(!0)||(e=!0);return e?(g(c.unHappy)&&c.unHappy(),!1):c.testMode?(g(c.happy)&&c.happy(),window.console&&console.warn("would have submitted"),!1):(g(c.happy)&&c.happy(),void 0)}function k(){f=!1;}function l(){f=!0,a(window).bind("mouseup",k);}function m(e,h){var j=a(h),k={message:e.message||"",id:h.slice(1)+"_unhappy"},l=a(k.id).length>0?a(k.id):i(k),m=function(){f?a(window).bind("mouseup",j.testValid.bind(this)):j.testValid();};d.push(j),j.testValid=function(d){var f,h,i,k=a(this),m=e.errorTarget&&a(e.errorTarget)||k,n=!1,o=!!k.get(0).attributes.get |
* { | |
font-size: 12pt; | |
font-family: monospace; | |
font-weight: normal; | |
font-style: normal; | |
text-decoration: none; | |
color: black; | |
cursor: default; | |
} |