DHTMLX Gantt 项目使用教程
ganttGPL version of Javascript Gantt Chart项目地址:https://gitcode.com/gh_mirrors/gan/gantt
1. 项目的目录结构及介绍
DHTMLX Gantt 项目的目录结构如下:
gantt/
├── codebase/
│ ├── sources/
│ ├── dhtmlxgantt.js
│ ├── dhtmlxgantt.css
│ └── ...
├── docs/
│ ├── api/
│ ├── guides/
│ └── ...
├── samples/
│ ├── basic_init/
│ ├── custom_scale/
│ └── ...
├── LICENSE.txt
├── README.md
└── package.json
目录结构介绍
codebase/
: 包含 Gantt 的核心源文件,如dhtmlxgantt.js
和dhtmlxgantt.css
。docs/
: 包含 API 文档和使用指南。samples/
: 包含各种示例项目,展示 Gantt 的不同功能。LICENSE.txt
: 项目的许可证文件。README.md
: 项目的介绍和基本使用说明。package.json
: 项目的 npm 配置文件。
2. 项目的启动文件介绍
项目的启动文件主要是 codebase/dhtmlxgantt.js
和 codebase/dhtmlxgantt.css
。
dhtmlxgantt.js
这是 Gantt 的核心 JavaScript 文件,包含了 Gantt 的所有功能和逻辑。在使用 Gantt 时,需要引入这个文件。
<script src="codebase/dhtmlxgantt.js"></script>
dhtmlxgantt.css
这是 Gantt 的样式文件,定义了 Gantt 的外观和布局。在使用 Gantt 时,需要引入这个文件。
<link rel="stylesheet" href="codebase/dhtmlxgantt.css">
3. 项目的配置文件介绍
项目的配置文件主要是 package.json
。
package.json
package.json
文件包含了项目的元数据和依赖信息。以下是一些关键字段:
name
: 项目名称。version
: 项目版本。description
: 项目描述。main
: 项目的主入口文件。scripts
: 定义了一些可执行的脚本命令。dependencies
: 项目的依赖包。
示例 package.json
文件内容:
{
"name": "dhtmlx-gantt",
"version": "7.1.15",
"description": "An open source JavaScript Gantt chart that helps you illustrate a project schedule in a nice-looking chart.",
"main": "codebase/dhtmlxgantt.js",
"scripts": {
"start": "http-server -p 8080"
},
"dependencies": {
"http-server": "^0.12.3"
}
}
通过这个文件,可以了解项目的版本、依赖和如何启动项目。
ganttGPL version of Javascript Gantt Chart项目地址:https://gitcode.com/gh_mirrors/gan/gantt