Skip to content

『死亡構建』流程化构建工具 〜 I just want to build, in my way.

License

Notifications You must be signed in to change notification settings

E0SelmY4V/lethal-build

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lethal Build

logo

I just want to build, in my way.

This is a library including some tools that can unlock your self, touch your heart, and build your project in a sexy non-mainstream free-spirited hacking way.

Import

Common JS

const LB = require('lethal-build')(__dirname);

ES Module

import LBIniter from 'lethal-build';

const LB = LBIniter(import.meta.url);

Typescript

import LBIniter from 'lethal-build';
// or
import LBIniter = require('lethal-build');

const LB = LBIniter(__dirname);

Demo

const LB = require('lethal-build')(__dirname);
const { snake, exec, outFS, log, dels } = LB;

// Process chain
snake(

  // Compile
  exec('tsc'),

  // Packing
  exec('webpack'),

  // Assemble
  outFS([
    [1, '!function(exp){'],
    [0, 'packed.js'],
    [1, '}(window)'],
  ], 'main.js'),

  // Clear
  dels([
    'lib/index.js',
    'lib/class.js',
    'packed.js',
  ]),

  // Log
  log('finish.'),

);

// Wow, so elegant.

About

『死亡構建』流程化构建工具 〜 I just want to build, in my way.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published