This package has been deprecated

Author message:

Renamed to glov-build

glovjs-build

0.0.4 • Public • Published

GLOV.js Build System

API Stability: LOW - under active development

A build system tailored for JavaScript game development, focused on fast, incremental builds with live updates of assets in many shapes and sizes. Created primarily for large projects built on GLOV.js in order to address the many shortcomings of other options that exhibit themselves as a project grows in size.

Simple example

const gb = require('glovjs-build');

gb.configure({
  source: 'src',
  statedir: 'out/.gbstate',
  targets: {
    dev: 'out',
  },
});

gb.task({
  name: 'copy',
  input: 'txt/*.txt',
  type: gb.SINGLE, // Type SINGLE - `func` is called once per changed input file
  target: 'dev',
  func: function copy(job, done) {
    job.out(job.getFile());
    done();
  },
});

gb.task({
  name: 'concat',
  input: [
    'txt/*.txt',
    'txt/*.asc',
  ],
  type: gb.ALL, // Type ALL - `func` is called once with all input files
  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,
});

More Complex Examples

Readme

Keywords

none

Package Sidebar

Install

npm i glovjs-build

Weekly Downloads

0

Version

0.0.4

License

MIT

Unpacked Size

89.5 kB

Total Files

9

Last publish

Collaborators

  • jimbly