diff --git a/docs/components/docs/docs.html b/docs/components/docs/docs.html index 3e29d371551..8f3b9138ffa 100644 --- a/docs/components/docs/docs.html +++ b/docs/components/docs/docs.html @@ -22,16 +22,14 @@

{{pageTitle}}

-

{{module[0].toUpperCase() + module.substr(1)}}

-

-
- - -
- Getting Started with gcloud -

+

+
+ + +
+ Getting Started with gcloud +

-

{{module[0].toUpperCase() + module.substr(1)}}

First, install gcloud with npm and require it into your project:

@@ -59,40 +57,32 @@

{{module[0].toUpperCase() + module.substr(1)}}


+
-

Overview

+

Datastore Overview

The gcloud.datastore object gives you some convenience methods, as well as exposes a dataset function. This will allow you to create a dataset, which is the object from which you will interact with the Google Cloud Datastore.

- var datastore = gcloud.datastore; - var dataset = datastore.dataset({ - projectId: 'myProject', - keyFilename: '/path/to/keyfile.json' -
-

- See the Dataset documentation for examples of how to query the datastore, save entities, run a transaction, and others. -

-
- -
-

- The gcloud.storage object contains a Bucket object, which is how you will interact with your Google Cloud Storage bucket. -

-
- var storage = gcloud.storage; - var bucket = new storage.Bucket({ - bucketName: 'MyBucket' - });
+var datastore = gcloud.datastore; +var dataset = datastore.dataset({ + projectId: 'myProject', + keyFilename: '/path/to/keyfile.json' +});

- See the Dataset documentation for examples of how to query the datastore, save entities, run a transaction, and others. + See the Dataset documentation for examples of how to query the datastore, save entities, run a transaction, and others.

+
-

Overview

+

Storage Overview

The gcloud.storage object contains a bucket object, which is how you will interact with your Google Cloud Storage bucket. See the guide on Google Cloud Storage to create a bucket.

+
+var bucket = gcloud.storage.bucket({ + bucketName: 'MyBucket' +});

See examples below for more on how to access your bucket to upload a file, read its files, create signed URLs, and more.

@@ -117,10 +107,12 @@

Parameters

- + - - + +
{{param.name}}
@@ -146,14 +138,14 @@

Example

  • {{page.title}}
    • {{innerPage.title}} diff --git a/docs/components/docs/docs.js b/docs/components/docs/docs.js index fe0f1387a28..568ff7c0409 100644 --- a/docs/components/docs/docs.js +++ b/docs/components/docs/docs.js @@ -80,6 +80,7 @@ angular formatHtml(tag.description.replace(/^- /, ''))); tag.types = $sce.trustAsHtml(tag.types.reduceRight( reduceModules, []).join(', ')); + tag.optional = tag.types.toString().substr(-1) === '='; return tag; }), returns: obj.tags.filter(function(tag) { @@ -197,15 +198,16 @@ angular } }); }) + .controller('DocsCtrl', function($location, $scope, $routeParams, methods, $http, versions) { 'use strict'; $scope.isActiveUrl = function(url) { - var current = $location.path().replace('/' + methods.singleMethod, ''); - var link = url - .replace(/^#/, '') - .replace('/' + methods.singleMethod, ''); - return current === link; + var active = $location.path() + .replace('/' + methods.singleMethod, '') + .replace('/' + $scope.version, ''); + url = url.replace('#', '').replace('/' + $scope.version, ''); + return active === url; }; $scope.isActiveDoc = function(doc) { @@ -252,7 +254,8 @@ angular } ]; }) - .controller("HistoryCtrl", function($scope, versions) { + + .controller('HistoryCtrl', function($scope, versions) { $scope.pageTitle = 'Node.js Docs Versions'; $scope.showHistory = true; $scope.versions = versions; diff --git a/docs/components/docs/history.html b/docs/components/docs/history.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/docs/css/main.css b/docs/css/main.css index 12a46ff478e..32a20d55194 100755 --- a/docs/css/main.css +++ b/docs/css/main.css @@ -603,6 +603,16 @@ h2, h3 { border-bottom: 1px solid rgba(0,0,0,0.05); } +.param-optional .param-types { + font-style: italic; +} + +.param-optional .param-description:before { + content: "optional. "; + color: #aaa; + font-style: italic; +} + .method-heading { position: relative; } @@ -627,7 +637,7 @@ h2, h3 { .sub-heading { color: #5d6061; - margin: 0; + margin: 0 !important; } .toggler {