Directory structure

Tonic is, at its core, a data transformation engine. The concept behind the system is this: you give it data, and it churns that through HTML, CSS, Javascipt, WebGL, D3.js, and/or ParaView Web. Throughout that process you can tweak how you want the application to look, what data gets displayed in the layout, and how you can interact with it.

The Tonic directory structure usually looks something like this:

.
├── Gruntfile.js
├── LICENSE
├── README.md
├── RunJasmine.js
├── SpecRunner.html
├── SpecRunner.js
├── config.json
├── dist
│   ├── assets
│   ├── css
│   ├── fonts
│   └── lib
├── docs
│   ├── index.html
│   ├── js
│   ├── js.html
│   ├── markdown
│   └── tests
├── examples
│   └── data
├── package.json
├── src
│   ├── index.html.jade
│   ├── js
│   │   ├── app
│   │   ├── app-main.js
│   │   ├── init.js
│   │   └── lib
│   ├── stylesheets
│   │   ├── app
│   │   └── lib
│   ├── templates
│   │   ├── app
│   │   └── lib
│   └── tests
│       ├── e2e
│       └── unit
└── vendor
    └── lib

An overview of what each of these does:

File / Directory Description

config.json

Stores configuration data.

package.json Gruntfile.js

Stores the Tonic dependencies as npm packages and usage tasks to build, document, test and serve Tonic.

RunJasmine.js SpecRunner.html SpecRunner.js

These three files configure and run the Tonic unit and end-to-end tests. Tonic uses phantom.js, for headless browser support, and jasmine, for describing the individual tests.

README.mdLICENSE

Basic Tonic repository and license information.

vendor/

This directory contains the third party libraries in lib/ that can't be loaded using the npm package manager. Currently, extend.js is the only required third party library Tonic depends on.

src/

src/ contains the Stylus files to create .css files in stylesheets/, Jade files to create .js files in templates/, and Javascript files (.js) in js/. The tests are written as Jasmine spec files in tests/.

doc/

Tonic creates both HTML and MarkDown documentation using grunt doc.

examples/

Provided that the Tonic has been built, the examples will transform the examples/data/ through Tonic.

dist/

The Tonic distribution will be placed here. This directory can be copied to a different directory to create Tonic applications. assets and fonts have been copied into the distributions from resources installed with npm. css and lib are built from the stylus, jade and javascript files in src/.

Other Files/Folders

Every other directory and file except for those listed above—such as .gitignore and .travis.yml files, and so forth—are essential to development, but probably not essential to your development.