Skip to content

Commit

Permalink
Update JavaScript Bundle file names
Browse files Browse the repository at this point in the history
  • Loading branch information
HarshaNalluru committed May 7, 2019
1 parent 3237181 commit 7788fd0
Show file tree
Hide file tree
Showing 10 changed files with 203 additions and 175 deletions.
6 changes: 3 additions & 3 deletions sdk/storage/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ const Azure = require("@azure/storage-blob");
To use the SDK with JS bundle in the browsers, simply add a script tag to your HTML pages pointing to the downloaded JS bundle file(s):

```html
<script src="https://mydomain/azure-storage.blob.min.js"></script>
<script src="https://mydomain/azure-storage.file.min.js"></script>
<script src="https://mydomain/azure-storage.queue.min.js"></script>
<script src="https://mydomain/azure-storage-blob.min.js"></script>
<script src="https://mydomain/azure-storage-file.min.js"></script>
<script src="https://mydomain/azure-storage-queue.min.js"></script>
```

The JS bundled file is compatible with [UMD](https://github.com/umdjs/umd) standard, if no module system found, following global variable(s) will be exported:
Expand Down
4 changes: 2 additions & 2 deletions sdk/storage/storage-blob/.npmignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# browser #
browser/azure-storage.blob.js
browser/azure-storage.blob.js.map
browser/azure-storage-blob.js
browser/azure-storage-blob.js.map

# dist-test #
dist-test/
Expand Down
2 changes: 1 addition & 1 deletion sdk/storage/storage-blob/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ const Azure = require("@azure/storage-blob");
To use the SDK with JS bundle in the browsers, simply add a script tag to your HTML pages pointing to the downloaded JS bundle file(s):

```html
<script src="https://mydomain/azure-storage.blob.min.js"></script>
<script src="https://mydomain/azure-storage-blob.min.js"></script>
```

The JS bundled file is compatible with [UMD](https://github.com/umdjs/umd) standard, if no module system found, following global variable(s) will be exported:
Expand Down
2 changes: 1 addition & 1 deletion sdk/storage/storage-blob/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"main": "./dist/index.js",
"module": "./dist-esm/src/index.js",
"browser": {
"./dist/index.js": "./browser/azure-storage.blob.min.js",
"./dist/index.js": "./browser/azure-storage-blob.min.js",
"./dist-esm/src/index.js": "./dist-esm/src/index.browser.js",
"./dist-esm/test/utils/index.js": "./dist-esm/test/utils/index.browser.js",
"./dist-esm/src/BlobDownloadResponse.js": "./dist-esm/src/BlobDownloadResponse.browser.js",
Expand Down
4 changes: 2 additions & 2 deletions sdk/storage/storage-file/.npmignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# browser #
browser/azure-storage.file.js
browser/azure-storage.file.js.map
browser/azure-storage-file.js
browser/azure-storage-file.js.map

# dist-test #
dist-test/
Expand Down
82 changes: 41 additions & 41 deletions sdk/storage/storage-file/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Azure Storage SDK V10 for JavaScript - File

* [![npm version](https://badge.fury.io/js/%40azure%2Fstorage-file.svg)](https://badge.fury.io/js/%40azure%2Fstorage-file)
* [API Reference documentation](https://docs.microsoft.com/en-us/javascript/api/%40azure/storage-file/index?view=azure-node-preview)
- [![npm version](https://badge.fury.io/js/%40azure%2Fstorage-file.svg)](https://badge.fury.io/js/%40azure%2Fstorage-file)
- [API Reference documentation](https://docs.microsoft.com/en-us/javascript/api/%40azure/storage-file/index?view=azure-node-preview)

## Introduction

Expand All @@ -11,15 +11,15 @@ Please note that this version of the SDK is a compete overhaul of the current [A

### Features

* File Storage
* Get/Set File Service Properties
* Create/List/Delete File Shares
* Create/List/Delete File Directories
* Create/Read/List/Update/Delete Files
* Features new
* Asynchronous I/O for all operations using the async methods
* HttpPipeline which enables a high degree of per-request configurability
* 1-to-1 correlation with the Storage REST API for clarity and simplicity
- File Storage
- Get/Set File Service Properties
- Create/List/Delete File Shares
- Create/List/Delete File Directories
- Create/Read/List/Update/Delete Files
- Features new
- Asynchronous I/O for all operations using the async methods
- HttpPipeline which enables a high degree of per-request configurability
- 1-to-1 correlation with the Storage REST API for clarity and simplicity

### Compatibility

Expand All @@ -31,34 +31,34 @@ You need polyfills to make this library work with IE11. The easiest way is to us
Or you can load separate polyfills for missed ES feature(s).
This library depends on following ES features which need external polyfills loaded.

* `Promise`
* `String.prototype.startsWith`
* `String.prototype.endsWith`
* `String.prototype.repeat`
* `String.prototype.includes`
* `Array.prototype.includes`
* `Object.keys` (Override IE11's `Object.keys` with ES6 polyfill forcely to enable [ES6 behavior](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/keys#Notes))
- `Promise`
- `String.prototype.startsWith`
- `String.prototype.endsWith`
- `String.prototype.repeat`
- `String.prototype.includes`
- `Array.prototype.includes`
- `Object.keys` (Override IE11's `Object.keys` with ES6 polyfill forcely to enable [ES6 behavior](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/keys#Notes))

#### Differences between Node.js and browsers

There are differences between Node.js and browsers runtime. When getting start with this SDK, pay attention to APIs or classes marked with _"ONLY AVAILABLE IN NODE.JS RUNTIME"_ or _"ONLY AVAILABLE IN BROWSERS"_.

##### Following features, interfaces, classes or functions are only available in Node.js

* Shared Key Authorization based on account name and account key
* `SharedKeyCredential`
* Shared Access Signature(SAS) generation
* `generateAccountSASQueryParameters()`
* `generateFileSASQueryParameters()`
* Parallel uploading and downloading
* `uploadFileToAzureFile()`
* `uploadStreamToAzureFile()`
* `downloadAzureFileToBuffer()`
- Shared Key Authorization based on account name and account key
- `SharedKeyCredential`
- Shared Access Signature(SAS) generation
- `generateAccountSASQueryParameters()`
- `generateFileSASQueryParameters()`
- Parallel uploading and downloading
- `uploadFileToAzureFile()`
- `uploadStreamToAzureFile()`
- `downloadAzureFileToBuffer()`

##### Following features, interfaces, classes or functions are only available in browsers

* Parallel uploading and downloading
* `uploadBrowserDataToAzureFile()`
- Parallel uploading and downloading
- `uploadBrowserDataToAzureFile()`

## Getting Started

Expand Down Expand Up @@ -87,38 +87,38 @@ const Azure = require("@azure/storage-file");
To use the SDK with JS bundle in the browsers, simply add a script tag to your HTML pages pointing to the downloaded JS bundle file(s):

```html
<script src="https://mydomain/azure-storage.file.min.js"></script>
<script src="https://mydomain/azure-storage-file.min.js"></script>
```

The JS bundled file is compatible with [UMD](https://github.com/umdjs/umd) standard, if no module system found, following global variable(s) will be exported:

* `azfile`
- `azfile`

#### Download

Download latest released JS bundles from links in the [GitHub release page](https://github.com/Azure/azure-storage-js/releases). Or from following links directly:

* File [https://aka.ms/downloadazurestoragejsfile](https://aka.ms/downloadazurestoragejsfile)
- File [https://aka.ms/downloadazurestoragejsfile](https://aka.ms/downloadazurestoragejsfile)

### CORS

You need to set up [Cross-Origin Resource Sharing (CORS)](https://docs.microsoft.com/zh-cn/rest/api/storageservices/cross-origin-resource-sharing--cors--support-for-the-azure-storage-services) rules for your storage account if you need to develop for browsers. Go to Azure portal and Azure Storage Explorer, find your storage account, create new CORS rules for blob/queue/file/table service(s).

For example, you can create following CORS settings for debugging. But please customize the settings carefully according to your requirements in production environment.

* Allowed origins: \*
* Allowed verbs: DELETE,GET,HEAD,MERGE,POST,OPTIONS,PUT
* Allowed headers: \*
* Exposed headers: \*
* Maximum age (seconds): 86400
- Allowed origins: \*
- Allowed verbs: DELETE,GET,HEAD,MERGE,POST,OPTIONS,PUT
- Allowed headers: \*
- Exposed headers: \*
- Maximum age (seconds): 86400

## SDK Architecture

The Azure Storage SDK for JavaScript provides low-level and high-level APIs.

* ServiceURL, ShareURL, DirectoryURL and FileURL objects provide the low-level API functionality and map one-to-one to the [Azure Storage File REST APIs](https://docs.microsoft.com/en-us/rest/api/storageservices/file-service-rest-api).
- ServiceURL, ShareURL, DirectoryURL and FileURL objects provide the low-level API functionality and map one-to-one to the [Azure Storage File REST APIs](https://docs.microsoft.com/en-us/rest/api/storageservices/file-service-rest-api).

* The high-level APIs provide convenience abstractions such as uploading a large stream to a file (using multiple PutBlock requests).
- The high-level APIs provide convenience abstractions such as uploading a large stream to a file (using multiple PutBlock requests).

## Code Samples

Expand Down Expand Up @@ -253,8 +253,8 @@ main()

## More Code Samples

* [File Storage Examples](https://github.com/azure/azure-storage-js/tree/master/file/samples)
* [File Storage Examples - Test Cases](https://github.com/azure/azure-storage-js/tree/master/file/test/)
- [File Storage Examples](https://github.com/azure/azure-storage-js/tree/master/file/samples)
- [File Storage Examples - Test Cases](https://github.com/azure/azure-storage-js/tree/master/file/test/)

## License

Expand Down
2 changes: 1 addition & 1 deletion sdk/storage/storage-file/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"main": "./dist/index.js",
"module": "./dist-esm/src/index.js",
"browser": {
"./dist/index.js": "./browser/azure-storage.file.min.js",
"./dist/index.js": "./browser/azure-storage-file.min.js",
"./dist-esm/src/index.js": "./dist-esm/src/index.browser.js",
"./dist-esm/test/utils/index.js": "./dist-esm/test/utils/index.browser.js",
"./dist-esm/src/FileDownloadResponse.js": "./dist-esm/src/FileDownloadResponse.browser.js",
Expand Down
4 changes: 2 additions & 2 deletions sdk/storage/storage-queue/.npmignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# browser #
browser/azure-storage.queue.js
browser/azure-storage.queue.js.map
browser/azure-storage-queue.js
browser/azure-storage-queue.js.map

# dist-test #
dist-test/
Expand Down
Loading

0 comments on commit 7788fd0

Please sign in to comment.