⚠ This software is a work in progress. ⚠
It's not yet ready for production use, but feel free to give it a try and contribute with issues and pull requests!
Waso (/ˈwaso/, from the toki pona word for "bird") is a refined task runner inspired by Gulp, Grunt, and Taskr.
It is designed to revive the fluid nature of Makefiles in modern Node.js projects, and provide a more versatile asset pipeline than the convoluted systems that tools like Webpack and Parcel offer.
Waso starts with a waso.config.js
file in your project's root directory. It is a JavaScript file that exports an instance of the Waso class.
const { Waso, Task } = require('waso')
const sass = require('waso-sass')
const postcss = require('waso-postcss')
const rollup = require('waso-rollup')
const autoprefixer = require('autoprefixer')
const cssnano = require('cssnano')
module.exports = new Waso({
_js: new Task([
Waso.source('src/js/index.js'),
Waso.incremental({
target: 'dist/js/',
}),
rollup(),
Waso.target('dist/js/'),
]),
_css: new Task([
Waso.source('src/css/index.scss'),
Waso.incremental({
target: 'dist/js/',
renamer: () => 'index.css',
}),
sass(),
postcss([
autoprefixer(),
cssnano(),
]),
Waso.target('dist/css/'),
]),
default: Task.series([ '_js', '_css' ]),
})
From there, all it takes is to run npx waso
to build your project.
Waso is driven by small scripts called transformers, generators which take an input list of files and yield modified versions of them. Transformers can be written manually, but a few are provided out of the box as packages in the Waso monorepo.
Package | Description |
---|---|
waso-babel | Transform JavaScript files with Babel. |
waso-postcss | Apply PostCSS transformations to CSS files. |
waso-rollup | Bundle JavaScript files with Rollup. |
waso-sass | Transform Sass and SCSS files into CSS files. |
waso-svgo | Compress SVG files with SVGO. |
waso-terser | Minify JavaScript files with Terser. |
waso-typescript | Transform TypeScript files into JavaScript files. |
Get started by installing Waso with npm i -D waso
. From there, check out the examples or documentation. (TODO)