All Projects → vincentdchan → yesbuild

vincentdchan / yesbuild

Licence: other
A scable and extensible build system for the Web ecosystem.

Programming Languages

typescript
32286 projects
Makefile
30231 projects

Projects that are alternatives of or similar to yesbuild

makestudio
Setup your Delphi Environment very easily - build your projects with more comfort
Stars: ✭ 43 (+34.38%)
Mutual labels:  build-tool
systemjs-tools
(dev)tools for working with SystemJS
Stars: ✭ 41 (+28.13%)
Mutual labels:  build-tool
mix gleam
⚗️ Build Gleam code with mix
Stars: ✭ 84 (+162.5%)
Mutual labels:  build-tool
b2
B2 makes it easy to build C++ projects, everywhere.
Stars: ✭ 38 (+18.75%)
Mutual labels:  build-tool
replify
Minimalist, standalone Clojure(script) build tool
Stars: ✭ 27 (-15.62%)
Mutual labels:  build-tool
alibuild
A simple build tool for ALICE software
Stars: ✭ 19 (-40.62%)
Mutual labels:  build-tool
vim-build-tools-wrapper
Projects building plugin for Vim
Stars: ✭ 23 (-28.12%)
Mutual labels:  build-tool
autosetup
A better, faster autoconf replacement
Stars: ✭ 60 (+87.5%)
Mutual labels:  build-tool
nanobundle
Yet another build tool for libraries, powered by esbuild
Stars: ✭ 45 (+40.63%)
Mutual labels:  build-tool
cdkdx
Zero-config CLI for aws cdk development
Stars: ✭ 31 (-3.12%)
Mutual labels:  build-tool
Nginx-builder
A tool to build deb or rpm package of required Nginx version from the source code, with the ability to connect third-party modules. Nginx parameters are set in the yaml configuration file.
Stars: ✭ 143 (+346.88%)
Mutual labels:  build-tool
CMake-Cheatsheet
Short introduction to CMake with some examples.
Stars: ✭ 90 (+181.25%)
Mutual labels:  build-tool
make
The Ultimate Makefile to compile all your C, C++, Assembly and Fortran projects
Stars: ✭ 41 (+28.13%)
Mutual labels:  build-tool
6umpukc
Тулинг для разработки сайтов и решений на Bitrix под Ubuntu/Windows
Stars: ✭ 13 (-59.37%)
Mutual labels:  build-tool
assemble-core
The core assemble application with no presets or defaults. All configuration is left to the implementor.
Stars: ✭ 17 (-46.87%)
Mutual labels:  build-tool
elite
Fegeya Elitebuild, small, powerful build system. Written in Rust.
Stars: ✭ 24 (-25%)
Mutual labels:  build-tool
atool-build
🔨 Build tool based on webpack.
Stars: ✭ 393 (+1128.13%)
Mutual labels:  build-tool
build
Build system scripts based on GENie (https://github.com/bkaradzic/genie) project generator
Stars: ✭ 30 (-6.25%)
Mutual labels:  build-tool
init-typescript-app
Initialize clean TypeScript setup by running single command. Optional package publication to npm.
Stars: ✭ 20 (-37.5%)
Mutual labels:  build-tool
Textrude
Code generation from YAML/JSON/CSV models via SCRIBAN templates
Stars: ✭ 79 (+146.88%)
Mutual labels:  build-tool

npm version

Yesbuild

中文版

A scable and extensible build system for the Web ecosystem.

Features

  • Automatically dependencies tracing
  • Fast and incremental build WITHOUT resident process
  • Parallel
  • Simple syntaxes to config
  • Easy to compose
  • Easy to know what happended
  • Full typed plugin API
  • Easy to integrate with other bundlers

Why

Currently, most of the bundlers hide the details internally. When the project become large, the dependencies become complex. There is no way to understand how to optimize the procedures.

Besides, it's hard for a bundler to build incrementally. Mosts of the tools load everything into the memory to implement hot reload, that's a disaster for a very large project. It will cost Gb level memory and there is no way to debug.

Yesbuild is a friendly tool for you to make your own building procedures. It divides the building procedure into multiple tasks. Tasks can be composed, and can be excuted standalone. And they are persistent.

It makes your building procedure more reasonable, more easy to compose things.

Install

Globally

npm install -g yesbuild-core

Scoped

yarn install yesbuild-core

or

pnpm i yesbuild-core

Usage

Quick Start

Make a new file named yesbuild.config.js in your project directory.

Define a task:

import yesbuild, { useEsBuild } from 'yesbuild-core';

yesbuild.defineTask('preview', () => useEsBuild({
    entryPoints: ['./src/index.tsx'],
    bundle: true,
    format: 'esm',
    platform: 'browser',
    sourcemap: true,
    splitting: true,
}));

Type yesbuild in shell to run:

yesbuild

And the procedure begins...

When you type yesbuild again, the magic happens:

Nothing changes because the Yesbuild knows that your source files don't changed. If you modified your source files, Yesbuild will execute the action next time you build.

Simple example to start a dev server

This example demonstrates how to compose tasks.

You can use the result of a task as the input to another task.

You can run this example in packages/yesbuild-visualizer/

import yesbuild, { uesEsBuild, useCopy, useTask, useTaskDir, useDevServer } from 'yesbuild-core';

// define a task for the preview assets
yesbuild.defineTask('preview', () => uesEsBuild({
    entryPoints: ['./src/index.tsx'],
    bundle: true,
    format: 'esm',
    platform: 'browser',
    sourcemap: true,
    splitting: true,
}));

// copy static assets to the task directory,
yesbuild.defineTask('assets', function*() {
  const taskDir = useTaskDir();
  yield useCopy('./assets/*', taskDir, {
    relative: './assets/'
  });
});

// use the result of the preview task to start a dev server
yesbuild.defineTask('serve', function* () {
  // get the result of other tasks
  const assets = yield useTask('assets');
  const preview = yield useTask('preview');
  return useDevServer({
    port: 3000,
    mapResults: [assets, result],  // dev server will map the requests to other tasks
  });
});

Type yesbuild -t serve to start the server.

Remember, all the dependencies are saved in the files in your build directory. So if they don't changed, nothing will be built next time.

Check build/yesbuild.preview.yml and you will know what yesbuild has done for you.

Internal actions

Name Description
useEsBuild esbuild
useCopy Copy files
useParallel Run tasks in parallel
useDevServer Run a dev server and map files from other tasks

External actions

Name Package name Location
useTypescript yesbuild-typescript packages/yesbuild-typescript
useSolidJS yesbuild-solidjs packages/yesbuild-solidjs

More and more actions will be added...

Write your own action

Check contributing guide.

Visualization

Running the project in packages/yesbuild-visualizer/ which is built yesbuild. Drag your files in the build folder into it and you can view the dependencies in the browser.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].