Hyperz Documentation > Products > Verbatim > Module Pushing

Module Pushing

Hyperz

Module Pushing

Some may find this part confusing, just re-read it until it makes sense lmao, trust me, if you read it carefully you will eventually understand.

So, in order to require CUSTOM FILE FORMATS in base NodeJS, you will need an "interpretter". This is what I have created hyperz-verbatim NPM for, as it will do the job just fine!

When using ANY file formats that are not written in JavaScript, you will need to require some sort of external module.

In this case, your code may look similar to this:

require('hyperz-verbatim').setExtension('.hyperz'); // Setup backend code (this would be your custom file extension)
require('./backend.hyperz')('Hello World!'); // Require that custom file with your custom extension and pass params

and the code before it was compiled inside of ./backend.hyperz could look like this:

module.exports = function(content) {
   console.log(content);
};

So essentially, if you DONT REQUIRE some sort of interpreter npm module, you will likely get an error like this:

errorex


Was this article helpful?

23 out of 48 found this helpful