Ask Your Question
0

How to import other JavaScript macro to a current working macro?

asked 2019-07-26 05:42:37 +0200

aaronamm gravatar image

Hello everyone.

I have started working on JavaScript macro development.

Given I have two JavaScript macros like this.

  • library.js
  • myproject.js

image description

myproject.js is my current working macro and I what to import some reusable function in side library.js to this macro.

How do I import library.js to myproject.js?

Could you please give some suggestion, blog post or code example for this?

Thank you so much.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2019-07-27 09:58:06 +0200

Hi, maybe you can create a new document in the project folder, modify it and delete the content, and then copy / paste the contents of the libray.js file.

If my answer helped you, vote it with ✔ (here on the left)

edit flag offensive delete link more

Comments

Hi @charlie.it thank you for suggestion. Please correct me if I understand it incorrectly.

Does it mean we will copy content of library.js to myproject.js? If so, this is not what I want. I want to make library.js to reusable for other projects as well. For example, inside my project.js, do we have something like.

import 'library.js' include 'library.js'

Thanks.

aaronamm gravatar imageaaronamm ( 2019-07-29 03:32:29 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2019-07-26 05:42:37 +0200

Seen: 39 times

Last updated: Jul 27