--only-changed
変更したテストだけ実行できる- 結構便利そう。けどテストじゃなくて関連するソースの変更を検知したい
- https://playwright.dev/docs/api/class-testconfig#test-config-respect-git-ignore
next/font
の関数からパラメータを組み立ててhttps://fonts.googleapis.com/css2?family=xxx
に対してリクエスト
- ダウンロードしたCSSの
src: url(...)
を抜き出してwebfontファイルを保存
- ダウンロードしたCSSの
src: url(...)
を保存したファイルパスへ書き換え
- Created: 2024-07-28
Node.jsのTypeScriptサポートに関する議論を時系列でまとめたものです。
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 BaseEnvRecord = Record< | |
string, | |
{ | |
value: string | undefined; | |
required: boolean; | |
defaultValue?: string; | |
} | |
>; | |
export type ReturnTypeOfCreateEnv<T extends BaseEnvRecord> = { | |
// If the value is required, it should be a string, otherwise it should be a string or undefined |
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
Show hidden characters
{ | |
// ベースのtsconfigは決められたカテゴリのみを設定する | |
// それ以外は、プロジェクトごとに設定する | |
// https://www.typescriptlang.org/tsconfig/#compilerOptions | |
"compilerOptions": { | |
// incrementalビルドは特別にデフォルトで有効にする | |
"incremental": true, | |
// # JavaScript Support | |
"allowJs": false, | |
// # Type Checking |
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 React, { useActionState } from "react"; | |
const validate = _ => {}; | |
const isValidationError = _ => {}; | |
const isNetworkError = _ => {}; | |
const DisplayError = ({ | |
error, | |
}: { | |
error: ReturnType<typeof usePage>["error"]; | |
}) => { | |
if(isValidationError(error)) { |
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 draw = (output) => console.log(output); | |
const getWeather = async (city) => { | |
await new Promise((resolve) => setTimeout(resolve, 1000)); | |
return "sunny"; | |
}; | |
const render = async function* ({ city }) { | |
yield `<Spinner />`; | |
const weather = await getWeather(city); | |
return `<Weather info=${weather} />`; |
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
api.mapkey("g", "Kagi to Google", function () { | |
const isKagi = location.href.startsWith("https://kagi.com/search?"); | |
if (isKagi) { | |
location.href = `https://www.google.com/search?q=${(new URL(location.href)).searchParams.get("q")}`; | |
} | |
}); |
Ref なぜ僕は公式ドキュメントを読むのが苦手なのか #初心者 - Qiita
次のようなセクションがあった場合、何を読むかというのはその目的によって異なるという印象。
- Getting Started: インストール、セットアップ
- Tutorial: 基本的な使い方(代表的な使い方)
- Concepts: デザインのコンセプト、なぜ作ったか
- Examples: 動くサンプル
- API Reference: APIのリファレンス
NewerOlder