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
You can add Gantt code file into your project in several ways, depending on the type of an application you create:
62
64
63
-
-[Include files via the <script> tag](#scripttag)
64
-
-[Import files into ES6/7 and TypeScript apps](#moduleimport)
65
-
-[Include files into a RequireJS-based app](#requirejsimport)
65
+
-[Include files via the <script> tag](#usingscripttag)
66
+
-[Import files into ES6/7 and TypeScript apps](#importfilesintoes67andtypescriptapps)
67
+
-[Using Gantt with Vite](#usingganttwithvite)
68
+
- [Svelte production build](#svelteproductionbuild)
69
+
-[Include files into a RequireJS-based app](#includefilesintoarequirejsbasedapp)
66
70
67
71
68
-
Include files via the <script> tag
72
+
Include files via the <script> tag {#usingscripttag}
69
73
--------------------------------------------
70
74
71
75
The dhtmlxGantt requires including 2 code files on the page:
@@ -82,9 +86,11 @@ Let's quickly explore the structure of the dhtmlxGantt package to find out where
82
86
83
87
Main folders and files that make up the dhtmlxGantt package are:
84
88
85
-
- <b>sources</b> - the source code files of the library. The files are not minified and easy-to-read. The package is mostly intended to be used for components' debugging
86
-
- <b>samples</b> - the code samples
87
-
- <b>codebase</b> - the packed code files of the library. These files have much smaller size and intended to be used in production. <b>In your apps you need to use files from this folder</b>
89
+
- <b>sources</b> - the source code files of the library. The files are not minified and easy-to-read. The package is mostly intended to be used for debugging components.
90
+
- <b>samples</b> - the code samples.
91
+
- <b>codebase</b> - the packed code files of the library. These files have much smaller size and intended to be used in production. <b>In your apps you need to use files from this folder.</b>
92
+
93
+
88
94
89
95
Import files into ES6/7 and TypeScript apps
90
96
---------------------------------------------
@@ -101,6 +107,8 @@ For the Commercial, Enterprise or Ultimate version the command look like this:
101
107
import { gantt, Gantt } from'dhtmlx-gantt';
102
108
~~~
103
109
110
+
111
+
104
112
Using Gantt with Vite
105
113
--------------------------
106
114
@@ -115,48 +123,50 @@ optimizeDeps: {
115
123
}
116
124
~~~
117
125
118
-
### Svelte production build
126
+
### Svelte production build {#svelteproductionbuild}
119
127
120
128
If you use [Gantt in a Svelte app](desktop/howtostart_svelte.md), you need to add the following setting into the **vite.config.js** file for the production build,
121
-
replacing the *gantt_8.0.6_evaluation* folder with the path to your Gantt folder:
129
+
replacing the *gantt_9.0.14_evaluation* folder with the path to your Gantt folder:
122
130
123
131
{{snippet vite.config.js}}
124
132
~~~js
125
133
build: {
126
134
commonjsOptions: {
127
135
include: [
128
136
"node_modules",
129
-
"gantt_8.0.6_evaluation/codebase/dhtmlxgantt.js"
137
+
"gantt_9.0.14_evaluation/codebase/dhtmlxgantt.js"
130
138
]
131
139
},
132
140
}
133
141
~~~
134
142
143
+
144
+
135
145
Include files into a RequireJS-based app
136
146
-------------------------------------------
137
147
138
148
To include dhtmlxGantt files into a RequireJS-based app, you need to follow the logic shown in the example below:
0 commit comments