You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/build-apps/use-third-party-libraries.md
+9-9Lines changed: 9 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
Every developer learns one of the most important principles of software engineering early in their career: DRY (Don’t Repeat Yourself). Using third-party libraries can save your time as you do not need to develop the functionality that the library provides. Openblocks provides some built-in third-party libraries for common uses, and you can manually import other libraries on demand.
4
4
5
-
###Built-in libraries
5
+
## Built-in libraries
6
6
7
7
Openblocks provides some JavaScript built-in libraries for use:
8
8
@@ -14,7 +14,7 @@ Openblocks provides some JavaScript built-in libraries for use:
Openblocks supports setting up preloaded JavaScript and libraries which can be **app-level** or **workspace-level**.
20
20
@@ -65,25 +65,25 @@ Now let's take **cowsay** as an example and import it on app-level and workspace
65
65
66
66
### Import on App-level
67
67
68
-
Navigate to the left sidebar, click <imgsrc="../../.gitbook/assets/image (1).png"alt=""data-size="line"> > **Other** > **Scripts and style** > **Add a library**. Then paste the **cowsay** link here.
68
+
Navigate to the left sidebar, click <imgsrc="../.gitbook/assets/image (1).png"alt=""data-size="line"> > **Other** > **Scripts and style** > **Add a library**. Then paste the **cowsay** link here.
69
69
70
-
<figure><imgsrc="../../.gitbook/assets/Add a library (2).png"alt=""><figcaption></figcaption></figure>
70
+
<figure><imgsrc="../.gitbook/assets/Add a library (2).png"alt=""><figcaption></figcaption></figure>
71
71
72
72
Now you can write code in **JS query** to test its usage with `cowsay.say`:
73
73
74
-
<figure><imgsrc="../../.gitbook/assets/write code in JS query (2).png"alt=""><figcaption></figcaption></figure>
74
+
<figure><imgsrc="../.gitbook/assets/write code in JS query (2).png"alt=""><figcaption></figcaption></figure>
75
75
76
76
or in component **Properties**:
77
77
78
-
<figure><imgsrc="../../.gitbook/assets/or in Properties (2).png"alt=""><figcaption></figcaption></figure>
78
+
<figure><imgsrc="../.gitbook/assets/or in Properties (2).png"alt=""><figcaption></figcaption></figure>
79
79
80
80
And since you have set up cowsay just for **Openblocks's new application 1,** you can not use cowsay in another app.
81
81
82
-
<figure><imgsrc="../../.gitbook/assets/in another app (1).png"alt=""><figcaption></figcaption></figure>
82
+
<figure><imgsrc="../.gitbook/assets/in another app (1).png"alt=""><figcaption></figcaption></figure>
83
83
84
84
### Import on Workspace-level libraries
85
85
86
86
Navigate to **Workspace settings** > **Advanced** > **JavaScript library** > **Add a library**. Then paste the **cowsay** link here and click **Save**. Now you can use **cowsay** library **** in any app of your workspace.\
87
-
.png>)
87
+
.png>)
88
88
89
-
<figure><imgsrc="../../.gitbook/assets/Import on Workspace-level libraries-advanced.png"alt=""><figcaption></figcaption></figure>
89
+
<figure><imgsrc="../.gitbook/assets/Import on Workspace-level libraries-advanced.png"alt=""><figcaption></figcaption></figure>
0 commit comments