Skip to content

Latest commit

 

History

History
112 lines (77 loc) · 2.93 KB

CONTRIBUTE.md

File metadata and controls

112 lines (77 loc) · 2.93 KB

platypi-framework

This library contains the Platypi framework, PlatypusTS. It serves as the basis for many of the other Platypi products.

Dependencies

None, PlatypusTS is meant to ship with no dependencies.

Development Dependencies

While developing, ensure that NodeJS is installed.

Platform support

PlatypusTS is designed for use in a browser only. It works in all modern browsers (IE >= 9)

Documentation

Find all the documentation on PlatypusTS here

Building the Code

To build the code take the following steps:

  1. From the root project folder run:
npm install
  1. Run the following task:
npm run build-all

Building for Deployment

To build a deployment package of PlatypusTS take the following steps:

  1. Ensure that Grunt is installed. If you need to install it you can use the following command:
npm install grunt -g
  1. Run the following command:
grunt
  1. You will find the compiled package in the dist directory.

Building for Documentation Output

PlatypusTS is heavily documented using JSDoc format. However, for distribution many of the comments are stripped out in order to make them easier to read in various IDEs. To get a build of the framework with full documentation take the following steps:

  1. Ensure that Grunt is installed. If you need to install it you can use the following command:
npm install grunt -g
  1. Run the following command:
grunt docs
  1. You will find the compiled package in the dist directory.

Developing the Code

While developing the code, there are a few useful npm scripts:

  1. watch-examples: Builds and watches the examples directory
  2. watch-src: Builds and watches the src directory
  3. watch-test: Builds and watches the test directory

Run any of these scripts with the following command:

npm run <script>

Using the Examples

The examples directory is a playground for quickly testing functionality. You can run the examples using the following command:

npm run examples

This will open a server in the examples directory running on port 3000. You can then open you browser to http://localhost:3000 to use the examples.

Running the Tests

To run the unit tests for PlatypusTS take the following steps:

  1. Ensure that NodeJS is installed.
  2. Ensure that Karma CLI is installed. If you need to install it you can use the following command:
npm install karma-cli -g
  1. Run the following command:
npm test

When you run tests they output code coverage. You can find the code coverage files in the test/coverage directory.

Cleaning the Build

To clean all the built-files execute the following command:

npm run clean-all

NOTE: More tasks can be found in the package.json