Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

meteor shell using .load

Tags:

shell

meteor

Meteor newbie here. When I start meteor shell and open the help menu, one of the command is .load, but I don't know how to use this and wasn't able to find documentation. I have a file.js in the root of the project directory. Here's what I have 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

An example usage would be appreciated!

like image 622
EricC Avatar asked Jul 25 '26 21:07

EricC


1 Answers

You should give the full path of the file to the .load command.

Mac solution

First Open the terminal and drag the file into the terminal, you should get something like this.

/Users/yourName/Desktop/helper/test.js 

Now with that path just run.

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 an image example. and repeat the same like on the mac and linux solutions.

Here is my output of an example.

> .load /Users/Ethaan/Desktop/helper/test.js
> console.log("Test") //i have this on a single file.
> 
like image 163
Ethaan Avatar answered Jul 28 '26 14:07

Ethaan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!