• Stars
    star
    11,163
  • Rank 2,854 (Top 0.06 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created over 5 years ago
  • Updated 11 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Zero-config CLI for TypeScript package development

tsdx

Blazing Fast Blazing Fast Blazing Fast Discord

Despite all the recent hype, setting up a new TypeScript (x React) library can be tough. Between Rollup, Jest, tsconfig, Yarn resolutions, ESLint, and getting VSCode to play nicely....there is just a whole lot of stuff to do (and things to screw up). TSDX is a zero-config CLI that helps you develop, test, and publish modern TypeScript packages with ease--so you can focus on your awesome new library and not waste another afternoon on the configuration.

Features

TSDX comes with the "battery-pack included" and is part of a complete TypeScript breakfast:

  • Bundles your code with Rollup and outputs multiple module formats (CJS & ESM by default, and also UMD if you want) plus development and production builds
  • Comes with treeshaking, ready-to-rock lodash optimizations, and minification/compression
  • Live reload / watch-mode
  • Works with React
  • Human readable error messages (and in VSCode-friendly format)
  • Bundle size snapshots
  • Opt-in to extract invariant error codes
  • Jest test runner setup with sensible defaults via tsdx test
  • ESLint with Prettier setup with sensible defaults via tsdx lint
  • Zero-config, single dependency
  • Escape hatches for customization via .babelrc.js, jest.config.js, .eslintrc.js, and tsdx.config.js

Quick Start

npx tsdx create mylib
cd mylib
yarn start

That's it. You don't need to worry about setting up TypeScript or Rollup or Jest or other plumbing. Just start editing src/index.ts and go!

Below is a list of commands you will probably find useful:

npm start or yarn start

Runs the project in development/watch mode. Your project will be rebuilt upon changes. TSDX has a special logger for your convenience. Error messages are pretty printed and formatted for compatibility VS Code's Problems tab.

Your library will be rebuilt if you make edits.

npm run build or yarn build

Bundles the package to the dist folder. The package is optimized and bundled with Rollup into multiple formats (CommonJS, UMD, and ES Module).

npm test or yarn test

Runs your tests using Jest.

npm run lint or yarn lint

Runs Eslint with Prettier on .ts and .tsx files. If you want to customize eslint you can add an eslint block to your package.json, or you can run yarn lint --write-file and edit the generated .eslintrc.js file.

prepare script

Bundles and packages to the dist folder. Runs automatically when you run either npm publish or yarn publish. The prepare script will run the equivalent of npm run build or yarn build. It will also be run if your module is installed as a git dependency (ie: "mymodule": "github:myuser/mymodule#some-branch") so it can be depended on without checking the transpiled code into git.

Optimizations

Aside from just bundling your module into different formats, TSDX comes with some optimizations for your convenience. They yield objectively better code and smaller bundle sizes.

After TSDX compiles your code with TypeScript, it processes your code with 3 Babel plugins:

Development-only Expressions + Treeshaking

babel-plugin-annotate-pure-calls + babel-plugin-dev-expressions work together to fully eliminate dead code (aka treeshake) development checks from your production code. Let's look at an example to see how it works.

Imagine our source code is just this:

// ./src/index.ts
export const sum = (a: number, b: number) => {
  if (process.env.NODE_ENV !== 'production') {
    console.log('Helpful dev-only error message');
  }
  return a + b;
};

tsdx build will output an ES module file and 3 CommonJS files (dev, prod, and an entry file). If you want to specify a UMD build, you can do that as well. For brevity, let's examine the CommonJS output (comments added for emphasis):

// Entry File
// ./dist/index.js
'use strict';

// This determines which build to use based on the `NODE_ENV` of your end user.
if (process.env.NODE_ENV === 'production') {
  module.exports = require('./mylib.cjs.production.js');
} else {
  module.exports = require('./mylib.development.cjs');
}
// CommonJS Development Build
// ./dist/mylib.development.cjs
'use strict';

const sum = (a, b) => {
  {
    console.log('Helpful dev-only error message');
  }

  return a + b;
};

exports.sum = sum;
//# sourceMappingURL=mylib.development.cjs.map
// CommonJS Production Build
// ./dist/mylib.cjs.production.js
'use strict';
exports.sum = (s, t) => s + t;
//# sourceMappingURL=test-react-tsdx.cjs.production.js.map

AS you can see, TSDX stripped out the development check from the production code. This allows you to safely add development-only behavior (like more useful error messages) without any production bundle size impact.

For ESM build, it's up to end-user to build environment specific build with NODE_ENV replace (done by Webpack 4 automatically).

Rollup Treeshaking

TSDX's rollup config removes getters and setters on objects so that property access has no side effects. Don't do it.

Advanced babel-plugin-dev-expressions

TSDX will use babel-plugin-dev-expressions to make the following replacements before treeshaking.

__DEV__

Replaces

if (__DEV__) {
  console.log('foo');
}

with

if (process.env.NODE_ENV !== 'production') {
  console.log('foo');
}

IMPORTANT: To use __DEV__ in TypeScript, you need to add declare var __DEV__: boolean somewhere in your project's type path (e.g. ./types/index.d.ts).

// ./types/index.d.ts
declare var __DEV__: boolean;

Note: The dev-expression transform does not run when NODE_ENV is test. As such, if you use __DEV__, you will need to define it as a global constant in your test environment.

invariant

Replaces

invariant(condition, 'error message here');

with

if (!condition) {
  if ('production' !== process.env.NODE_ENV) {
    invariant(false, 'error message here');
  } else {
    invariant(false);
  }
}

Note: TSDX doesn't supply an invariant function for you, you need to import one yourself. We recommend https://github.com/alexreardon/tiny-invariant.

To extract and minify invariant error codes in production into a static codes.json file, specify the --extractErrors flag in command line. For more details see Error extraction docs.

warning

Replaces

warning(condition, 'dev warning here');

with

if ('production' !== process.env.NODE_ENV) {
  warning(condition, 'dev warning here');
}

Note: TSDX doesn't supply a warning function for you, you need to import one yourself. We recommend https://github.com/alexreardon/tiny-warning.

Using lodash

If you want to use a lodash function in your package, TSDX will help you do it the right way so that your library does not get fat shamed on Twitter. However, before you continue, seriously consider rolling whatever function you are about to use on your own. Anyways, here is how to do it right.

First, install lodash and lodash-es as dependencies

yarn add lodash lodash-es

Now install @types/lodash to your development dependencies.

yarn add @types/lodash --dev

Import your lodash method however you want, TSDX will optimize it like so.

// ./src/index.ts
import kebabCase from 'lodash/kebabCase';

export const KebabLogger = (msg: string) => {
  console.log(kebabCase(msg));
};

For brevity let's look at the ES module output.

import o from"lodash-es/kebabCase";const e=e=>{console.log(o(e))};export{e as KebabLogger};
//# sourceMappingURL=test-react-tsdx.esm.production.js.map

TSDX will rewrite your import kebabCase from 'lodash/kebabCase' to import o from 'lodash-es/kebabCase'. This allows your library to be treeshakable to end consumers while allowing to you to use @types/lodash for free.

Note: TSDX will also transform destructured imports. For example, import { kebabCase } from 'lodash' would have also been transformed to `import o from "lodash-es/kebabCase".

Error extraction

After running --extractErrors, you will have a ./errors/codes.json file with all your extracted invariant error codes. This process scans your production code and swaps out your invariant error message strings for a corresponding error code (just like React!). This extraction only works if your error checking/warning is done by a function called invariant.

Note: We don't provide this function for you, it is up to you how you want it to behave. For example, you can use either tiny-invariant or tiny-warning, but you must then import the module as a variable called invariant and it should have the same type signature.

โš ๏ธDon't forget: you will need to host the decoder somewhere. Once you have a URL, look at ./errors/ErrorProd.js and replace the reactjs.org URL with yours.

Known issue: our transformErrorMessages babel plugin currently doesn't have sourcemap support, so you will see "Sourcemap is likely to be incorrect" warnings. We would love your help on this.

TODO: Simple guide to host error codes to be completed

Customization

Rollup

โ—โš ๏ธโ— Warning:
These modifications will override the default behavior and configuration of TSDX. As such they can invalidate internal guarantees and assumptions. These types of changes can break internal behavior and can be very fragile against updates. Use with discretion!

TSDX uses Rollup under the hood. The defaults are solid for most packages (Formik uses the defaults!). However, if you do wish to alter the rollup configuration, you can do so by creating a file called tsdx.config.js at the root of your project like so:

// Not transpiled with TypeScript or Babel, so use plain Es6/Node.js!
module.exports = {
  // This function will run for each entry/format/env combination
  rollup(config, options) {
    return config; // always return a config.
  },
};

The options object contains the following:

export interface TsdxOptions {
  // path to file
  input: string;
  // Name of package
  name: string;
  // JS target
  target: 'node' | 'browser';
  // Module format
  format: 'cjs' | 'umd' | 'esm' | 'system';
  // Environment
  env: 'development' | 'production';
  // Path to tsconfig file
  tsconfig?: string;
  // Is error extraction running?
  extractErrors?: boolean;
  // Is minifying?
  minify?: boolean;
  // Is this the very first rollup config (and thus should one-off metadata be extracted)?
  writeMeta?: boolean;
  // Only transpile, do not type check (makes compilation faster)
  transpileOnly?: boolean;
}

Example: Adding Postcss

const postcss = require('rollup-plugin-postcss');
const autoprefixer = require('autoprefixer');
const cssnano = require('cssnano');

module.exports = {
  rollup(config, options) {
    config.plugins.push(
      postcss({
        plugins: [
          autoprefixer(),
          cssnano({
            preset: 'default',
          }),
        ],
        inject: false,
        // only write out CSS for the first bundle (avoids pointless extra files):
        extract: !!options.writeMeta,
      })
    );
    return config;
  },
};

Babel

You can add your own .babelrc to the root of your project and TSDX will merge it with its own Babel transforms (which are mostly for optimization), putting any new presets and plugins at the end of its list.

Jest

You can add your own jest.config.js to the root of your project and TSDX will shallow merge it with its own Jest config.

ESLint

You can add your own .eslintrc.js to the root of your project and TSDX will deep merge it with its own ESLint config.

patch-package

If you still need more customizations, we recommend using patch-package so you don't need to fork. Keep in mind that these types of changes may be quite fragile against version updates.

Inspiration

TSDX was originally ripped out of Formik's build tooling. TSDX has several similarities to @developit/microbundle, but that is because Formik's Rollup configuration and Microbundle's internals had converged around similar plugins.

Comparison with Microbundle

Some key differences include:

  • TSDX includes out-of-the-box test running via Jest
  • TSDX includes out-of-the-box linting and formatting via ESLint and Prettier
  • TSDX includes a bootstrap command with a few package templates
  • TSDX allows for some lightweight customization
  • TSDX is TypeScript focused, but also supports plain JavaScript
  • TSDX outputs distinct development and production builds (like React does) for CJS and UMD builds. This means you can include rich error messages and other dev-friendly goodies without sacrificing final bundle size.

API Reference

tsdx watch

Description
  Rebuilds on any change

Usage
  $ tsdx watch [options]

Options
  -i, --entry           Entry module
  --target              Specify your target environment  (default web)
  --name                Specify name exposed in UMD builds
  --format              Specify module format(s)  (default cjs,esm)
  --tsconfig            Specify your custom tsconfig path (default <root-folder>/tsconfig.json)
  --verbose             Keep outdated console output in watch mode instead of clearing the screen
  --onFirstSuccess      Run a command on the first successful build
  --onSuccess           Run a command on a successful build
  --onFailure           Run a command on a failed build
  --noClean             Don't clean the dist folder
  --transpileOnly       Skip type checking
  -h, --help            Displays this message

Examples
  $ tsdx watch --entry src/foo.tsx
  $ tsdx watch --target node
  $ tsdx watch --name Foo
  $ tsdx watch --format cjs,esm,umd
  $ tsdx watch --tsconfig ./tsconfig.foo.json
  $ tsdx watch --noClean
  $ tsdx watch --onFirstSuccess "echo The first successful build!"
  $ tsdx watch --onSuccess "echo Successful build!"
  $ tsdx watch --onFailure "echo The build failed!"
  $ tsdx watch --transpileOnly

tsdx build

Description
  Build your project once and exit

Usage
  $ tsdx build [options]

Options
  -i, --entry           Entry module
  --target              Specify your target environment  (default web)
  --name                Specify name exposed in UMD builds
  --format              Specify module format(s)  (default cjs,esm)
  --extractErrors       Opt-in to extracting invariant error codes
  --tsconfig            Specify your custom tsconfig path (default <root-folder>/tsconfig.json)
  --transpileOnly       Skip type checking
  -h, --help            Displays this message

Examples
  $ tsdx build --entry src/foo.tsx
  $ tsdx build --target node
  $ tsdx build --name Foo
  $ tsdx build --format cjs,esm,umd
  $ tsdx build --extractErrors
  $ tsdx build --tsconfig ./tsconfig.foo.json
  $ tsdx build --transpileOnly

tsdx test

This runs Jest, forwarding all CLI flags to it. See https://jestjs.io for options. For example, if you would like to run in watch mode, you can run tsdx test --watch. So you could set up your package.json scripts like:

{
  "scripts": {
    "test": "tsdx test",
    "test:watch": "tsdx test --watch",
    "test:coverage": "tsdx test --coverage"
  }
}

tsdx lint

Description
  Run eslint with Prettier

Usage
  $ tsdx lint [options]

Options
  --fix               Fixes fixable errors and warnings
  --ignore-pattern    Ignore a pattern
  --max-warnings      Exits with non-zero error code if number of warnings exceed this number  (default Infinity)
  --write-file        Write the config file locally
  --report-file       Write JSON report to file locally
  -h, --help          Displays this message

Examples
  $ tsdx lint src
  $ tsdx lint src --fix
  $ tsdx lint src test --ignore-pattern test/foo.ts
  $ tsdx lint src test --max-warnings 10
  $ tsdx lint src --write-file
  $ tsdx lint src --report-file report.json

Contributing

Please see the Contributing Guidelines.

Author

License

MIT

Contributors โœจ

Thanks goes to these wonderful people (emoji key):


Jared Palmer

๐Ÿ“– ๐ŸŽจ ๐Ÿ‘€ ๐Ÿ”ง โš ๏ธ ๐Ÿšง ๐Ÿ’ป

swyx

๐Ÿ› ๐Ÿ’ป ๐Ÿ“– ๐ŸŽจ ๐Ÿค” ๐Ÿš‡ ๐Ÿšง ๐Ÿ‘€

Jason Etcovitch

๐Ÿ› โš ๏ธ

Sam Kvale

๐Ÿ’ป โš ๏ธ ๐Ÿ› ๐Ÿ“– ๐Ÿ‘€ ๐Ÿค” ๐Ÿ’ฌ

Lucas Polito

๐Ÿ’ป ๐Ÿ“– ๐Ÿ’ฌ

Steven Kalt

๐Ÿ’ป

Harry Hedger

๐Ÿค” ๐Ÿ“– ๐Ÿ’ป ๐Ÿ’ฌ

Arthur Denner

๐Ÿ› ๐Ÿ’ป ๐Ÿ’ฌ

Carl

๐Ÿค” ๐Ÿ“– ๐Ÿ’ป โš ๏ธ ๐Ÿ’ฌ

Loรฏc Mahieu

๐Ÿ’ป โš ๏ธ

Sebastian Sebald

๐Ÿ“– ๐Ÿ’ป โš ๏ธ

Karl Horky

๐Ÿ“– ๐Ÿค”

James George

๐Ÿ“–

Anton Gilgur

๐Ÿšง ๐Ÿ“– ๐Ÿ’ป ๐Ÿ› ๐Ÿ’ก ๐Ÿค” ๐Ÿ’ฌ ๐Ÿ‘€ โš ๏ธ

Kyle Holmberg

๐Ÿ’ป ๐Ÿ’ก โš ๏ธ ๐Ÿ‘€ ๐Ÿ’ฌ

Sigurd Spieckermann

๐Ÿ› ๐Ÿ’ป

Kristofer Giltvedt Selbekk

๐Ÿ’ป

Tomรกลก Ehrlich

๐Ÿ› ๐Ÿ’ป

Kyle Johnson

๐Ÿ› ๐Ÿ’ป

Etienne Dldc

๐Ÿ› ๐Ÿ’ป โš ๏ธ

Florian Knop

๐Ÿ›

Gonzalo D'Elia

๐Ÿ’ป

Alec Larson

๐Ÿ’ป ๐Ÿ‘€ ๐Ÿค” ๐Ÿ’ฌ

Justin Grant

๐Ÿ› ๐Ÿค” ๐Ÿ’ฌ

Jirat Ki.

๐Ÿ’ป โš ๏ธ ๐Ÿ›

Nate Moore

๐Ÿ’ป ๐Ÿค”

Haz

๐Ÿ“–

Basti Buck

๐Ÿ’ป ๐Ÿ›

Pablo Saez

๐Ÿ’ป ๐Ÿ›

Jake Gavin

๐Ÿ› ๐Ÿ’ป

Grant Forrest

๐Ÿ’ป โš ๏ธ ๐Ÿ›

Sรฉbastien Lorber

๐Ÿ’ป

Kirils Ladovs

๐Ÿ“–

Enes Tรผfekรงi

๐Ÿ’ป ๐Ÿ“–

Bogdan Chadkin

๐Ÿ‘€ ๐Ÿ’ฌ ๐Ÿค”

Daniel K.

๐Ÿ’ป ๐Ÿ“– โš ๏ธ ๐Ÿค” ๐Ÿ›

Quentin Sommer

๐Ÿ“–

Hyan Mandian

๐Ÿ’ป โš ๏ธ

Sung M. Kim

๐Ÿ› ๐Ÿ’ป

John Johnson

๐Ÿ’ป ๐Ÿ“–

Jun Tomioka

๐Ÿ’ป โš ๏ธ

Leonardo Dino

๐Ÿ’ป ๐Ÿ›

Honza Bล™eฤka

๐Ÿ’ป ๐Ÿ›

Ward Loos

๐Ÿ’ป ๐Ÿค”

Brian Bugh

๐Ÿ’ป ๐Ÿ›

Cody Carse

๐Ÿ“–

Josh Biddick

๐Ÿ’ป

Jose Albizures

๐Ÿ’ป โš ๏ธ ๐Ÿ›

Rahel Lรผthy

๐Ÿ“–

Michael Edelman

๐Ÿ’ป ๐Ÿค”

Charlike Mike Reagent

๐Ÿ‘€ ๐Ÿ’ป ๐Ÿค”

Frederik Wessberg

๐Ÿ’ฌ

Elad Ossadon

๐Ÿ’ป โš ๏ธ ๐Ÿ›

Kevin Kipp

๐Ÿ’ป

Matija Folnovic

๐Ÿ’ป ๐Ÿ“–

Andrew

๐Ÿ’ป

Ryan Castner

๐Ÿ’ป โš ๏ธ ๐Ÿค”

Yordis Prieto

๐Ÿ’ป

NCPhillips

๐Ÿ“–

Arnaud Barrรฉ

๐Ÿ’ป ๐Ÿ“–

Peter W

๐Ÿ“–

Joe Flateau

๐Ÿ’ป ๐Ÿ“–

H.John Choi

๐Ÿ“–

Jon Stevens

๐Ÿ“– ๐Ÿค” ๐Ÿ›

greenkeeper[bot]

๐Ÿš‡ ๐Ÿ’ป

allcontributors[bot]

๐Ÿš‡ ๐Ÿ“–

dependabot[bot]

๐Ÿš‡ ๐Ÿ›ก๏ธ ๐Ÿ’ป

GitHub

๐Ÿš‡

Eugene Samonenko

โš ๏ธ ๐Ÿ’ก ๐Ÿ’ฌ ๐Ÿค”

Joseph Wang

๐Ÿ›

Kotaro Sugawara

๐Ÿ› ๐Ÿ’ป

Semesse

๐Ÿ’ป

Bojan Mihelac

๐Ÿ’ป

Dan Dascalescu

๐Ÿ“–

Yuriy Burychka

๐Ÿ’ป

Jesse Hoyos

๐Ÿ’ป

Mike Deverell

๐Ÿ’ป

Nick Hehr

๐Ÿ’ป ๐Ÿ“– ๐Ÿ’ก

Bnaya Peretz

๐Ÿ› ๐Ÿ’ป

Andres Alvarez

๐Ÿ’ป ๐Ÿ“– ๐Ÿ’ก

Yaroslav K.

๐Ÿ“–

Dragoศ™ Strฤƒinu

๐Ÿค”

George Varghese M.

๐Ÿ’ป ๐Ÿ“– โš ๏ธ

Reinis Ivanovs

๐Ÿค” ๐Ÿ’ฌ

Orta Therox

๐Ÿ’ฌ ๐Ÿ“–

Martijn Saly

๐Ÿ›

Alex Johansson

๐Ÿ“–

hb-seb

๐Ÿ’ป

seungdols

๐Ÿ›

Bรฉrรฉ Cyriac

๐Ÿ›

Dmitriy Serdtsev

๐Ÿ›

Vladislav Moiseev

๐Ÿ’ป

Felix Mosheev

๐Ÿ› ๐Ÿ“–

Ludovico Fischer

๐Ÿ’ป

Altrim Beqiri

๐Ÿ› ๐Ÿ’ป โš ๏ธ

Tane Morgan

๐Ÿ› ๐Ÿ’ป

This project follows the all-contributors specification. Contributions of any kind welcome!

More Repositories

1

formik

Build forms in React, without the tears ๐Ÿ˜ญ
TypeScript
33,550
star
2

razzle

โœจ Create server-rendered universal JavaScript applications with no configuration
JavaScript
11,089
star
3

backpack

๐ŸŽ’ Backpack is a minimalistic build system for Node.js projects.
JavaScript
4,470
star
4

the-platform

Web. Components. ๐Ÿ˜‚
TypeScript
4,406
star
5

after.js

Next.js-like framework for server-rendered React apps built with React Router
TypeScript
4,131
star
6

react-fns

Browser API's turned into declarative React components and HoC's
TypeScript
3,739
star
7

awesome-react-render-props

Awesome list of React components with render props
1,366
star
8

cypress-image-snapshot

Catch visual regressions in Cypress
JavaScript
874
star
9

presspack

๐Ÿ’ป Wordpress like it's 2022 with Webpack and Docker
JavaScript
689
star
10

react-parcel-example

Minimum viable React app with Parcel Bundler
JavaScript
485
star
11

minimum-viable-saas

A multi-tier membership SaaS in less than 500 lines of code w/Stripe and Firebase
JavaScript
442
star
12

formik-persist

๐Ÿ’พ Persist and rehydrate a Formik form to localStorage
TypeScript
375
star
13

mutik

A tiny (495B) immutable state management library based on Immer
TypeScript
325
star
14

typescript

TypeScript coding guidelines & configs for Formik
JavaScript
284
star
15

react-conf-2018

React Conf 2018 Source Code for "Moving to Suspense" Demo
JavaScript
226
star
16

tsdx-monorepo

A really good starting point for your next React x TypeScript monorepo
TypeScript
176
star
17

react-email-workflow

Newsletter design tool
JavaScript
175
star
18

formik-effect

Declarative component for managing side-effects in Formik forms. 580 bytes
TypeScript
166
star
19

formover

Build forms that pop bottles ๐Ÿพwith Formik and React Popper
TypeScript
160
star
20

react-simple-infinite-scroll

A brutally simple react infinite scroll component
TypeScript
141
star
21

react-persist

๐Ÿ’พ Persist and rehydrate React state to localStorage.
JavaScript
124
star
22

nextra-blank-custom-theme

A forkable Next.js site w/ a blank custom Nextra theme (w/Tailwind)
JavaScript
108
star
23

hyperhue

๐ŸŒˆ A fun HyperTerm theme that responds to your Philips Hue lights
JavaScript
103
star
24

reason-react-native-web-example

Razzle + Reason-React + React-Native-Web. Damn that's a lot of R's.
Reason
100
star
25

disco.chat

Add real-time ephemeral chat to any webpage.
TypeScript
93
star
26

react-router-nextjs-like-data-fetching

Demonstrating React Router 4's SSR awesomeness
JavaScript
89
star
27

dotfiles

My setup
Shell
50
star
28

razzle-react-vue-elm-php-lol

๐Ÿ”ฅ Blazing fast Razzle app with React, Vue, PHP, and Elm + HMR
JavaScript
50
star
29

formik-alicante

Formik slides & demos from React Alicante
JavaScript
46
star
30

react-suspense-playground

Stock Market News app w/ React Suspense
JavaScript
43
star
31

razzle-unrouted

Blazingly fast server-rendered MVC Webapps with Preact and Webpack
JavaScript
42
star
32

nextjs-langchain-example

Demo of using LangChain.js with Next.js and Vercel Edge Functions (to stream the response)
TypeScript
42
star
33

codemods

Collection of codemods for TypeScript and JavaScript codebases
JavaScript
41
star
34

framer-electron-preview

Quickly run Framer prototypes within Electron.
JavaScript
35
star
35

country-fns

๐ŸŒ Useful country data for forms and stuff.
JavaScript
34
star
36

TIL

๐Ÿ“–Trying to document some of my learnings
30
star
37

squeezy

1 kB React component for accessible accordions / collapse UI
TypeScript
30
star
38

react-europe-2019

Slides and demo app from my keynote
JavaScript
29
star
39

jpjs

Some TypeScript utils
TypeScript
21
star
40

emotion-jsxstyle

jsxstyle primitives powered by emotion
JavaScript
20
star
41

react-router-suspense-demo

React Suspense x React Router Exploration
JavaScript
17
star
42

nextjs-route-handler-email

Experimenting with react.email and Next.js 13 Route Handlers
TypeScript
16
star
43

react-snippets

My React snippets for JavaScript and TypeScript
13
star
44

jaredpalmer.github.io

TypeScript
12
star
45

framer-router

A little routing solution for Framer.js
CoffeeScript
11
star
46

thinkaboutthis.fm

Source code for thinkaboutthis.fm
TypeScript
11
star
47

formik-bloomberg-talk

Slides and examples from my talk at Bloomberg on October 31, 2019
JavaScript
10
star
48

jaredpalmer-vscode-extensionpack

All of my VS Code extensions .... in one extension pack
9
star
49

electron-starter

A minimal Electron starter
JavaScript
8
star
50

babel-preset-react-ts

Create React App's Babel 7 Preset, plus TypeScript
JavaScript
7
star
51

noirny

Website for Noir New York (formerly the lately). Opening 11/21/19
TypeScript
7
star
52

jest-jsxstyle

๐Ÿƒ Jest utilities for JSXStyle
JavaScript
6
star
53

flask-vercel

Python
6
star
54

jaredpalmer

it me.
5
star
55

saas-subdomain-nginx-node-docker

Example setup of SaaS-like user subdomains using Express, NGINX, and Docker Compose
JavaScript
5
star
56

juice.now.sh

Automattic's Juice CSS inliner as a microservice
HTML
4
star
57

datocms-next-js-blog-demo-9687

JavaScript
4
star
58

react-error-overlay-razzle-bug

JavaScript
3
star
59

glamor-jsxstyle

Future home of glamor-jsxstyle
JavaScript
3
star
60

reactnyc-formik

๐Ÿ“ˆ Formik presentation at the August React NYC meetup @Spotify
JavaScript
3
star
61

bf-solid-addons

Helpful addons to Buzzfeed's Solid CSS Framework
CSS
2
star
62

codesandbox-template-next.js

Next.js template for CodeSandbox Projects
TypeScript
2
star
63

framer-electron

Prototype desktop apps with Framer.js and Electron with your own editor.
JavaScript
2
star
64

formik-docs

WIP. Formik docs website
TypeScript
2
star
65

oss-deck

JavaScript
1
star
66

downshift-razzle-bug

JavaScript
1
star
67

next-back-button-error

JavaScript
1
star
68

flask-pipenv-example

Python
1
star
69

os-today

A list a of the GitHub repos you should be using.
JavaScript
1
star
70

blocks

TypeScript
1
star
71

ci-info

Go
1
star
72

hyperneon

Hyperterm theme that rotates neon colors
JavaScript
1
star