Skip to content

Commit

Permalink
Update template to depend on core-http (#4437)
Browse files Browse the repository at this point in the history
- Bundle core-http instead of requiring as external
  • Loading branch information
mikeharder authored Jul 29, 2019
1 parent 8aad5be commit e0c8e19
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 18 deletions.
24 changes: 12 additions & 12 deletions common/config/rush/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion sdk/template/template/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"sideEffects": false,
"private": true,
"dependencies": {
"@azure/ms-rest-js": "^1.8.1",
"@azure/core-http": "1.0.0-preview.2",
"events": "^3.0.0",
"tslib": "^1.9.3"
},
Expand Down
2 changes: 1 addition & 1 deletion sdk/template/template/review/template.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
```ts

import EventEmitter from 'events';
import { URLBuilder } from '@azure/ms-rest-js';
import { URLBuilder } from '@azure/core-http';

// @public (undocumented)
export function createEventEmitter(): EventEmitter;
Expand Down
3 changes: 1 addition & 2 deletions sdk/template/template/rollup.base.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,12 @@ export function nodeConfig(test = false) {
export function browserConfig(test = false, production = false) {
const baseConfig = {
input: input,
external: ["@azure/ms-rest-js"],
output: {
file: "browser/azure-template.js",
format: "umd",
name: "ExampleClient",
sourcemap: true,
globals: { "@azure/ms-rest-js": "msRest" }
globals: { "@azure/core-http": "Azure.Core.HTTP" }
},
preserveSymlinks: false,
plugins: [
Expand Down
4 changes: 2 additions & 2 deletions sdk/template/template/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ export { print };

// this is a utility function from a library that should be external
// for both node and web
import { isNode } from "@azure/ms-rest-js";
import { isNode } from "@azure/core-http";

// exporting some value from a dependency
export { URLBuilder } from "@azure/ms-rest-js";
export { URLBuilder } from "@azure/core-http";

export function createEventEmitter() {
// use event emitter
Expand Down

0 comments on commit e0c8e19

Please sign in to comment.