Meteor shell using .load
Meteor newbie here. When I run meteor shell
and open the help menu, one of the commands is - .load
but I don't know how to use that and couldn't find any documentation. I have file.js
in the root of my project directory. Here's what I've tried so far:
# in a meteor shell
> .load
Failed to load:
> .load ./file.js
Failed to load:./file.js
> .load file.js
Failed to load:file.js
> .load("./file.js")
Invalid REPL keyword
A use case would be appreciated!
source to share
You must provide the full path of the file to the command .load
.
Mac solution
First open a terminal and drag the file to the terminal , you should get something like this.
/Users/yourName/Desktop/helper/test.js
Now that this path starts.
meteor shell
.load /Users/yourName/Desktop/helper/test.js
Linux solution
use readlink
readlink -f file.txt //copy the path and do the same meteor shell .load given path
Windows solution
Right click on the file and copy as Path
, here is a sample image. and repeat the same as on Mac and Linux solutions.
Here is my example output.
> .load /Users/Ethaan/Desktop/helper/test.js
> console.log("Test") //i have this on a single file.
>
source to share