Makatto is a simple webdev stack which which compiles source templates/assets and builds a production version of your website.
Last updated 8 years ago .
BSD · Repository · Original npm · Tarball · package.json
$ cnpm install makatto 
SYNC missed versions from official npm registry.


Simple Node.js command line utility which helps with prototyping a static website. It helps to compile your HTML templates and other resources (JS, LESS). It can also run as a web server with a Livereload (file watcher) feature.


npm install -g makatto


The only thing you need to run Makatto is the source (input) directory, which contains the templates and resources of your static website. By default, Makatto searches for a src subdirectory in the directory where it was started:


You can specify any other input directory:

makatto -i [path]

If no build (output) directory is specified, Makatto searches for a build directory, or creates it when it does not exist.

Running as a web server

If you want to see your compiled web site right away, you can use the server feature. If run as a server, Makatto serves the output directory:

makatto -s

The default port is 9000, but you can specify any other:

makatto -s -p 8888


If run as a server, Makatto can also watch all files for updates and automaticaly reload the web site in the browser after each change. It injects a WebSockets javascript file in every served HTML page (only if the Livereload feature is turned on, of course):

makatto -s -p 8888 -l

All options

Usage: makatto [options]


-h, --help            output usage information
-V, --version         output the version number
-i, --input [path]    The input (source) directory. Default: src
-o, --output [path]   The output (build) directory. Default: build
-t, --tasks [path]    The custom tasks directory. Default: tasks
-s, --server          Serve the build files using a local HTTP server.
-p, --port [port]     Which HTTP port to use for the local HTTP server. Default: 9000
-l, --livereload      Use livereload
-d, --devel           Devel environment flag. Can be used in templates.
-m, --minify          Use minification for resources (CSS/JS)
--sourcemaps          Generate source maps for compiled sources (JS/LESS/...)


Makatto monitores a source folder and runs a specific task for each of the files. The tasks are tied to the files by their extensions.

Right now Makatto ships with theese built-in tasks:

  • html - Compiles *.html files using the Swig templating engine
  • js - No compiling done. But optionaly it minifies the file or/and generates source maps.
  • less - Compiles the *.less files. Optionaly it minifies the file or/and generates source maps.
  • dir - This task simply recreates the directory structure of the input directory in the output directory.
  • other - This task simply copies the unmodified file to the output folder. This task is used for every file, which does not have a task assigned by its extension.

Custom tasks

Makatto is built with custom tasks in mind. If you want to add some other task (to compile Stylus, to optimize PNG images, ...) or to override some built-in task, just create a tasks subdirectory next to your input directory (or any other place, if you use the --tasks option) and create a javascript file named by the extension of the file you want to process (if you want to process a PNG file, create png.js).

Each task must look like this:

module.exports = function(file, config) {
	// do whatever you want in here

The function will be called with these arguments:

  • file
    • path - path to the original file
    • targetPath - path to the target file (the compiled file should be created here)
    • targetDirname - the directory part of targetPath
    • targetFilename - the basename part of targetPath
    • changeType - used mainly if the livereload feature is on. It contains the type of change: updated, created or deleted. On the initial build (when Makatto is started), the value is rebuild.
    • currentStat - the current stat (fs.Stat), after the file change
    • prevStat - the original stat (fs.Stat), before the file change
  • config
    • paths - map of all paths used in the application
    • options - map of all options used in the application
    • tasks - map of all registered tasks

Current Tags

  • 2.0.6                                ...           latest (6 years ago)

23 Versions

  • 2.0.6                                ...           6 years ago
  • 2.0.5                                ...           6 years ago
  • 2.0.4                                ...           6 years ago
  • 2.0.3                                ...           6 years ago
  • 2.0.2                                ...           6 years ago
  • 2.0.1                                ...           6 years ago
  • 1.5.5                                ...           7 years ago
  • 1.5.4                                ...           7 years ago
  • 1.5.3                                ...           7 years ago
  • 1.5.2                                ...           7 years ago
  • 1.5.1                                ...           8 years ago
  • 1.5.0                                ...           8 years ago
  • 1.4.2                                ...           8 years ago
  • 1.4.1                                ...           8 years ago
  • 1.4.0                                ...           8 years ago
  • 1.3.1                                ...           8 years ago
  • 1.3.0                                ...           8 years ago
  • 1.2.0                                ...           8 years ago
  • 1.1.2                                ...           8 years ago
  • 1.1.1                                ...           8 years ago
  • 1.1.0                                ...           8 years ago
  • 1.0.0                                ...           8 years ago
  • 0.0.1                                ...           8 years ago
Maintainers (1)
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 1
Last Month 0
Dependencies (8)
Dev Dependencies (1)
Dependents (0)

Copyright 2014 - 2016 © |