frontend: move to repo root

This commit is contained in:
Patrik Oldsberg
2020-03-05 15:55:28 +01:00
parent 5b9845f62f
commit 56226ae84d
184 changed files with 111 additions and 2097 deletions
+1 -29
View File
@@ -39,10 +39,7 @@ To generate the Protobuf definitions in Go and TypeScript, run the following com
$ prototool generate
```
This will generate the respective "generated" files in the following folders:
- `backend/proto`
- `frontend/packages/proto/src/generated`
This will generate the respective "generated" files in the `backend/proto` folder.
All generated code related to Protocol Buffers should be checked in to the repository.
@@ -59,28 +56,3 @@ func main() {
identityv1.NewInventoryClient(nil)
}
```
### Import using TypeScript
This is what you'll need to use for development in any of the `frontend` services.
Firstly, ensure this line is in your `package.json` within the `frontend/` folder:
```js
"dependencies": {
"@spotify-backstage/protobuf-definitions": "0.0.0",
...
}
```
Next, you can use them in your [Yarn Workspaces](https://yarnpkg.com/en/docs/workspaces/) package using the following:
```ts
import { IdentityClient } from '@spotify-backstage/protocol-definitions/generated/identity/v1/identity_pb_service';
const client = new IdentityClient('http://localhost:8080');
// const req = new GetUserRequest();
// req.setUsername("johndoe");
// client.getUser(req, (err, user) => {
// /* ... */
// });
```