It's 2024. You should use tsup instead of this.
🔥 Blazing fast builds
😇 CommonJS bundle
🌲 .mjs bundle
✨ .d.ts bundle + type-checking
| // Adapted from https://github.com/go717franciswang/peerjs-chatroom | |
| const CLIENT_MSG = { | |
| CHAT: 1, | |
| GET_MEMBERS: 2, | |
| }; | |
| const SERVER_MSG = { | |
| CHAT: 1, | |
| MEMBERS: 2, |
| import glob from 'fast-glob' | |
| import { build } from 'esbuild' | |
| import { Project } from 'ts-morph' | |
| const project = new Project({ | |
| compilerOptions: { | |
| outDir: 'dist', | |
| emitDeclarationOnly: true, | |
| }, | |
| tsConfigFilePath: './tsconfig.json', |
| PORT=xxx | |
| COGNITO_USER_POOL_ID=xxx | |
| COGNITO_CLIENT_ID=xxx | |
| COOKIE_SESSION_SECRET=xxx | |
| COOKIE_SESSION_NAME=xxx | |
| AWS_REGION=xxx | |
| AWS_ACCESS_KEY_ID=xxx | |
| AWS_SECRET_ACCESS_KEY=xxx |
| import {MDXProvider} from '@mdx-js/react'; | |
| import {MDXComponents} from 'components/MDX/MDXComponents'; | |
| import {Toc} from 'components/Toc/Toc'; | |
| import * as React from 'react'; | |
| export interface MarkdownProps<Frontmatter> { | |
| meta: Frontmatter; | |
| children?: React.ReactNode; | |
| } |
| FROM node: 14-alpine as build | |
| ENV NEXT_TELEMETRY_DISABLED=1 | |
| RUN apk add --no-cache libc6-compat | |
| WORKDIR /app | |
| COPY .. | |
| RUN yarn install && \ | |
| yarn build | |
| FROM node: 14-alpine |
It's 2024. You should use tsup instead of this.
🔥 Blazing fast builds
😇 CommonJS bundle
🌲 .mjs bundle
✨ .d.ts bundle + type-checking
| import SwiftUI | |
| import PlaygroundSupport | |
| // NOTE: this example currently only works with US-based coordinates | |
| // constants | |
| // New York | |
| let latitude = 40.709335 | |
| let longitude = -73.956558 |
Ventura docs for M2 Macs in this comment: https://gist.github.com/henrik242/65d26a7deca30bdb9828e183809690bd?permalink_comment_id=4555340#gistcomment-4555340
Old Monterey docs in this old revision: https://gist.github.com/henrik242/65d26a7deca30bdb9828e183809690bd/32c410e3a1de73539c76fa13ea5486569c4e0c5d
Solution for Sonoma: https://gist.github.com/sghiassy/a3927405cf4ffe81242f4ecb01c382ac
This is a quick-and-dirty walkthrough to set up a fresh project with Storybook Docs, Create React App, and TypeScript. If you're looking for a tutorial, please see Design Systems for Developers, which goes into much more depth but does not use Typescript.
The purpose of this walkthrough is a streamlined Typescript / Docs setup that works out of the box, since there are countless permutations and variables which can influence docs features, such as source code display, docgen, and props tables.
npx create-react-app cra-ts --template typescript| /** Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. */ | |
| "use strict"; | |
| /** | |
| * The runtime has a single beforeExit function which is stored in the global | |
| * object with a symbol key. | |
| * The symbol is not exported. | |
| * The process.beforeExit listener is setup in index.js along with all other | |
| * top-level process event listeners. | |
| */ |