Files
TheGame/packages/design-system
The Lone Rōnin 6d6d75e6e4 Cross Browser Gradient for App Drawer (#294)
* Cross Browser Compatibility for Gradient with new hover animation

* [MyMeta] Use responsive units on the header and footer (#305)

* fixing menu drawer to display on Chromium

* switching footer layout to responsive units

* build failing b/c player is undefined

* refactoring bottom nav to use fewer explicit sizes

* fixed link issues and removed box from focused menu items ala.

* `Error serializing `.guild` returned from `getStaticProps` in "/guild/[guildname]"`

* codegen was removed, but some references linger

* switching profile options to icons to save space

* simplifying & making links clickable

* accidentally duplicated a parameter

* adding Chakra icons to web app

* removing version smudge from icons lib

* simplifying clumsy ternary statement

* lint cares that imports are in alphabetical order

* switching drawer images to next.js component (re: #294)

* satiating the linter

* moving BoxedNextImage to deign-system

* Fix server side rendering issues with backdrop filter

* boxing next.js images

* these only look broken in Chrome's mobile emulator 🍄

* making the serialization fix precisely correct 🎷

Co-authored-by: Will Holcomb <dys@dhappy.org>
Co-authored-by: Pacien Boisson <pakokrew@gmail.com>
2021-02-16 11:20:41 +04:00
..

MetaGame Design System User Guide

This was bootstrapped using TSDX. Modified README for MetaGame usage below:

Congrats! You just saved yourself hours of work by bootstrapping this project with TSDX. Lets get you oriented with whats here and how to use it.

This TSDX setup is meant for developing React components (not apps!) that can be published to NPM. If youre looking to build an app, you should use create-react-app, razzle, nextjs, gatsby, or react-static.

If youre new to TypeScript and React, checkout this handy cheatsheet

Commands

TSDX scaffolds your new library inside /src.

The recommended workflow is to run TSDX in one terminal:

yarn start

This builds to /dist and runs the project in watch mode so any edits you save inside src causes a rebuild to /dist.

Then run storybook:

Storybook

Run inside another terminal:

yarn storybook

This loads the stories from ./stories.

NOTE: Stories should reference the components as if using the library, similar to the example playground. This means importing from the root project directory. This has been aliased in the tsconfig and the storybook webpack config as a helper.

To run tests, use yarn test.

Jest

Jest tests are set up to run with npm test or yarn test. This runs the test watcher (Jest) in an interactive mode. By default, runs tests related to files changed since the last commit.

Folder Structure

/.storybook       # Storybook configuration
/__tests__        # Test Files
  foo.test.tsx
/src
  index.tsx       # Entry Point
  theme/index.ts        # Default Theme
/stories          # Storybook files
  Foo.stories.tsx
package.json
tsconfig.json

Rollup

TSDX uses Rollup v1.x as a bundler and generates multiple rollup configs for various module formats and build settings. See Optimizations for details.

Optimizations

Please see the main tsdx optimizations docs. In particular, know that you can take advantage of development-only optimizations:

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

// inside your code...
if (__DEV__) {
  console.log('foo');
}

You can also choose to install and use invariant and warning functions.

Module Formats

CJS, ESModules, and UMD module formats are supported.

The appropriate paths are configured in package.json and dist/index.js accordingly. Please report if any issues are found.

Named Exports

Per Palmer Group guidelines, always use named exports. Code split inside your React app instead of your React library.