This repository was archived by the owner on Jun 5, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
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.
Preprocessor (always absolute to base directory)
// #include "path/to/file.js"MetaScript (relative to the current file's directory)
//? include("path/to/file.js");Preprocessor
// #ifdef FULL
console.log("Including extension");
// #else
console.log("Not including extension");
// #endifMetaScript
//? if (typeof FULL !== 'undefined') {
console.log("Including extension");
//? } else {
console.log("Not including extension");
//? }Preprocessor
// #define PI=Math.PIMetaScript
//? PI = Math.PI;Preprocessor
var version = // #put '"'+VERSION+'";"'MetaScript
var version = /*?== VERSION */;See: MetaScript API