Skip to content
This repository was archived by the owner on Jun 5, 2020. It is now read-only.

Migration

Daniel Wirtz edited this page Aug 22, 2014 · 2 revisions

While MetaScript provides much more than just what a preprocessor offers, migration from Preprocessor.js or a similar tool is pretty much straight forward.

include

Preprocessor (always absolute to base directory)

// #include "path/to/file.js"

MetaScript (relative to the current file's directory)

//? include("path/to/file.js");

ifdef, ifndef, if

Preprocessor

// #ifdef FULL
console.log("Including extension");
// #else
console.log("Not including extension");
// #endif

MetaScript

//? if (typeof FULL !== 'undefined') {
console.log("Including extension");
//? } else {
console.log("Not including extension");
//? }

define

Preprocessor

// #define PI=Math.PI

MetaScript

//? PI = Math.PI;

put

Preprocessor

var version = // #put '"'+VERSION+'";"'

MetaScript

var version = /*?== VERSION */;

See: MetaScript API

Clone this wiki locally
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy