Registry / devops / glov-build

glov-build

JSON →
library1.0.53jsnpmunverified

GLOV.js Build System is a specialized build tool designed for JavaScript game development, emphasizing fast, incremental builds and live updates for assets across various formats. Currently at version 1.0.53, it is no longer under active development but maintains MEDIUM-HIGH API stability, being used in multiple production projects. Its primary differentiator lies in its tailored approach to handle the unique demands and scaling challenges of large game projects built within the GLOV.js ecosystem, aiming to overcome shortcomings found in more general-purpose build systems when applied to this specific context. It orchestrates builds through a system of 'tasks' and 'jobs', where individual jobs are executed incrementally only if their dependencies have changed, and their outputs trigger further tasks only if the output truly differs, ensuring efficient processing by only rebuilding what is strictly necessary.

npm install glov-build
INSTALL
IMPORT
SIG · GLOV-BUILD
G
glov-build
devopsjavascriptv1.0.53
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

gb
const gb = require('glov-build');
import gb from 'glov-build';
The package primarily uses CommonJS `require` syntax. Direct ES Module `import` is not supported for the main export.
gb.task
gb.task({...});
import { task } from 'glov-build';
Task definition is accessed as a method on the main `gb` object, not as a named export.
gb.SINGLE
type: gb.SINGLE
import { SINGLE } from 'glov-build';
Constants like `SINGLE` and `ALL` are properties of the main `gb` export, not top-level named exports.

This example demonstrates how to configure `glov-build`, define two basic tasks ('copy' for single files and 'concat' for multiple files), establish dependencies, and run a default build with file watching.

const gb = require('glov-build'); gb.configure({ source: 'src', statedir: 'out/.gbstate', targets: { dev: 'out', }, }); gb.task({ name: 'copy', input: 'txt/*.txt', type: gb.SINGLE, target: 'dev', func: function copy(job, done) { job.out(job.getFile()); done(); }, }); gb.task({ name: 'concat', input: [ 'txt/*.txt', 'txt/*.asc', ], type: gb.ALL, target: 'dev', func: function concatSimple(job, done) { let files = job.getFiles(); let buffer = Buffer.concat(files.filter(a => a.contents).map(a => a.contents)); job.out({ relative: 'concat.txt', contents: buffer, }); done(); }, }); gb.task({ name: 'default', deps: ['copy', 'concat'], }); gb.go({ tasks: ['default'], watch: true, });
glov-build --version
Debug
Known issues
gotchaGLOV.js Build System is no longer under active development. While used in production, new features or active maintenance should not be expected. Users should be prepared for community-driven support or potential forks for future enhancements.
fix
Consider its 'maintenance' status when planning long-term project dependencies; be prepared to contribute or fork for specific needs.
affects: >=1.0.0
gotchaThe build system is primarily tailored for the GLOV.js ecosystem and large JavaScript game development projects. While general-purpose build tasks can be created, its core design and optimizations are geared towards this specific use case, which might lead to less optimal experiences or lack of specific features for non-game or non-GLOV.js projects.
fix
Evaluate its suitability for your project's specific needs, especially if not within the GLOV.js or game development sphere. Refer to the GLOV.js build scripts for complex real-world usage examples.
affects: >=1.0.0
breakingAll examples and common usage patterns rely on CommonJS `require()` syntax. Attempting to use ES Module `import` syntax directly for the main `glov-build` module will likely result in import errors or unexpected behavior due to its older architecture.
fix
Always use `const gb = require('glov-build');` to import the module. If integrating into an ESM-only project, consider a CommonJS wrapper or a dedicated build step for transpilation.
affects: <=1.x
gotchaTasks using `gb.SINGLE` will execute the job function once per *changed* input file, while `gb.ALL` executes once for *all* relevant input files. Misunderstanding this distinction can lead to incorrect build outputs or inefficient processing.
fix
Carefully select `gb.SINGLE` or `gb.ALL` based on whether your job needs to process files individually or collectively. Ensure your `func` implementation correctly handles the input format (`job.getFile()` vs `job.getFiles()`) for the chosen type.
affects: >=1.0.0
Errors
Common errors & fixes
Error: Cannot find module 'glov-build'
The package is not installed or incorrectly referenced.
fix
Run `npm install glov-build` or `yarn add glov-build` in your project directory. Ensure the `require()` path is correct.
TypeError: gb.task is not a function
Attempting to call `task` as a named import or on an undefined `gb` object.
fix
Verify that `const gb = require('glov-build');` was executed successfully and `gb` holds the module export. `task` is a method of the main `gb` object, not a standalone function or named export.
Job output not recognized or file not written: relative: 'file.txt'
`job.out()` was called with an invalid object or contents, or `done()` was not called.
fix
Ensure `job.out()` receives an object with at least `relative` and `contents` (or a `File` object from `job.getFile()`). Always call `done()` at the end of your job function to signal completion, even if an error occurs.
Error: Watcher failed for input glob: 'src/*.js'
Incorrect or malformed glob pattern provided for `input` in a task definition.
fix
Review the `input` glob pattern for syntax errors. Ensure the paths are relative to the configured `source` directory or absolute if specified.
Upgrade
Version history
1.0.53latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources
glov-build — npm install glov-build · libregistry