# freemason

> Free-form build automation

Latest version **0.1.2** (published 2014-08-28) · GPLv2 license · 0 weekly downloads

## Install

```sh
npm install freemason
pnpm add freemason
yarn add freemason
bun add freemason
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.2 |
| Published | 2014-08-28 |
| First published | 2014-08-18 |
| Weekly downloads | 0 |
| License | GPLv2 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Alexander Sagalovskiy |
| Maintainers | spikesagal |
| Keywords | build, task, auto, manage, easy, install, bundle, concat, package, minify, obfuscate |

## Links

- npm: https://www.npmjs.com/package/freemason
- Repository: https://github.com/spikesagal/freemason
- Issues: https://github.com/spikesagal/freemason/issues
- npm.io page: https://npm.io/package/freemason

## Dependencies (1)

- [uglify-js](https://npm.io/package/uglify-js.md) *

## Alternatives

- [raw-loader](https://npm.io/package/raw-loader.md) — 4.3M weekly downloads
- [plop](https://npm.io/package/plop.md) — 1.4M weekly downloads
- [webpack-deadcode-plugin](https://npm.io/package/webpack-deadcode-plugin.md) — 80.3K weekly downloads
- [@storybook/preact-vite](https://npm.io/package/@storybook/preact-vite.md) — 54.2K weekly downloads
- [vite-plugin-transform](https://npm.io/package/vite-plugin-transform.md) — 2.4K weekly downloads

## Recent versions

- 0.1.2 (latest) — 2014-08-28
- 0.1.1 — 2014-08-20
- 0.1.0 — 2014-08-18

## README

freemason
=========

A simple way to bundle, minify, and attribute JavaScript packages. No configuration required!

Here is an example of a build file (let's name it `build.js`):

```JavaScript
var build = require('freemason').tasks;
build.concatenate('sourcefile1.js','sourcefile2.js');
build.minify();
build.attribute('src/credits.txt');
build.write('dist/bundle.min.js');
```

To build, just run `node build.js`. That's it! This is all you need to do in order to concatenated a bunch of files, minify/obfuscate the result, put some credits on top, and write it to a file.

Want to write your own tasks? There are only four conventions to keep in mind:

1. `buffer` is used by all tasks implicitly, to store the state of your build.
2. `tasks` contains all the default tasks (currently `concatenate`, `minify`, `attribute`, and `write`).
3. `queueTask` must be used to run a task synchronously, and all calls to `queueTask` must be made within the first execution loop. Don't queue tasks on asynchronous callbacks -- it won't work. Instead, build any asynchronous functionality into the task definition.
4. `taskDone` must be called when the task is complete, in order to move on to the next task.

---
_Source: https://npm.io/package/freemason · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
