-
Notifications
You must be signed in to change notification settings - Fork 41
Conventions
angelxuanchang edited this page Jan 13, 2018
·
1 revision
- When creating a new JS file, follow the CommonJS-spec (e.g., node-style code) instead of appending properties to
window
or writing AMD-style modules. - Limit the number of script tags inside of HTML/Jade files, and try not to embed JS in HTML files.
- For any external dependency that is already prebuilt, install it with
bower
,npm
instead of downloading it into the source folder (unless the dependency isn't onnpm
orbower
). - Fork or create a repo for external dependencies on GitHub and
require
them if you decide to make edits to the dependencies. Consider using a.npmignore
file and creating a npm module for the dependency so you canrequire
a limited subset of the files instead. - Split up large JS files with lots of application logic into multiple files.
- If you want your code reviewed by another person (recommended), please create a PR for your changes instead of checking straight into
master
(e.g., for clientside code without tests and adds additional functionality) - Please write accompanying tests for any functionality introduced in the serverside code.
- Use
git mv
(instead ofmv
) to move/rename files to help minimize the number of merge conflicts. - Run
npm test
and address any linter warnings/errors or failing tests before checking in code.
- Home
- Main
- Annotators
- Assets
- Batch processing
- Development
- File formats
- Rendering
- Scene Tools
- Voxels