Skip to content

Commit 27e57ca

Browse files
author
Luke Sneeringer
committed
Discourage the meta-package.
1 parent dac8237 commit 27e57ca

1 file changed

Lines changed: 24 additions & 174 deletions

File tree

README.md

Lines changed: 24 additions & 174 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,34 @@ If you need support for other Google APIs, check out the [Google Node.js API Cli
3737

3838
## Quick Start
3939

40+
We recommend installing the individual packages that you need, which are
41+
provided under the `@google-cloud` namespace. For example:
42+
43+
```sh
44+
$ npm install --save @google-cloud/datastore
45+
$ npm install --save @google-cloud/storage
46+
```
47+
48+
#### The google-cloud meta-package
49+
50+
We also provide a meta-package, `google-cloud`, which provides all of the
51+
individual APIs. However, in order to keep file size and memory use low, the
52+
use of this package is not recommended.
53+
54+
If you want the kitchen sink, however, get it with:
55+
4056
```sh
4157
$ npm install --save google-cloud
4258
```
4359

60+
If you use the meta-package, then the individual packages are available
61+
on the namespace of the required meta-package module:
62+
63+
```javascript
64+
var datastore = require('google-cloud').datastore;
65+
var storage = require('google-cloud').storage;
66+
```
67+
4468

4569
## Example Applications
4670

@@ -124,16 +148,6 @@ You can also set auth on a per-API-instance basis. The examples below show you h
124148
- [API Documentation][gcloud-bigquery-docs]
125149
- [Official Documentation][cloud-bigquery-docs]
126150

127-
#### Using the all-in-one module
128-
129-
```
130-
$ npm install --save google-cloud
131-
```
132-
133-
```js
134-
var gcloud = require('google-cloud');
135-
var bigquery = gcloud.bigquery;
136-
```
137151

138152
#### Using the BigQuery API module
139153

@@ -181,17 +195,6 @@ job.getQueryResults().on('data', function(row) {});
181195

182196
*Follow the [activation instructions][cloud-datastore-activation] to use the Cloud Datastore API with your project.*
183197

184-
#### Using the all-in-one module
185-
186-
```
187-
$ npm install --save google-cloud
188-
```
189-
190-
```js
191-
var gcloud = require('google-cloud');
192-
var datastore = gcloud.datastore;
193-
```
194-
195198
#### Using the Cloud Datastore API module
196199

197200
```
@@ -253,17 +256,6 @@ datastoreClient.save({
253256
- [API Documentation][gcloud-storage-docs]
254257
- [Official Documentation][cloud-storage-docs]
255258

256-
#### Using the all-in-one module
257-
258-
```
259-
$ npm install --save google-cloud
260-
```
261-
262-
```js
263-
var gcloud = require('google-cloud');
264-
var storage = gcloud.storage;
265-
```
266-
267259
#### Using the Cloud Storage API module
268260

269261
```
@@ -325,17 +317,6 @@ localReadStream.pipe(remoteWriteStream);
325317
- [API Documentation][gcloud-logging-docs]
326318
- [Official Documentation][cloud-logging-docs]
327319

328-
#### Using the all-in-one module
329-
330-
```
331-
$ npm install --save google-cloud
332-
```
333-
334-
```js
335-
var gcloud = require('google-cloud');
336-
var logging = gcloud.logging;
337-
```
338-
339320
#### Using the Google Stackdriver Logging API module
340321

341322
```
@@ -397,17 +378,6 @@ loggingClient.getEntries(function(err, entries) {
397378
- [API Documentation][gcloud-vision-docs]
398379
- [Official Documentation][cloud-vision-docs]
399380

400-
#### Using the all-in-one module
401-
402-
```
403-
$ npm install --save google-cloud
404-
```
405-
406-
```js
407-
var gcloud = require('google-cloud');
408-
var vision = gcloud.vision;
409-
```
410-
411381
#### Using the Cloud Vision API module
412382

413383
```
@@ -528,16 +498,6 @@ visionClient.detectFaces('./image.jpg', function(err, faces) {
528498

529499
*You may need to [create a cluster][cloud-bigtable-cluster] to use the Cloud Bigtable API with your project.*
530500

531-
#### Using the all-in-one module
532-
533-
```
534-
$ npm install --save google-cloud
535-
```
536-
537-
```js
538-
var gcloud = require('google-cloud');
539-
var bigtable = gcloud.bigtable;
540-
```
541501

542502
#### Using the Cloud Bigtable API module
543503

@@ -597,17 +557,6 @@ row.save('follows:gwashington', 1, function(err) {
597557
- [API Documentation][gcloud-dns-docs]
598558
- [Official Documentation][cloud-dns-docs]
599559

600-
#### Using the all-in-one module
601-
602-
```
603-
$ npm install --save google-cloud
604-
```
605-
606-
```js
607-
var gcloud = require('google-cloud');
608-
var dns = gcloud.dns;
609-
```
610-
611560
#### Using the Cloud DNS API module
612561

613562
```
@@ -656,17 +605,6 @@ zone.export('/zonefile.zone', function(err) {});
656605
- [API Documentation][gcloud-language-docs]
657606
- [Official Documentation][cloud-language-docs]
658607

659-
#### Using the all-in-one module
660-
661-
```
662-
$ npm install --save google-cloud
663-
```
664-
665-
```js
666-
var gcloud = require('google-cloud');
667-
var language = gcloud.language;
668-
```
669-
670608
#### Using the Natural Language API module
671609

672610
```
@@ -738,17 +676,6 @@ document.annotate(function(err, annotations) {
738676
- [API Documentation][gcloud-pubsub-docs]
739677
- [Official Documentation][cloud-pubsub-docs]
740678

741-
#### Using the all-in-one module
742-
743-
```
744-
$ npm install --save google-cloud
745-
```
746-
747-
```js
748-
var gcloud = require('google-cloud');
749-
var pubsub = gcloud.pubsub;
750-
```
751-
752679
#### Using the Cloud Pub/Sub API module
753680

754681
```
@@ -796,17 +723,6 @@ topic.subscribe('subscription-name', function(err, subscription) {
796723
- [API Documentation][gcloud-resource-docs]
797724
- [Official Documentation][cloud-resource-docs]
798725

799-
#### Using the all-in-one module
800-
801-
```
802-
$ npm install --save google-cloud
803-
```
804-
805-
```js
806-
var gcloud = require('google-cloud');
807-
var resource = gcloud.resource;
808-
```
809-
810726
#### Using the Cloud Resource Manager API module
811727

812728
```
@@ -849,17 +765,6 @@ project.getMetadata(function(err, metadata) {
849765
- [API Documentation][gcloud-spanner-docs]
850766
- [Official Documentation][cloud-spanner-docs]
851767

852-
#### Using the all-in-one module
853-
854-
```
855-
$ npm install --save google-cloud
856-
```
857-
858-
```js
859-
var gcloud = require('google-cloud');
860-
var spanner = gcloud.spanner;
861-
```
862-
863768
#### Using the Cloud Spanner API module
864769

865770
```
@@ -940,17 +845,6 @@ database.runStream('SELECT * FROM Singers')
940845
- [API Documentation][gcloud-speech-docs]
941846
- [Official Documentation][cloud-speech-docs]
942847

943-
#### Using the all-in-one module
944-
945-
```
946-
$ npm install --save google-cloud
947-
```
948-
949-
```js
950-
var gcloud = require('google-cloud');
951-
var speech = gcloud.speech;
952-
```
953-
954848
#### Using the Cloud Speech API module
955849

956850
```
@@ -1023,17 +917,6 @@ fs.createReadStream('./audio.raw')
1023917
- [API Documentation][gcloud-translate-docs]
1024918
- [Official Documentation][cloud-translate-docs]
1025919

1026-
#### Using the all-in-one module
1027-
1028-
```
1029-
$ npm install --save google-cloud
1030-
```
1031-
1032-
```js
1033-
var gcloud = require('google-cloud');
1034-
var translate = gcloud.translate;
1035-
```
1036-
1037920
#### Using the Google Translate API module
1038921

1039922
```
@@ -1092,17 +975,6 @@ translateClient.getLanguages(function(err, languages) {
1092975
- [API Documentation][gcloud-compute-docs]
1093976
- [Official Documentation][cloud-compute-docs]
1094977

1095-
#### Using the all-in-one module
1096-
1097-
```
1098-
$ npm install --save google-cloud
1099-
```
1100-
1101-
```js
1102-
var gcloud = require('google-cloud');
1103-
var compute = gcloud.compute;
1104-
```
1105-
1106978
#### Using the Compute Engine API module
1107979

1108980
```
@@ -1146,17 +1018,6 @@ zone.createVM(name, { os: 'ubuntu' }, function(err, vm, operation) {
11461018
- [API Documentation][gcloud-prediction-docs]
11471019
- [Official Documentation][cloud-prediction-docs]
11481020

1149-
#### Using the all-in-one module
1150-
1151-
```
1152-
$ npm install --save google-cloud
1153-
```
1154-
1155-
```js
1156-
var gcloud = require('google-cloud');
1157-
var prediction = gcloud.prediction;
1158-
```
1159-
11601021
#### Using the Prediction API module
11611022

11621023
```
@@ -1220,17 +1081,6 @@ The example below shows you how to instantiate the generated client. For further
12201081

12211082
- [Official Documentation][cloud-monitoring-docs]
12221083

1223-
#### Using the all-in-one module
1224-
1225-
```
1226-
$ npm install --save google-cloud
1227-
```
1228-
1229-
```js
1230-
var gcloud = require('google-cloud');
1231-
var monitoring = gcloud.monitoring;
1232-
```
1233-
12341084
#### Using the Google Stackdriver Monitoring API module
12351085

12361086
```

0 commit comments

Comments
 (0)