Giter Club home page Giter Club logo

freighter's Introduction

freighter logo

Freighter

Monorepos without the hassle.

Project Status

โ›” UNMAINTAINED

Too much work, not enough reward. The downside of a lego-brick ecosystem is that nothing has cohesion. To properly build Freighter, it would require forking much of the ecosystem and combining it into a monolithic build system, which is far out of scope.

It was a fun experiment, but I'll settle for a bespoke build process in the future.

Purpose

Freighter scaffolds and manages monorepo configurations. Here's what you get right out of the box:

Usage

Requirements: you've already got yarn and git installed.

Installation:

$ yarn global add @freighter/cli

Now you should have a new freighter command in the terminal. Try out the init command:

$ freighter init new-project

In about 15-30 seconds, you should have yourself a fancy, batteries-included monorepo ๐ŸŽ‰

Here are the scripts you'll probably find useful:

  • yarn lint runs ESLint on all the packages
  • yarn test runs every test in the monorepo
  • yarn flow type checks everything
  • yarn ci run all 3 in CI mode

Guarantees

None.

I built Freighter because it can take days to configure all the tooling that makes monorepos so enjoyable. I don't want to spend days. Frankly, I'd rather be building apps. So if Freighter ends up being more work than it's worth, I'll abandon it.

๐Ÿ‰ You've been warned.

Why the name?

Because freighters ship containers. npm packages are kinda like containers. Therefore, monorepos are freighters. #science

Accelerating the project

If you like the idea of Freighter, give it a star โญ

It'll help me gauge interest in the project.

freighter's People

Contributors

dependabot-preview[bot] avatar dependabot[bot] avatar psychollama avatar renovate-bot avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

freighter's Issues

Remove Jest Projects

In practice I'm using Freighter with smaller generators (tsdx, create-react-app) that each have their own test scripts, and they run in radically different ways. CRA is especially grumpy when you have more than one Jest in the workspace.

Jest Projects have proven the most unreliable and annoying part of Freighter. I'd rather rip it out and replace it with a bulk npm run test that runs across the monorepo. Bonus points if it runs in parallel.

Remove Babel as templated feature

In my experience, each package typically manages its own compiler tooling. That means using a framework like tsdx, create-react-app, or managing something bespoke (ugh, ponder). Whatever the case, monorepo level tooling barely buys anything and it certainly doesn't have to be part of the freighter framework. I'd like to rip it out.

It was worth a shot at least.

Precommit hook lints all files, not just changes

The offending template:

{
  "husky": {
    "hooks": {
      "pre-commit": "lint-staged"
    }
  },
  "lint-staged": {
    "*.js": ["freighter-scripts lint --fix", "git add"]
  }
}

And this should be another issue entirely, but make *.js inclusive of TypeScript files and remove the git add step (lint-staged does it automatically these days).

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.