lethal-build
TypeScript icon, indicating that this package has built-in type declarations

1.3.2 • Public • Published

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.

Package Sidebar

Install

npm i lethal-build

Weekly Downloads

1

Version

1.3.2

License

GPL-3.0-or-later

Unpacked Size

108 kB

Total Files

8

Last publish

Collaborators

  • e0selmy4v