@duffel/components 3.0.3-canary → 3.0.5-canary

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.eslintrc.js CHANGED
@@ -9,7 +9,7 @@ module.exports = {
9
9
  node: true,
10
10
  jest: true,
11
11
  },
12
- ignorePatterns: ["**/dist/**", "react-dist/**", "__generated__**"],
12
+ ignorePatterns: ["**/cdn-dist/**", "react-dist/**", "__generated__**"],
13
13
  parser: "@typescript-eslint/parser",
14
14
  extends: [
15
15
  "eslint:recommended",
package/README.md CHANGED
@@ -1,9 +1,27 @@
1
1
  # @duffel/components
2
2
 
3
- ## Ancillaries component
3
+ This package is a component library to help you build your travel product using the [Duffel API](https://duffel.com/docs).
4
4
 
5
- ### What is this?
5
+ ## Get started
6
6
 
7
- The ancillaries component is a JavaScript component you can use to allow your customers to add ancillaries to their order. It's simple to add to your website and can be customised to fit your brand.
7
+ ### Installing
8
8
 
9
- > [See live demo here](https://codesandbox.io/s/duffel-ancillaries-example-1nxuu7)
9
+ ```sh
10
+ yarn add @duffel/components
11
+ # -- or --
12
+ npm i @duffel/components
13
+ ```
14
+
15
+ ### (alternative) Load from CDN:
16
+
17
+ ```html
18
+ <script src="https://assets.duffel.com/components/3.0.5-canary/index.js"></script>
19
+ ```
20
+
21
+ ## Components
22
+
23
+ ### Ancillaries component
24
+
25
+ The ancillaries component allows your customers to add ancillaries to their order. It's simple to add to your website and can be customised to fit your brand. This component is avaiable through npm and our cdn.
26
+
27
+ - [Find live demo on codesandbox.io&nbsp;&nbsp;↗](https://codesandbox.io/s/duffel-ancillaries-example-1nxuu7)
@@ -10,5 +10,5 @@ module.exports = {
10
10
  minify: true,
11
11
  sourcemap: true,
12
12
  treeShaking: true,
13
- outdir: "dist/ancillaries",
13
+ outdir: "cdn-dist",
14
14
  };
@@ -34,14 +34,14 @@ esbuild
34
34
  org: "duffel",
35
35
  project: "ancillaries-component",
36
36
  // Specify the directory containing build artifacts
37
- include: "./dist",
37
+ include: "./cdn-dist",
38
38
  authToken: process.env.SENTRY_AUTH_TOKEN,
39
39
  logLevel: "info",
40
- release: `element-${VERSION}`,
40
+ release: `cdn-${VERSION}`,
41
41
  }),
42
42
  esbuildCopyStaticFiles({
43
43
  src: "src/fixtures",
44
- dest: "dist/ancillaries/fixtures",
44
+ dest: "cdn-dist/fixtures",
45
45
  dereference: true,
46
46
  recursive: true,
47
47
  }),
@@ -27,7 +27,7 @@ const COMPONENT_CDN = process.env.COMPONENT_CDN.startsWith("http://localhost:")
27
27
  // the component will attempt to fetch it from the hosted folder.
28
28
  require("esbuild-copy-static-files")({
29
29
  src: "src/fixtures",
30
- dest: "dist/ancillaries/fixtures",
30
+ dest: "cdn-dist/fixtures",
31
31
  dereference: true,
32
32
  recursive: true,
33
33
  }),
package/package.json CHANGED
@@ -1,9 +1,13 @@
1
1
  {
2
2
  "name": "@duffel/components",
3
- "version": "3.0.3-canary",
3
+ "version": "3.0.5-canary",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "main": "react-dist/index.js",
7
+ "exports": {
8
+ ".": "./react-dist/index.js",
9
+ "./custom-elements": "./react-dist/custom-elements.js"
10
+ },
7
11
  "maintainers": [
8
12
  {
9
13
  "name": "Duffel",
@@ -146,11 +150,10 @@
146
150
  "Duffel",
147
151
  "ancillaries",
148
152
  "seats",
149
- "seat map",
153
+ "seat maps",
150
154
  "baggage",
151
155
  "travel"
152
156
  ],
153
- "author": "duffel.com",
154
157
  "bugs": {
155
158
  "url": "https://github.com/duffelhq/duffel-checkout/issues"
156
159
  },
@@ -1 +1,5 @@
1
+ /**
2
+ * This file is one of the entry points for the library -- `@duffel/components/custom-elements`.
3
+ * If you'd like to expose other custom element functions, please add them here.
4
+ */
1
5
  export { onDuffelAncillariesPayloadReady, renderDuffelAncillariesCustomElement, } from "./components/DuffelAncillariesCustomElement";