Every block
should be in separated file named as block.
Filename: rating-star.scss
.rating-star {
$font-size: 0.5em;
display: inline-block; // `display` style may be set freely
#!/usr/bin/env node | |
// TODO(vojta): pre-commit hook for validating messages | |
// TODO(vojta): report errors, currently Q silence everything which really sucks | |
'use strict'; | |
var child = require('child_process'); | |
var fs = require('fs'); | |
var util = require('util'); |
export type Route = { | |
method: "*" | "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "HEAD" | "OPTIONS" | "CONNECT" | "TRACE" | |
path: string | |
regexp: RegExp | |
handler: (request: Request, route: MatchedRoute) => Promise<Response> | |
} | |
export type MatchedRoute = Route & { | |
url: URL | |
} |
Example:
zsh-5.7.1-1-x86_64.pkg.tar.xz
#!/usr/bin/env node | |
import { readdir, rm } from 'node:fs/promises' | |
/** | |
* @license | |
* MIT License | |
* | |
* Copyright (c) 2023 Jörn Spangenberg <https://jrson.me> | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy |
import Layout from '../Layouts' | |
import { Fragment } from 'react' | |
const Home: React.FC = () => { | |
return ( | |
<Fragment> | |
<h1>Home</h1> | |
<p>Hello, welcome to your first Inertia app!</p> | |
</Fragment> | |
) |
// branded types to allow for better type inference | |
// with default generic types | |
/* eslint-disable @typescript-eslint/naming-convention */ | |
type NO_PAYLOAD = { | |
JgJES6BF8uyaOwF1: "FY7eBhPYJlqOxuVp"; | |
}; | |
type OPTIONAL_PAYLOAD = { | |
A7nWdXs0r5RLuHRf: "zPcrRNRIl4r5IHbA"; | |
}; |
function isPlainObject(item: unknown): item is Record<string, unknown> { | |
return item && (item as object).constructor === Object | |
} | |
function filterProto([key, value]: [string, unknown]) { | |
// Avoid prototype pollution | |
return key !== '__proto__' | |
} | |
const deepmerge = ( |