Skip to content

Commit

Permalink
readme
Browse files Browse the repository at this point in the history
  • Loading branch information
lancejpollard committed Sep 18, 2012
1 parent 111afb1 commit a114a9c
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 6 deletions.
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ ifeq ($(shell which phantomjs),) # if it's blank
$(error PhantomJS is not installed. Download from http://phantomjs.org or run `brew install phantomjs` if you have Homebrew)
endif

test: test-memory test-mongodb
test: test-server test-client

test-server: test-memory test-mongodb

test-memory:
$(CMD) $(SRC) --store memory
Expand Down
62 changes: 58 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,23 +68,77 @@ redis-server

### Contributing to Tower

#### Running Tests
```
git clone https://github.com/viatropos/tower.git
cd tower
```

#### Building Tower

You can build Tower manually with:

Run server tests:
```
make
```

Or you can have it recompile the files when you change them:

```
make watch
make test
```

To run client tests, first start the test server on port `3210`, and then run phantomjs:
#### "Linking" Tower

You can symlink your local tower repo to your global npm node_modules directory, which makes it so you can use it in your apps (so if you make changes to the tower repo, you'll see them in your app). Very useful.

In the tower repo:

```
npm link
```

In a tower app:

```
npm link tower
```

If you want to try installing tower from the remote npm registry, you can just unlink it and run `npm install`:

```
npm unlink tower
npm install tower
```

Using `npm link` makes it very easy to mess with the source.

#### Running Tests

In the tower repo, run server tests with:

```
make test-server
```

To run client tests, first compile the test app and start its server:

```
make setup-test-client
make start-test-client
```

Then run the tests (through uses phantomjs)

```
make test-client
```

If you don't have phantomjs you can install it with:

```
brew install phantomjs
```

## Generate

```
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
"globalDependencies": {},
"localDependencies": {},
"scripts": {
"test": "make test && make test-client",
"test": "make test",
"start": "grunt start --config ./grunt.coffee",
"docs": "codo",
"postinstall": "$(./bin/dependencies)"
Expand Down

0 comments on commit a114a9c

Please sign in to comment.