- Latest version is
v1 - Real underlying version is
v1.0.0 - A new release is to be published at
v1.0.1andv1
- Push commits
- Create new release for
v1.0.1
| export default function sveltePreprocessSvg() { | |
| return { | |
| markup({ content }) { | |
| content = content.trim() | |
| if (content.startsWith('<svg ') && content.endsWith('</svg>')) { | |
| return { code: `{@html \`${content}\`}` } | |
| } else { | |
| return { code: content } | |
| } | |
| }, |
| import fs from 'fs/promises' | |
| import { defineConfig } from 'vite' | |
| import svelte from '@sveltejs/vite-plugin-svelte' | |
| export default defineConfig({ | |
| plugins: [svelteSvgPlugin(), svelte({ extensions: ['.svelte', '.svg'] })], | |
| }) | |
| function svelteSvgPlugin() { | |
| return { |
| #!/bin/bash | |
| # Removes old revisions of snaps | |
| # CLOSE ALL SNAPS BEFORE RUNNING THIS | |
| set -eu | |
| LANG=C snap list --all | awk '/disabled/{print $1, $3}' | | |
| while read snapname revision; do | |
| snap remove "$snapname" --revision="$revision" | |
| done |
| import { createFilter } from '@rollup/pluginutils' | |
| import postcss from 'postcss' | |
| import loadConfig from 'postcss-load-config' | |
| /** | |
| * @typedef {{ | |
| * include: import('@rollup/pluginutils').FilterPattern, | |
| * exclude: import('@rollup/pluginutils').FilterPattern | |
| * }} Options | |
| */ |
| import type { Plugin } from 'postgraphile' | |
| export const removeFluffPlugin: Plugin = (builder) => { | |
| builder.hook('GraphQLInputObjectType:fields', (fields, _, { scope }) => { | |
| if (scope.isMutationInput) { | |
| delete fields.clientMutationId | |
| } | |
| return fields | |
| }) |
| import pkg from './package.json' | |
| export function autoExternal() { | |
| return { | |
| name: 'auto-external', | |
| options(opts) { | |
| const deps = [ | |
| ...Object.keys(pkg.dependencies), | |
| ...Object.keys(pkg.peerDependencies) | |
| ] |
| import { getContext, setContext } from 'svelte' | |
| /** | |
| * @template T | |
| * @param {any} [k] | |
| * @returns {[() => T, (v: T) => void]} | |
| */ | |
| export function createContext(k = {}) { | |
| return [() => getContext(k), (v) => setContext(k, v)] | |
| } |
| import { get, writable } from 'svelte/store' | |
| import { writableDerived } from './writable-derived' | |
| const foo = writable('bar') | |
| const hello = writable('world') | |
| const store = writableDerived( | |
| [foo, hello], | |
| ([$foo, $hello]) => ({ | |
| fooKey: $foo, |
| /** Callback to inform of a value updates. */ | |
| type Subscriber<T> = (value: T) => void | |
| /** Unsubscribes from value updates. */ | |
| type Unsubscriber = () => void | |
| /** A store that can be subscribed */ | |
| interface Subscribable<T> { | |
| subscribe: (run: Subscriber<T>) => Unsubscriber | |
| } |