View build.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const feather = require('feather-icons/dist/icons.json') | |
const pascal = require('just-pascal-case') | |
const { promises: fs } = require('fs') | |
const { join } = require('path') | |
const iconList = require('./icon-list.json') | |
const handleComponentName = name => name.replace(/\-(\d+)/, '$1') | |
const component = icon => | |
`<script> |
View bash.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
npm install --save express express-openid-connect |
View index.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- generated via npm run build && npx create-polyfill-service-url analyse --file public/bundle.js --> | |
<script crossorigin="anonymous" src="https://cdn.polyfill.io/v3/polyfill.min.js?features=Array.from,Array.isArray,Array.prototype.entries,Array.prototype.fill,Array.prototype.filter,Array.prototype.forEach,Array.prototype.indexOf,Array.prototype.keys,Array.prototype.map,ArrayBuffer,console,DataView,Date.prototype.toISOString,document,fetch,Function.prototype.bind,globalThis,Map,Object.create,Object.defineProperties,Object.defineProperty,Object.entries,Object.getOwnPropertyDescriptor,Object.getOwnPropertyDescriptors,Object.getOwnPropertySymbols,Object.getPrototypeOf,Object.keys,Object.setPrototypeOf,Promise,Reflect,Reflect.construct,Set,Symbol,Symbol.iterator,WeakMap,WeakSet"></script> |
View index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict' | |
require = require('esm')(module) | |
const { init, shutdown } = require('./server.js') | |
async function bootstrap () { | |
const server = await init() | |
await server.start() | |
console.log(`Server running at: ${server.info.uri}`) | |
} |
View SimpleFileUploader.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<label> | |
{#if uploading} | |
<Progress bind:percent={progress} text="Uploading..." /> | |
{:else if processing} | |
<Progress percent={100} text="Processing..." /> | |
{:else} | |
<slot name="content"> | |
</slot> | |
{/if} | |
<input |
View rollup.config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import conf from 'config' | |
const appConfig = Object.keys(conf).reduce((acc, n) => { | |
acc[`process.env.${n}`] = JSON.stringify(conf[n]) | |
return acc | |
}, {}) | |
export default { | |
client: { | |
..., |
View SomeComponent.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h1> | |
{process.env.myConfigVariable} | |
</h1> |
View Flipper.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="card-container"> | |
<div class="card"> | |
{#if flipped} | |
<div class="side" transition:turn> | |
<slot name="front"></slot> | |
</div> | |
{:else} | |
<div class="side back" transition:turn> | |
<slot name="back"></slot> | |
</div> |
View Blob to Data Url
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From: https://stackoverflow.com/questions/23150333/html5-javascript-dataurl-to-blob-blob-to-dataurl | |
//**dataURL to blob** | |
function dataURLtoBlob(dataurl) { | |
var arr = dataurl.split(','), mime = arr[0].match(/:(.*?);/)[1], | |
bstr = atob(arr[1]), n = bstr.length, u8arr = new Uint8Array(n); | |
while(n--){ | |
u8arr[n] = bstr.charCodeAt(n); | |
} | |
return new Blob([u8arr], {type:mime}); |
View api.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import querystring from 'querystring' | |
import fetch from 'node-fetch' | |
const base = `${process.env.apiUrl}/api/v1` | |
class HttpError extends Error { | |
} | |
class AccessDeniedError extends HttpError { | |
} |
NewerOlder