Skip to content
/ wolt Public

Minimalists synchronous build tasks assistant

Notifications You must be signed in to change notification settings

nick133/wolt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WOLT minimalists tasks assistant

To assist you with a simple build tasks. For the case when webpack mostly do the job and gulp is an overkill.

Features

  • synchronous, no hassle with tasks order
  • dependency tracking
  • incremental build support

Design concepts

  • no plugins. If you need some module - use it, no special behaviour
  • task is a function, dependency is a function. No cryptic syntax, no hints, no tricks - run them when you need in exact order
  • run your single script for all tasks, having full control of its flow, no additional tool/config

Background

When I started using webpack I realised there's no need for gulp anymore. Gulp is great, but when it comes to simple tasks and predictable order it's a mess (please read this: recipe, issue, post). Finally I've got back to custom build scripts, but hey, one script per task is a bad idea, I need all-in-one simple config with no additional fancy CLI tool. That's how it was born.

API

Please read pretty generated API docs here or just look at the source, it's full of comments and almost no code

Examples

Please look at the live example in examples/tasks.js

Create build.js:

const task = require('wolt');

task.is('default', 'build');

task.alias('build', 'buildme', 'make', 'bake');

task.is('build:dev', () => {
    task.do('dependent');
    task.do('more-dependent', {param: 'some-param'});

    task.force('always-do-this');

    if (!task.check(src, dest)) {
        task.log('build:dev', 'Everything is up to date!');
        return;
    }

    webpackDevServer();
    
    openBrowser();
});

task.cli();

Now run it as: node build.js --task clean,build --quiet

FAQ

Why didn't you just use GNU make if you don't need async tasks?

  • I thought of it. Seriously. But make's syntax lacks a full power of Javascript, you know.

Why didn't you just continue using gulp?

  • As I said, I don't like just-another-one fancy CLI for this and that. Especially when webpack do it all (almost).

Why do I need this? Its source almost has no code, just comments..

  • Actually, you don't..

What it means, WOLT?

  • It's reversed acronym for Task List Of Whatever, or Task List Or What? Task List Order Wise is also a good variant.

Bugs

Please fix them and report if you found some =)

Releases

No releases published

Packages

No packages published