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
"C:\Program Files\VcXsrv\vcxsrv.exe" :0 -ac -terminate -lesspointer -multiwindow -clipboard -wgl -dpi auto |
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 { useEffect } from 'preact/hooks' | |
/** | |
* Generates an event hook / dispatch function pair for the given payload. | |
* | |
* @returns the hook and dispatch functions | |
*/ | |
export function createEventHooks<Payload>() { | |
const { useEvent, dispatchEvent } = createEventsHooks() | |
const event = Date.now().toString() |
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 { useEffect, useMemo, useRef } from 'preact/hooks' | |
/** | |
* The {@link usePromise} resolve function. | |
*/ | |
export type UsePromiseResolve<Type> = (value: Type) => void | |
/** | |
* The {@link usePromise} reject function. | |
*/ |
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
/** | |
* The code is based on Gleb Bahmutov's [local-cypress](https://github.com/bahmutov/local-cypress). | |
*/ | |
/// <reference types="cypress" /> | |
/// <reference types="@testing-library/cypress" /> | |
const win = window as unknown as Window & { | |
assert: Chai.AssertStatic | |
expect: Chai.ExpectStatic |
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 { | |
defaultNumberingPosition, | |
defaultNumberingStyle, | |
NumberingFormatOptions, | |
NumberingPosition, | |
NumberingStyle, | |
} from '#app/core/split/parse' | |
export function stripNumbering( | |
text: string, |
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 { build } from 'estrella' | |
import fs from 'fs' | |
import { promisify } from 'util' | |
import packageJSON from '../package.json' | |
import listFunctions from './_lib/listFunctions' | |
const writeFile = promisify(fs.writeFile) | |
const external = Object.keys(packageJSON.dependencies) | |
const appEnv = process.env.APP_ENV | |
const rootPath = process.cwd() |
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
var errorsStash = [] | |
var errorListener = function(e) { | |
errorsStash.push(e.error) | |
} | |
var unhandledRejectionListener = function(e) { | |
errorsStash.push(e.reason) | |
} | |
window.addEventListener('error', errorListener) | |
window.addEventListener('unhandledrejection', unhandledRejectionListener) | |
window.__passOnToSentry__ = function() { |
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
SHELL := /bin/bash | |
PATH := $(shell yarn bin):$(PATH) | |
test: | |
which ts-node | |
${shell yarn bin}/ts-node --version | |
ts-node --version |
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
diff --git a/tsconfig.json b/tsconfig.json | |
index 42d6d90..b64255d 100644 | |
--- a/tsconfig.json | |
+++ b/tsconfig.json | |
@@ -1,7 +1,7 @@ | |
{ | |
"compilerOptions": { | |
/* Basic Options */ | |
- "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */ | |
+ "target": "es2015", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */ |
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
export type Setter<State> = (currentState: State) => State | |
export type Listener<State> = ( | |
newState: State, | |
prevState: State | undefined | |
) => void | |
export default function createState<State>() { | |
let currentState: State | |
let listener: Listener<State> |
NewerOlder