In your command-line run the following commands:
brew doctor
brew update
import { Hono } from 'hono' | |
import { Suspense } from 'hono/jsx' | |
import { jsxRenderer } from 'hono/jsx-renderer' | |
const app = new Hono() | |
app.get( | |
'*', | |
jsxRenderer( | |
({ children }) => { |
import { Markdown } from "@/app/components/markdown"; | |
import { getComments, getPost } from "@/lib/db"; | |
import { Suspense } from "react"; | |
export default async function PostPage({ | |
params, | |
}: { | |
params: { postId: string }; | |
}) { | |
let post = await getPost(params.postId); |
export PYTHONIOENCODING=utf8 | |
# PROMPT_COMMAND="prompt-command" | |
# cache init | |
source activate base | |
if [[ -z "$my_pragma_once" ]]; then | |
source ~/.bashfiles/color.sh # available at https://gist.github.com/thautwarm/d43e17a6c2e48ac7d420281779e9399b | |
source "$(scoop prefix git)\etc\profile.d\git-prompt.sh" | |
source /usr/share/bash-completion/bash_completion | |
export PATH=$HOME/scoop/shims:$PATH |
In your command-line run the following commands:
brew doctor
brew update
{ | |
"scripts": { | |
"build": "npm run build:es2015 && npm run build:esm && npm run build:cjs && npm run build:umd && npm run build:umd:min", | |
"build:es2015": "tsc --module es2015 --target es2015 --outDir dist/es2015", | |
"build:esm": "tsc --module es2015 --target es5 --outDir dist/esm", | |
"build:cjs": "tsc --module commonjs --target es5 --outDir dist/cjs", | |
"build:umd": "rollup dist/esm/index.js --format umd --name YourLibrary --sourceMap --output dist/umd/yourlibrary.js", | |
"build:umd:min": "cd dist/umd && uglifyjs --compress --mangle --source-map --screw-ie8 --comments --o yourlibrary.min.js -- yourlibrary.js && gzip yourlibrary.min.js -c > yourlibrary.min.js.gz", | |
} | |
} |
This is an example of how to use [Rollup] with external dependencies, without hard-coding them.
It reads your installed NPM dependencies and treats them as external to Rollup. They still get bundled, but not as ES2015.
Make sure you have a .babelrc
or a "babel":{}
section in your package.json
.
Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...
// see: https://github.com/chadoe/docker-cleanup-volumes
$ docker volume rm $(docker volume ls -qf dangling=true)
$ docker volume ls -qf dangling=true | xargs -r docker volume rm
Hi Nicholas,
I saw you tweet about JSX yesterday. It seemed like the discussion devolved pretty quickly but I wanted to share our experience over the last year. I understand your concerns. I've made similar remarks about JSX. When we started using it Planning Center, I led the charge to write React without it. I don't imagine I'd have much to say that you haven't considered but, if it's helpful, here's a pattern that changed my opinion:
The idea that "React is the V in MVC" is disingenuous. It's a good pitch but, for many of us, it feels like in invitation to repeat our history of coupled views. In practice, React is the V and the C. Dan Abramov describes the division as Smart and Dumb Components. At our office, we call them stateless and container components (view-controllers if we're Flux). The idea is pretty simple: components can't
#!/bin/sh | |
STAGED_FILES=$(git diff --cached --name-only --diff-filter=ACM | grep ".jsx\{0,1\}$") | |
if [[ "$STAGED_FILES" = "" ]]; then | |
exit 0 | |
fi | |
PASS=true |