Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

glov-build

Package Overview
Dependencies
Maintainers
0
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

glov-build

GLOV.js Build System

  • 1.0.47
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
31
decreased by-73.73%
Maintainers
0
Weekly downloads
 
Created
Source

GLOV.js Build System

API Stability: MEDIUM-HIGH - No longer under active development, used in multiple production projects

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.

Overview

Tasks

A task represents a stage in the build pipeline, and define the inputs and how jobs are run on those inputs (either per-input or on all inputs at once). Specifically, a task usually defines an input glob and a job function to run on those files.

Jobs

A job is a single operation on an input or set of inputs. Individual jobs are only ran if one of their dependencies have changed, and their outputs only trigger dependent tasks to run if the output actually changes.

Simple example

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, // 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

Keywords

FAQs

Package last updated on 17 Dec 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc