@@ -36,7 +36,7 @@ or [`N`](https://github.com/tj/n) to install and manage multiple node versions_
36
36
37
37
In addition to Node.js we use ` yarn ` to facilitate multi package development.
38
38
39
- To install ` yarn ` follow the instructions listed on their website:
39
+ To install ` yarn ` follow the instructions listed on their website:
40
40
https://yarnpkg.com/en/docs/install
41
41
42
42
#### Java
@@ -70,6 +70,13 @@ by running the following at the root of the SDK:
70
70
$ yarn
71
71
```
72
72
73
+ Once you have installed all the dependencies, you can build the entire SDK by
74
+ running the following command the root of the SDK:
75
+
76
+ ``` bash
77
+ $ yarn build
78
+ ```
79
+
73
80
## Testing the SDK
74
81
75
82
### Test Setup
@@ -85,23 +92,29 @@ them below.
85
92
86
93
#### Authentication Support
87
94
88
- Visit the authentication config in your project and enable the ` Anonymous `
95
+ Visit the authentication config in your project and enable the ` Anonymous `
89
96
sign-in provider to complete your project config.
90
97
91
98
#### Automated Setup
92
99
93
- The remainder of the test setup can be done by running the following command at
94
- the root of the package:
100
+ The remainder of the test setup requires choosing a test project. You can
101
+ choose the project manually or specify the project directly at the root of
102
+ the package.
95
103
96
104
``` bash
97
- yarn test:setup
105
+ # Select a project manually when running setup
106
+ $ yarn test:setup
107
+
108
+ # Specify the specific project for setup
109
+ $ yarn test:setup --projectId=< your-test-project>
98
110
```
99
111
100
112
### Running the tests
101
113
102
114
Each of the directories in the ` integration ` directory as well as the ` packages `
103
- directory have their own test suites. These can be run altogether by running the
104
- following command at the root of the package:
115
+ directory have their own test suites. You will need to build the SDK before
116
+ running tests. Test suites can be run all together by running the following
117
+ command at the root of the package:
105
118
106
119
``` bash
107
120
$ yarn test
@@ -115,13 +128,13 @@ an individual package directory.
115
128
### Introduction
116
129
117
130
The Firebase JS SDK is built with a series of individual packages that are all
118
- contained in this repository. Development is coordinated via [ yarn
119
- workspaces] ( https://yarnpkg.com/blog/2017/08/02/introducing-workspaces/ ) and
131
+ contained in this repository. Development is coordinated via [ yarn
132
+ workspaces] ( https://yarnpkg.com/blog/2017/08/02/introducing-workspaces/ ) and
120
133
[ Lerna] ( https://lernajs.io/ ) (a monorepo management tool).
121
134
122
135
Each package in the ` packages ` directory, constitute a piece of our
123
136
implementation. The SDK is built via a combination of all of these packages
124
- which are published under the [ ` firebase `
137
+ which are published under the [ ` firebase `
125
138
scope] ( https://www.npmjs.com/search?q=scope%3Afirebase ) on NPM.
126
139
127
140
### Helper Scripts
@@ -134,12 +147,12 @@ watch tasks as well as a sandbox server.
134
147
You can run the dev script by running the following at the root of the package:
135
148
136
149
``` bash
137
- yarn dev
150
+ $ yarn dev
138
151
```
139
152
140
153
### Prepush Hooks
141
154
142
- As part of this repo, we use the NPM package [ ` husky ` ] ( https://npm.im/husky ) to
155
+ As part of this repo, we use the NPM package [ ` husky ` ] ( https://npm.im/husky ) to
143
156
implement git hooks. We leverage the prepush hook to do two things:
144
157
145
158
- Automated code styling (using [ ` prettier ` ] ( https://npm.im/prettier ) )
0 commit comments