Giter Club home page Giter Club logo

leyman's Introduction

Leyman README

An Nx monorepo for various libraries and plugins.

It is highly recommended when developing locally to use a devcontainer. This will ensure your environment is set up correctly, and not risk interfering with any other settings or packages you may have configured across your desktop.

The .devcontainer directory is fully set up. If you open this repo in VSCode, you should immediately see an option to open it up in DevContainer.

Concepts

PNPM is used for package management. It is highly efficient for sharing disk space while allowing packages to manage dependencies separately.

Nx is used for task running. It manages the required prerequisite steps (e.g. building dependencies) with caching to simplify workflows.

A majority of the code written here is developed with Typescript targeting a Node ESM executable. Conceptually it is not restricted to only that, and could support other languages as well. No raw Javascript should be be used if Typescript is a viable alternative. CommonJS should be avoided unless explicitly required by consomers. Even then, lightly wrapping ESM with libraries like CommonProxy are preferable to maintaining a full CommonJS codebase.

Eslint enforces highly opinionated linting of Typescript files, to both catch issues and enforce a consitent coding style.

Biome enforces Typescript and JSON formatting. It is an optimized replacement for Prettier.

This repo is designed to be used in a DevContainer. This ensures all your runtimes and configurations are properly set up by default, and won't pollute the rest of your workspace.

Getting Started

"Global" packages are installed automatically if using a dev container, but if not see the Dockerfile for list of dependencies (e.g. Node and pnpm).

Run pnpm i to get started.

From there, run nx run <package-name>:<task> --parallel=1. See Nx documetation for more details.

Many tasks are broken down into subtasks to manage the various steps required. For example a typescript build script may perform some codegen before generating the final .js files. See the nx-lifecyle package to see how we manage this!

Some standard tasks are:

  • build
    • Generates executable output code
  • analyze
    • Applies linters/formatters
  • test
    • Runs full test suite for package

Try running nx run-many -t test --parallel=1 to build, analyze, and test the entire package!

See individual packages for documentation.

Known issues

There are a few known issues that impact this monorepo as a whole (per-package issues are tracked separately):

  • Nx is not able to run more than one task in parallel
    • nrwl/nx#22574
    • Workaround is to amend --parallel=1 to all executions
  • Nx does not maintain dependency graph for target overloads
    • nrwl/nx#26928
    • Workaround is to explicitly copy dependsOn to all targets

leyman's People

Contributors

jacobley avatar techmatt101 avatar

Stargazers

 avatar

Watchers

 avatar

leyman's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.