-
Notifications
You must be signed in to change notification settings - Fork 0
Development Guide
If you want to contribute to cardboard, you will first need to set up the project. It's very easy though.
git clone [email protected]:nombrekeff/cardboard-js.git
You will usually clone your forked repository.
After cloning navigate into the project: cd cardboard-js
And then install npm dependencies:
npm install
The project structure is very straightforward, if you've worked with JS or TS you will probably understand how most of it works. But here is a brief explanation:
-
dist
-> Holds the built JS code,typescript
output will go into this folder. -
docs
-> When building the project, docs are also generated from the TS code and JSDoc comments, and placed in this folder. -
examples
-> Hold a list of working examples written using Cardboard. -
src
-> The juice, this folder contains all the code that makes Cardboard.-
ext
-> Holds extensions for Cardboard (i.e. Tweening, Custom Components, etc...)
-
-
tests
-> This is where we ensure everything works, of course, unit tests for Cardboard.
The project is written in TypeScript and built into ESM js (for now). There's no bundling at the moment.
For building we use tsc
for compiling the TS code, and typedoc
for generating the documentation.
- For building the project:
npm run build
npm run build:watch
- For building the examples (
examples
folder):
npm run build:example
npm run build:example:watch
- For building the docs:
npm run build:docs
You can do this in any way you want, you just need to launch a server that will host the example pages. I use an extension in VSCode called Liveserver. There are plenty of options:
npm run test
npm run test:watch
This Wiki is a work in progress, it's just me doing everything around here :P
If you read this and have some free time, and want to spend it helping me with the wiki or anything else, you're more than welcome!