-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- both clients are now merged into the single module - export `AMPClientFactory` now contains two methods - `create()` and `createEmbed()` - optimized bundle size with `lodash-webpack-plugin`
- Loading branch information
Showing
8 changed files
with
50 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1 @@ | ||
export { ClientFactory as default } from './src/client/standard/client-factory.mjs'; | ||
export { ClientFactory as AMPClientFactory } from './src/client/standard/client-factory.mjs'; | ||
export { ClientFactory as EmbedAMPClientFactory } from './src/client/embed/client-factory.mjs'; | ||
export { ClientFactory as default } from './src/client/client-factory.mjs'; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import pkg from '../../package.json'; | ||
import { ClientVersion } from './client-version.mjs'; | ||
import { Client as StandardClient } from './standard/client.mjs'; | ||
import { Client as EmbedClient } from './embed/client.mjs'; | ||
|
||
const semver = pkg.version; | ||
|
||
export class ClientFactory { | ||
static create(options = {}) { | ||
return new StandardClient( | ||
new ClientVersion(semver, `standard@${semver}`), | ||
options, | ||
); | ||
} | ||
|
||
static createEmbed(options = {}) { | ||
return new EmbedClient( | ||
new ClientVersion(semver, `embed@${semver}`), | ||
options, | ||
); | ||
} | ||
|
||
static get version() { | ||
return semver; | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters