# DataTablesSrc is the unbuilt source behind the DataTables table library

> DataTablesSrc holds the unbuilt JavaScript, CSS and TypeScript sources of DataTables, the library that turns an HTML table into a sortable, searchable and paginated grid. It is not the package most people install, since the distributed npm, NuGet and Composer builds come out of a separate builder.

**DataTables/DataTablesSrc** — DataTables source repository

- Repository: https://github.com/DataTables/DataTablesSrc
- Website: https://datatables.net
- Stars: 807 · Forks: 437
- Language: JavaScript
- License: MIT
- Published: 2026-10-20 · Updated: 2026-10-20 · Language: en
- Canonical page: https://hysenlabs.com/projects/datatables-datatablessrc

## The repository you are looking at is not the one you install

The README opens by making the distinction that matters for anyone who lands here from a search result. This git repository contains the un-built source files for DataTables, an HTML table enhancing library, and if you are looking to use DataTables you should use the download builder, which includes CDN and package options, including NPM.

That is a reasonable arrangement for a project that ships compiled assets to a CDN and to three package ecosystems at once. The build is a separate artefact, and this repository is the input to it.

The package manifest makes the same point from the JavaScript side. The package is named datatables.net-src, and its description says it contains DataTables source files and that the package does not include the built files, with a note to use the datatables.net package instead. The version in the manifest reads 3.0.0, while the published release tags are newer, at 3.1.2, 3.1.3 and 3.1.4, which tells you the source package version and the release tag version are tracked separately.

The licence is MIT. The README states that you are free to use, modify and distribute the software, but that all copyright information must remain, and the repository carries a license.txt and an Authors.txt at the root.

## Building it needs Bash, PHP 7 and Node 20

The build requirements are listed plainly: Bash, PHP 7 or later, and Node.js 20 or later. The presence of PHP in a JavaScript library's toolchain is unusual enough to explain, and the answer is in the build script, which is a shell script driven from npm.

The documented build sequence is four commands:

```bash
git clone https://github.com/DataTables/DataTablesSrc.git

cd DataTablesSrc

npm install
npm run build-debug
npm serve
```

The three npm scripts map onto the build directory. The build-debug script runs the make.sh script with a debug argument, the plain build script runs the same script with the build argument, and the serve script runs it with serve. The result is that the build is a PHP program that npm invokes, which is how the project gets CSS and JavaScript processing in one pass without a separate bundler for the styles.

After npm serve, you open your browser to the address indicated in the console, which is where the example suite runs against the freshly built files.

## The test scripts select an extension through an environment variable

The package manifest shows a test setup that is worth reading closely, because it explains how a library with dozens of extensions keeps its test suite manageable.

The default test command runs Karma against the test configuration in a single run:

```json
    "test": "./node_modules/karma/bin/karma start test/karma.conf.js --single-run",
```

and then there is a long series of extension-specific scripts, each of which sets a DT_EXTENSION environment variable before running the same Karma command. AutoFill, Buttons, ColReorder, DateTime, Editor, FixedColumns, FixedHeader, Responsive, RowGroup, RowReorder and Scroller each have their own script, and the Editor one is the only one that omits the single-run flag so it can be watched.

That is a neat arrangement. One Karma configuration serves the core and every extension, and the extension under test is selected by an environment variable, so a contributor working on ColReorder runs one narrow suite rather than the whole thing.

The repository also has a test-e2e directory and a types directory, and a tsconfig.json, which is consistent with a project that ships TypeScript type definitions alongside the library.

## The examples directory is the documentation of behaviour

The example tree at the repository root is a catalogue of what the library actually does, and it is more useful than a feature list.

There are directories for advanced_init, ajax, api, basic_init, data_sources, datetime, i18n, jquery, layout, plug-ins, resources, server_side and styling, plus an index.xml. Each of those names corresponds to a capability a developer is likely to need and to a question they are likely to have, and running npm serve gives you a browsable set of them.

The server_side directory is the one to look at if you are dealing with large data sets, and the data_sources directory covers the different ways data gets into a table. The plug-ins directory shows what the extension mechanism looks like from the outside.

That last point connects to the README's own claim that the site contains information on the wide variety of plug-ins available, which can be used to enhance and customise a table even further. The plug-in interface is documented on the DataTables website, and the repository is where the plug-ins themselves live and are built.

## Getting the library rather than the source

The primary way to obtain the software is the DataTables downloader, and individual files can also be taken from the DataTables CDN. The installation manual has the full details for both.

For people who prefer a package manager, distribution repositories are available with the software built from this repository under the name datatables.net, on NPM, NuGet and Composer. Styling packages for Bootstrap, Foundation and other styling libraries are available by adding a suffix to the package name, which is a small but important detail: the integration with a CSS framework is a separate package rather than a build flag, so you pull only the styling you use.

Support is split. The DataTables forums are the community channel, and commercial support options are offered separately. Documentation of the options, the API and the plug-in interface lives on the DataTables website rather than in the repository, with the options reference, the API documentation and the plug-in interface all maintained there.

For a team that only wants the library, none of this repository is needed. The only reason to clone it is to change the library or to build a variant of it.

## Where the project is now, and what building it costs you

The repository is not archived and the last push was on 2026-10-15. Recent release tags are 3.1.4 on 2026-10-13, 3.1.3 on 2026-10-02 and 3.1.2 on 2026-09-25, so the release line and the branch are moving together at a steady clip.

The build environment is the real cost of working in this repository. You need PHP and Node installed locally, you need a shell, and the build output is not the artefact anyone else consumes, so a local build is only useful to you or to a fork that publishes its own packages.

That is the decision in front of anyone who comes here. If the goal is a table that sorts and paginates, the download builder or the package manager takes minutes and the documentation on the website covers the options. If the goal is to change how DataTables itself works, to fix a bug in an extension, or to publish a custom build with a specific extension set, then this repository is the only place to do it, and the price is a local toolchain with PHP in it.

The contribution guidance lives in a Contributing.md file at the root, and the repository also carries an .eslint.config.mjs, a .prettierrc.json, a rollup.config.mjs and a descriptors directory, which is a reasonable picture of the toolchain a JavaScript library with a PHP build step needs.

## Conclusion

DataTablesSrc suits a developer who wants to change DataTables itself, or a team that needs a build of the library matching their own styling and extension set, since the build pipeline and the example suite are both in the repository. It is the wrong repository for consuming the library, because the published datatables.net package is what ships to npm, NuGet and Composer, and the source package here contains no built files at all. Before cloning it, check whether a fork of a DataTables extension is really what you need, since a lot of the work people attempt here is a one file configuration change in an existing installation.

## FAQ

### What is in the DataTablesSrc repository?

It contains the un-built source files for DataTables, the HTML table enhancing library, including the js, css, types, build and examples directories. The package manifest names it datatables.net-src and states that the package does not include the built files.

### How do I build DataTables from source?

You need Bash, PHP 7 or later and Node.js 20 or later. Then clone the repository, run npm install, npm run build-debug and npm serve, and open the address the console indicates. The npm scripts call the make.sh script in the build directory.

### How do I install DataTables through a package manager?

Distribution repositories are available for NPM, NuGet and Composer with the built software under the name datatables.net, and styling packages for Bootstrap, Foundation and other libraries are available by adding a suffix to the package name. The download builder and the CDN are the other documented routes.

## Sources

- [DataTables/DataTablesSrc on GitHub](https://github.com/DataTables/DataTablesSrc)
- [License: MIT](https://github.com/DataTables/DataTablesSrc/blob/master/LICENSE)
- [Project website](https://datatables.net)
- [README](https://github.com/DataTables/DataTablesSrc/blob/master/README.md)
- [Releases](https://github.com/DataTables/DataTablesSrc/releases)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/datatables-datatablessrc
