-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Rodolfo Herrera
committed
Jul 30, 2021
1 parent
d9cfdad
commit 694aef7
Showing
6 changed files
with
287 additions
and
110 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
export const SayHelloWithPython = () => { | ||
pythonString("print('Hello world')"); | ||
} | ||
|
||
export const MyVar = "Hello"; | ||
|
||
export function MyFunction(){ | ||
console.log('Hello'); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// Static Import | ||
import { SayHelloWithPython, MyVar, MyFunction } from "./examples/import/library.js"; | ||
|
||
SayHelloWithPython(); // Calling the function from other file =D | ||
|
||
console.log(MyVar); | ||
|
||
MyFunction(); | ||
|
||
// Dynamic Import | ||
import('./examples/import/library.js') | ||
.then((module) => { | ||
module.SayHelloWithPython(); // Calling the function using module parameter =D | ||
|
||
console.log(module.MyVar); | ||
|
||
MyFunction(); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.