-
Notifications
You must be signed in to change notification settings - Fork 555
Repositories
There are several repositories hosted on GitHub under the craftyjs project:
- Crafty: The development section for the library. Features the issue & bug tracker. It is pointed to for Release-Notes from the homepage and by CraftyComponents
- craftyjs.github.com: The development section for craftyjs.com. Its files are hosted on the homepage.
- demos: Various demos and games built with Crafty which are featured on the homepage.
- CraftyComponents: Web page file for CraftyComponents which features a lots of snippets (or fiddles) of code, links to FlexPi, and other add-ons. Outdated: The site is no longer maintained. Components are featured on the main Crafty site: craftyjs.com/components
This is an explanation of the main library development repo.
These are the important directories:
-
/src
-- The source code for Crafty, broken into separate files that are reassembled -
/build
-- Scripts for building crafty and its API documentation -
/tests/unit
-- Unit and integration tests (using the qunit framework) -
/tests/webdriver
-- Regression tests (using webdriver) -
/playgrounds
-- Small tech demos of various parts of Crafty's functionality. They can be used to check functionality not covered by tests (such as whether specific rendering techniques work!)
The build scripts currently use node. Full information can be found in wiki:Building.
If you've set up the grunt environment, you can run the tests with the command grunt check
. The tests will use node's javascript engine (V8, same as Chrome), with PhantomJS for rendering.
You can also open up the tests/unit/index.html file to run unit & integration tests in a browser, which is necessary to test alternate browser engines.
To make Crafty more maintainable, it is split into many separate source files. Build scripts concatenate these files into one monolithic file: crafty.js
. Comments in the source code are used to generate the documentation.
To quickly jump to the source code of an API functionality, follow the source code links on craftyjs.com/api.