~holger-seelig/cobweb.js/trunk

« back to all changes in this revision

Viewing changes to cobweb.js/lib/opentype.js/CONTRIBUTING.md

  • Committer: Holger Seelig
  • Date: 2017-08-22 04:53:24 UTC
  • Revision ID: holger.seelig@yahoo.de-20170822045324-4of4xxgt79669gbt
Switched to npm.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Contributing
2
 
 
3
 
## Organization of the source code
4
 
 
5
 
The source of opentype.js is divided into modules, located in the `src` directory.
6
 
 
7
 
We use [browserify](http://browserify.org/) to combine this into a single package with every release.
8
 
 
9
 
When creating a pull request, you **don't** need to run `npm run dist` -- we'll do that when creating a release.
10
 
 
11
 
## How to hack on the source
12
 
 
13
 
1. On our [GitHub page](https://github.com/nodebox/opentype.js), click the "Fork" button to create your personal fork
14
 
   of the opentype.js repository.
15
 
 
16
 
2. Clone your repository:
17
 
 
18
 
    git clone git://github.com/nodebox/opentype.js.git
19
 
 
20
 
3. Create a new branch for your feature. For example: `git checkout -b my-awesome-feature`.
21
 
    A dedicated branch for your pull request means you can develop multiple features at the same time, and ensures
22
 
    that your pull request is stable even if you later decide to develop an unrelated feature.
23
 
 
24
 
4. Install the development dependencies (browserify, watchify, jshint, ...):
25
 
 
26
 
    cd opentype.js
27
 
    npm install
28
 
 
29
 
5. Start the development server. This watches file changes and compiles and serves the page at http://localhost:8080/
30
 
 
31
 
    npm start
32
 
 
33
 
   Note that the compiled file ends up in the `build` folder, not the `dist` folder! The development server
34
 
   rewrites the JavaScript URL from `dist/opentype.min.js` to `build/opentype.js`.
35
 
 
36
 
6. Make some changes
37
 
 
38
 
7. Check if tests pass
39
 
 
40
 
    npm test
41
 
 
42
 
8. Commit your changes
43
 
 
44
 
    git add --all && git commit
45
 
 
46
 
9. Submit your pull request -- and thanks in advance!
47
 
 
48
 
## Making a distributable for yourself
49
 
 
50
 
If you want to create your own self-contained version of opentype.js, run
51
 
 
52
 
    npm dist
53
 
 
54
 
This compiles the source  and places `opentype.js` and `opentype.min.js` in the `dist` folder.
55
 
 
56
 
## How we publish a release
57
 
 
58
 
We use a set of [npm scripts](https://www.npmjs.org/doc/misc/npm-scripts.html) to build releases:
59
 
 
60
 
1. Update the version number in `package.json` and `bower.json`.
61
 
2. Add information about the new release in `RELEASES.md`.
62
 
3. Run `npm run dist` to update the files in the `dist` folder.
63
 
4. Commit (`git commit -a`) and create a tag (e.g. `git tag 1.2.1`). Push and push tags (`git push && git push --tags`).
64
 
5. Run `npm publish` to publish the package to npm. Bower updates automatically.