rwynn / monstache

a go daemon that syncs MongoDB to Elasticsearch in realtime. you know, for search.
https://rwynn.github.io/monstache-site/
MIT License
1.28k stars 181 forks source link

Quick question: Can we import from another .js file in a Javacript script? #45

Closed aguyinmontreal closed 6 years ago

aguyinmontreal commented 6 years ago

Can we import from another .js file in a Javacript script?

If yes, how to? And where does a relative path should start from (the .exe file OR the TOML file)?

rwynn commented 6 years ago

No you cannot do that yet.

aguyinmontreal commented 6 years ago

No problem! I'll just copy paste my code into the config.toml file.

rwynn commented 6 years ago

@aguyinmontreal in the latest version you can reference a file path to a script. You still cannot import scripts from within the script itself though. You would need to use a build tool to bundle everything together. https://rwynn.github.io/monstache-site/config/#script