The source of opentype.js is divided into modules, located in the src
directory. They are compiled into one file using browserify. The updated, compiled opentype.js
and minified opentype.min.js
are included with every commit. This makes it easy for library users to just grab the latest release.
My workflow, on a new machine:
-
Clone the repository:
git clone git://github.com/nodebox/opentype.js.git
-
Install the development dependencies (browserify, watchify and uglify-js):
cd opentype.js npm install
-
Start the development server. This watches file changes and compiles and serves the page at http://localhost:8080/
npm start
-
Make some changes. When you're done, compile the production opentype.js and opentype.min.js using make:
make clean && make
-
Commit your changes
git add --all && git commit
- Click the "Fork" button to create your personal fork of the opentype.js repository.
- In the terminal, run
npm install
to install the dependencies needed for development. - Create a new branch for your feature. For example:
git checkout -b my-awesome-feature
. A dedicated branch for your pull request means you can develop multiple features at the same time, and ensures that your pull request is stable even if you later decide to develop an unrelated feature. - The
opentype.js
andopentype.min.js
files are built from source files in thesrc
directory. Do not editopentype.js
directly. Instead, edit the source files, and then runmake clean && make
to build the generated files. - Use
make test
to run tests and verify your changes. - Submit your pull request -- and thanks in advance!