NOTE: You are viewing documentation for the MoovJS/Adapt version of the Moovweb SDK
View documentation for next-gen Moovweb XDN & PWA framework
Moovweb | moov_perf
Menu Developer Moovweb University



moov_perf is a MoovJS Node module that provides a number of methods to enhance performance on your Moovweb-transformed project site.


Perf should always be required first.

const Perf = require("moov_perf");

Perf extends an existing selector engine prototype. When instantiating the perf object, pass in the prototype of your selector engine (with Moovweb, this is the global $). This gives you access to the Perf functions while modifying a selection, as well as a blacklist for domains you specifically do not wish to optimize while performing image optimizations.

let perf = new Perf($);


Quick Start

$ cp .npmrc.example .npmrc
$ npm install

This will build the Node modules that moov_perf depends under the local moov_perf directory. The npm-shrinkwrap.json file is used to version-lock all dependencies.


$ npm test

Run Locally via Node CLI

$ node --harmony
> var perf = require("./main.js");
> var selector = require("moov_cheerio").cheerio;
> var my_perf = new perf(selector);
Last updated Mon Feb 26 2018 22:51:26 GMT+0000 (UTC)