1 | # Contributing to Meteorite
|
2 |
|
3 | Do the normal fork, patch, pull-request dance. If you don't know what that means or need any help, let us know.
|
4 |
|
5 | ## Troubleshooting
|
6 |
|
7 | Sometimes git can get into broken states if weird things happen and the error messages you get as a result can be confusing.
|
8 |
|
9 | So before reporting errors, please first try cleaning up all of Meteorite's files and starting again (in your app's dir):
|
10 |
|
11 | ```js
|
12 | mrt uninstall
|
13 | mrt uninstall --system
|
14 | mrt
|
15 | ```
|
16 |
|
17 | If you are seeing permission errors (e.g. `EACCESS`, talk of needing to be Administrator) please read: https://github.com/oortcloud/meteorite#permission-woes
|
18 |
|
19 | ## Troubleshooting part 2, ADVANCED
|
20 |
|
21 | If you are still seeing problems after trying the above, or you want to figure out why you need to do it, please remember that Meteorite is at heart a very simple script that _isn't really doing much_.
|
22 |
|
23 | Remember that when you `mrt install` or just run `mrt`, Meteorite is doing the following:
|
24 |
|
25 | 1. Inspecting your `smart.json` to figure out what packages need to be installed.
|
26 | 2. Cloning them into `~/.meteorite/sources/<AUTHOR>/<REPO_NAME>`, checking out the right branch, git pulling.
|
27 | 3. Copying the files into `~/.meteorite/packages/<NAME>/<AUTHOR>/<REPO_NAME>/<COMMIT>/`
|
28 | 4. Symlinking packages from `packages/` to that location.
|
29 | 5. [Possibly] Running Meteor from a git checkout (similarly, in `~/.meteorite/meteors/<NAME>/<AUTHOR>/<REPO_NAME>/<COMMIT>/`).
|
30 |
|
31 | You can inspect `smart.lock` for some insights too.
|
32 |
|
33 | Helpful debugging you can do is:
|
34 |
|
35 | 1. Manually doing the same, seeing if you see the same error.
|
36 | 2. Digging around in `~/.meteorite` and seeing if git checkouts have gotten into a broken state.
|
37 |
|
38 | Meteorite is fairly brittle as it calls out to commandline git all the time, and problems can can sometime get missed. We appreciate you going the extra mile.
|
39 |
|
40 |
|
41 | ## How to develop
|
42 |
|
43 | Use `npm link` to install your forked copy of Meteorite, then do something to make it more awesome.
|
44 |
|
45 | ## Testing
|
46 |
|
47 | We have a pretty good start at an acceptance test suite but it could be a lot better. Help us fix this!
|
48 |
|
49 | ### Local Atmosphere instance
|
50 |
|
51 | Make sure you have a local Atmosphere instance running on port 3333. We use it to speed the tests up, but the tests won't output a helpful message if the Atmosphere instance isn't there. :disappointed:
|
52 |
|
53 | ### Running tests
|
54 |
|
55 | ``` sh
|
56 | $ npm test
|
57 | # or
|
58 | $ mocha spec/unit spec/acceptance -t 240000 -R spec
|
59 | ```
|
60 |
|
61 | ### Refreshing the test cache
|
62 |
|
63 | Because Meteorite downloads Git repositories, we cache the results so the test suite will run fast. It will be slow the first time.
|
64 |
|
65 | When the related repositories change, you'll need to flush the cache.
|
66 |
|
67 | ``` sh
|
68 | $ npm run-script flushcache
|
69 | ```
|
70 |
|
71 | ### Todo
|
72 |
|
73 | Figure out work-arounds for the following issues, using a patched version of mocha if we have to.
|
74 |
|
75 | * Can't use mocha's recursive option because it breaks trying to process files in the test apps as test files.
|
76 | * Can't seem to use `--watch`.
|