From 075c354eb55681a64b7a0361cb4ca5be44c82476 Mon Sep 17 00:00:00 2001 From: Luke Wilson Date: Wed, 23 Nov 2022 10:56:06 +0000 Subject: [PATCH] build development example --- development/javascript/javascript-embed.js | 42 +++++++++++++++++ development/javascript/javascript-import.js | 45 +++++++++++++++++++ .../javascript/javascript-standalone.js | 39 ++++++++++++++++ 3 files changed, 126 insertions(+) create mode 100644 development/javascript/javascript-embed.js create mode 100644 development/javascript/javascript-import.js create mode 100644 development/javascript/javascript-standalone.js diff --git a/development/javascript/javascript-embed.js b/development/javascript/javascript-embed.js new file mode 100644 index 0000000..5619e0d --- /dev/null +++ b/development/javascript/javascript-embed.js @@ -0,0 +1,42 @@ +//=============// +// FROGASAURUS // +//=============// +const JavascriptFrogasaurus = {} + +//========// +// SOURCE // +//========// +{ + //====== ./greet.js ====== + { + JavascriptFrogasaurus["./greet.js"] = {} + const greet = (name) => { + console.log(`Hello ${name}!`) + } + + + JavascriptFrogasaurus["./greet.js"].greet = greet + } + + //====== ./main.js ====== + { + JavascriptFrogasaurus["./main.js"] = {} + + const main = () => { + greet('World') + } + + JavascriptFrogasaurus["./main.js"].main = main + } + + const { greet } = JavascriptFrogasaurus["./greet.js"] + +} + +//=========// +// EXPORTS // +//=========// +const Javascript = { + greet: JavascriptFrogasaurus["./greet.js"].greet, + main: JavascriptFrogasaurus["./main.js"].main, +} \ No newline at end of file diff --git a/development/javascript/javascript-import.js b/development/javascript/javascript-import.js new file mode 100644 index 0000000..adb834c --- /dev/null +++ b/development/javascript/javascript-import.js @@ -0,0 +1,45 @@ +//=============// +// FROGASAURUS // +//=============// +const JavascriptFrogasaurus = {} + +//========// +// SOURCE // +//========// +{ + //====== ./greet.js ====== + { + JavascriptFrogasaurus["./greet.js"] = {} + const greet = (name) => { + console.log(`Hello ${name}!`) + } + + + JavascriptFrogasaurus["./greet.js"].greet = greet + } + + //====== ./main.js ====== + { + JavascriptFrogasaurus["./main.js"] = {} + + const main = () => { + greet('World') + } + + JavascriptFrogasaurus["./main.js"].main = main + } + + const { greet } = JavascriptFrogasaurus["./greet.js"] + +} + +//=========// +// EXPORTS // +//=========// +export const { greet } = JavascriptFrogasaurus["./greet.js"] +export const { main } = JavascriptFrogasaurus["./main.js"] + +export const Javascript = { + greet: JavascriptFrogasaurus["./greet.js"].greet, + main: JavascriptFrogasaurus["./main.js"].main, +} \ No newline at end of file diff --git a/development/javascript/javascript-standalone.js b/development/javascript/javascript-standalone.js new file mode 100644 index 0000000..61498a6 --- /dev/null +++ b/development/javascript/javascript-standalone.js @@ -0,0 +1,39 @@ +//=============// +// FROGASAURUS // +//=============// +const JavascriptFrogasaurus = {} + +//========// +// SOURCE // +//========// +{ + //====== ./greet.js ====== + { + JavascriptFrogasaurus["./greet.js"] = {} + const greet = (name) => { + console.log(`Hello ${name}!`) + } + + + JavascriptFrogasaurus["./greet.js"].greet = greet + } + + //====== ./main.js ====== + { + JavascriptFrogasaurus["./main.js"] = {} + + const main = () => { + greet('World') + } + + JavascriptFrogasaurus["./main.js"].main = main + } + + const { greet } = JavascriptFrogasaurus["./greet.js"] + +} + +//======// +// MAIN // +//======// +JavascriptFrogasaurus["./main.js"].main(...Deno.args) \ No newline at end of file