just-task is a robust, lightweight library for defining and orchestrating build tasks in JavaScript and TypeScript projects. It functions as the foundational task definition layer within the broader `Just` ecosystem developed by Microsoft, which also includes `just-scripts` for higher-level, opinionated build presets. Currently at version 1.13.0, just-task provides core primitives such as `task`, `series`, and `parallel` for structuring complex build flows. Its release cadence is generally stable, with updates focusing on refinements and bug fixes rather than frequent breaking changes within the 1.x major version. A key differentiator is its unopinionated nature regarding specific tools (e.g., Webpack, Jest, TypeScript compiler), allowing developers to integrate their preferred tools seamlessly. It targets Node.js environments version 14 and above, offering both CommonJS and ES Module compatibility for task definitions. This library emphasizes clear, programmatic task definition, providing a flexible alternative to more configuration-heavy or tightly coupled build systems.
npm install just-taskVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to define a series of asynchronous tasks and combine them into complex build flows using `just-task`.
Modify your task function to return a Promise (e.g., `return new Promise(...)`) or declare it as `async function() { /* await ... */ }`.Evaluate if `just-scripts` better suits your project's needs for standard build configurations, or continue with `just-task` for full customization.
Review the `just-task` release notes on GitHub or the official documentation (microsoft.github.io/just/) before upgrading, particularly for any non-trivial version changes.
Ensure your configuration file is named `just.config.ts` or `just.config.js` and is located in the root directory of your project, or explicitly specify its path using the `--config` flag with the `just` CLI.
Double-check the task name for typos. Verify that your `just.config.ts` (or `.js`) file is correctly named and located in the project root, or specify its path with `npx just --config ./path/to/my.config.ts myTask`.
Ensure your asynchronous task function explicitly returns a Promise (e.g., `return new Promise(resolve => { /* ... */ resolve(); });`) or use the `async` keyword: `task('myAsync', async () => { await someAsyncOperation(); });`Verify that you are using the correct import syntax for your file's module type (ESM `import { task } from 'just-task';` or CommonJS `const { task } = require('just-task');`) and that the exports are correctly destructured.No dependency data recorded yet.