Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,18 @@ published as packages to facilitate their use in other projects.
* [Ruby](ruby/README.md)
* [Golang](golang/README.md)

## Development

If you're contributing to this project or regenerating the bindings, you'll need to initialize the git submodules after cloning:

```bash
git submodule update --init --recursive
```

This downloads the base GTFS-realtime protocol buffer specification from the [google/transit](https://github.com/google/transit) repository, which is required for building the language bindings.

For language-specific build instructions, see the UPDATING.md file in each language directory.

## Other Languages

We don't provide generated code for C++, use the official protoc compiler for that (from [here](https://developers.google.com/protocol-buffers/docs/downloads) or [here](https://github.com/google/protobuf))
Expand Down
12 changes: 12 additions & 0 deletions UPDATING.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,18 @@ When
is updated, the various languages bindings must be regenerated, packaged, and
deployed.

## Prerequisites

If you've just cloned the repository, initialize the git submodules first:

```bash
git submodule update --init --recursive
```

This is required because the bindings depend on the base GTFS-realtime proto files from the `gtfs-spec` submodule.

## Updating Process

First step is to copy the latest version of `gtfs-realtime.proto` into project.
Then, follow the instructions in each individual UPDATING.md file for each
language type.
Expand Down
14 changes: 13 additions & 1 deletion nodejs/UPDATING.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# How-To Update Bindings When gtfs-realtime.proto Changes

## Prerequisites

If you've just cloned the repository, initialize the git submodules first:

```
git submodule update --init --recursive
```

This is required because the build process depends on the base GTFS-realtime proto files from the `gtfs-spec` submodule.

## Building

Regenerate the language binding source from gtfs-realtime.proto.

```
Expand All @@ -17,7 +29,7 @@ Test the generated code:
npm run test
```

Note that, to maintain compatability with CommonJS typescript projects, we need to manually change the `Long` type to the stub type included in the ProtobufJS library.
**Note:** The build script automatically replaces `import Long = require("long")` with `import { Long } from "protobufjs"` in the TypeScript definition files. This maintains compatibility with CommonJS TypeScript projects by using the Long stub type included in the ProtobufJS library instead of requiring a separate "long" package.

Update the version number in `package.json`.

Expand Down
Loading