@adobe/create-ccweb-add-on 1.0.0 → 1.1.0
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/dist/app/AddOnTemplateSelector.js +13 -13
- package/dist/constants.d.ts +1 -1
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +5 -5
- package/dist/templates/{javascript-with-script-runtime → javascript-with-document-sandbox}/template/README.md +1 -1
- package/{templates/javascript-with-script-runtime → dist/templates/javascript-with-document-sandbox}/template/src/code.js +10 -11
- package/dist/templates/{javascript-with-script-runtime → javascript-with-document-sandbox}/template/src/index.html +9 -6
- package/dist/templates/{javascript-with-script-runtime → javascript-with-document-sandbox}/template/src/manifest.json +1 -1
- package/dist/templates/react-javascript/template.json +7 -7
- package/dist/templates/{react-javascript-with-script-runtime → react-javascript-with-document-sandbox}/template/README.md +1 -1
- package/{templates/react-javascript-with-script-runtime → dist/templates/react-javascript-with-document-sandbox}/template/src/index.html +5 -2
- package/dist/templates/{react-typescript-with-script-runtime → react-javascript-with-document-sandbox}/template/src/manifest.json +1 -1
- package/dist/templates/{react-javascript-with-script-runtime/template/src/script → react-javascript-with-document-sandbox/template/src/sandbox}/code.js +10 -11
- package/dist/templates/{react-javascript-with-script-runtime → react-javascript-with-document-sandbox}/template/src/ui/components/App.jsx +2 -2
- package/{templates/react-javascript-with-script-runtime → dist/templates/react-javascript-with-document-sandbox}/template/src/ui/index.jsx +3 -3
- package/{templates/react-javascript-with-script-runtime → dist/templates/react-javascript-with-document-sandbox}/template/webpack.config.js +3 -3
- package/dist/templates/{react-javascript-with-script-runtime → react-javascript-with-document-sandbox}/template.json +7 -7
- package/dist/templates/react-typescript/template/webpack.config.js +1 -1
- package/dist/templates/react-typescript/template.json +6 -6
- package/{templates/react-typescript-with-script-runtime → dist/templates/react-typescript-with-document-sandbox}/template/README.md +1 -1
- package/dist/templates/{react-javascript-with-script-runtime → react-typescript-with-document-sandbox}/template/src/index.html +5 -2
- package/dist/templates/{react-javascript-with-script-runtime → react-typescript-with-document-sandbox}/template/src/manifest.json +1 -1
- package/dist/templates/react-typescript-with-document-sandbox/template/src/models/DocumentSandboxApi.ts +4 -0
- package/dist/templates/react-typescript-with-document-sandbox/template/src/sandbox/add-on-sandbox-sdk.d.ts +11 -0
- package/dist/templates/{typescript-with-script-runtime/template/src/script → react-typescript-with-document-sandbox/template/src/sandbox}/code.ts +12 -13
- package/dist/templates/{react-typescript-with-script-runtime/template/src/script → react-typescript-with-document-sandbox/template/src/sandbox}/tsconfig.json +1 -1
- package/{templates/react-typescript-with-script-runtime → dist/templates/react-typescript-with-document-sandbox}/template/src/ui/components/App.tsx +3 -3
- package/{templates/react-typescript-with-script-runtime → dist/templates/react-typescript-with-document-sandbox}/template/src/ui/index.tsx +5 -5
- package/{templates/react-typescript-with-script-runtime → dist/templates/react-typescript-with-document-sandbox}/template/webpack.config.js +7 -7
- package/dist/templates/{react-typescript-with-script-runtime → react-typescript-with-document-sandbox}/template.json +6 -6
- package/dist/templates/typescript/template.json +5 -5
- package/{templates/typescript-with-script-runtime → dist/templates/typescript-with-document-sandbox}/template/README.md +1 -1
- package/{templates/typescript-with-script-runtime → dist/templates/typescript-with-document-sandbox}/template/src/index.html +5 -2
- package/dist/templates/{typescript-with-script-runtime → typescript-with-document-sandbox}/template/src/manifest.json +1 -1
- package/dist/templates/typescript-with-document-sandbox/template/src/models/DocumentSandboxApi.ts +4 -0
- package/dist/templates/typescript-with-document-sandbox/template/src/sandbox/add-on-sandbox-sdk.d.ts +11 -0
- package/dist/templates/{react-typescript-with-script-runtime/template/src/script → typescript-with-document-sandbox/template/src/sandbox}/code.ts +12 -13
- package/{templates/typescript-with-script-runtime/template/src/script → dist/templates/typescript-with-document-sandbox/template/src/sandbox}/tsconfig.json +1 -1
- package/dist/templates/{typescript-with-script-runtime → typescript-with-document-sandbox}/template/src/ui/components/App.ts +5 -5
- package/{templates/typescript-with-script-runtime → dist/templates/typescript-with-document-sandbox}/template/webpack.config.js +6 -6
- package/dist/templates/{typescript-with-script-runtime → typescript-with-document-sandbox}/template.json +5 -5
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +6 -6
- package/src/app/AddOnTemplateSelector.ts +13 -13
- package/src/constants.ts +5 -5
- package/src/test/app/AddOnTemplateSelector.spec.ts +12 -12
- package/templates/{javascript-with-script-runtime → javascript-with-document-sandbox}/template/README.md +1 -1
- package/templates/{react-javascript-with-script-runtime/template/src/script → javascript-with-document-sandbox/template/src}/code.js +10 -11
- package/templates/{javascript-with-script-runtime → javascript-with-document-sandbox}/template/src/index.html +9 -6
- package/templates/javascript-with-document-sandbox/template/src/manifest.json +23 -0
- package/templates/react-javascript/template.json +7 -7
- package/templates/{react-javascript-with-script-runtime → react-javascript-with-document-sandbox}/template/README.md +1 -1
- package/{dist/templates/react-typescript-with-script-runtime → templates/react-javascript-with-document-sandbox}/template/src/index.html +6 -3
- package/templates/react-javascript-with-document-sandbox/template/src/manifest.json +23 -0
- package/{dist/templates/javascript-with-script-runtime/template/src → templates/react-javascript-with-document-sandbox/template/src/sandbox}/code.js +10 -11
- package/templates/{react-javascript-with-script-runtime → react-javascript-with-document-sandbox}/template/src/ui/components/App.jsx +2 -2
- package/{dist/templates/react-javascript-with-script-runtime → templates/react-javascript-with-document-sandbox}/template/src/ui/index.jsx +3 -3
- package/{dist/templates/react-javascript-with-script-runtime → templates/react-javascript-with-document-sandbox}/template/webpack.config.js +3 -3
- package/templates/{react-javascript-with-script-runtime → react-javascript-with-document-sandbox}/template.json +7 -7
- package/templates/react-typescript/template/webpack.config.js +1 -1
- package/templates/react-typescript/template.json +6 -6
- package/{dist/templates/react-typescript-with-script-runtime → templates/react-typescript-with-document-sandbox}/template/README.md +1 -1
- package/templates/{react-typescript-with-script-runtime → react-typescript-with-document-sandbox}/template/src/index.html +6 -3
- package/templates/react-typescript-with-document-sandbox/template/src/manifest.json +23 -0
- package/templates/react-typescript-with-document-sandbox/template/src/models/DocumentSandboxApi.ts +4 -0
- package/templates/react-typescript-with-document-sandbox/template/src/sandbox/add-on-sandbox-sdk.d.ts +11 -0
- package/templates/{typescript-with-script-runtime/template/src/script → react-typescript-with-document-sandbox/template/src/sandbox}/code.ts +12 -13
- package/{dist/templates/typescript-with-script-runtime/template/src/script → templates/react-typescript-with-document-sandbox/template/src/sandbox}/tsconfig.json +1 -1
- package/{dist/templates/react-typescript-with-script-runtime → templates/react-typescript-with-document-sandbox}/template/src/ui/components/App.tsx +3 -3
- package/{dist/templates/react-typescript-with-script-runtime → templates/react-typescript-with-document-sandbox}/template/src/ui/index.tsx +5 -5
- package/{dist/templates/react-typescript-with-script-runtime → templates/react-typescript-with-document-sandbox}/template/webpack.config.js +7 -7
- package/templates/{react-typescript-with-script-runtime → react-typescript-with-document-sandbox}/template.json +6 -6
- package/templates/typescript/template.json +5 -5
- package/{dist/templates/typescript-with-script-runtime → templates/typescript-with-document-sandbox}/template/README.md +1 -1
- package/{dist/templates/typescript-with-script-runtime → templates/typescript-with-document-sandbox}/template/src/index.html +5 -2
- package/templates/typescript-with-document-sandbox/template/src/manifest.json +23 -0
- package/templates/typescript-with-document-sandbox/template/src/models/DocumentSandboxApi.ts +4 -0
- package/templates/typescript-with-document-sandbox/template/src/sandbox/add-on-sandbox-sdk.d.ts +11 -0
- package/templates/{react-typescript-with-script-runtime/template/src/script → typescript-with-document-sandbox/template/src/sandbox}/code.ts +12 -13
- package/templates/{react-typescript-with-script-runtime/template/src/script → typescript-with-document-sandbox/template/src/sandbox}/tsconfig.json +1 -1
- package/templates/{typescript-with-script-runtime → typescript-with-document-sandbox}/template/src/ui/components/App.ts +5 -5
- package/{dist/templates/typescript-with-script-runtime → templates/typescript-with-document-sandbox}/template/webpack.config.js +6 -6
- package/templates/{typescript-with-script-runtime → typescript-with-document-sandbox}/template.json +5 -5
- package/dist/templates/react-typescript-with-script-runtime/template/src/models/ScriptApi.ts +0 -3
- package/dist/templates/react-typescript-with-script-runtime/template/src/script/add-on-script-sdk.d.ts +0 -11
- package/dist/templates/typescript-with-script-runtime/template/src/models/ScriptApi.ts +0 -3
- package/dist/templates/typescript-with-script-runtime/template/src/script/add-on-script-sdk.d.ts +0 -11
- package/templates/javascript-with-script-runtime/template/src/manifest.json +0 -23
- package/templates/react-javascript-with-script-runtime/template/src/manifest.json +0 -23
- package/templates/react-typescript-with-script-runtime/template/src/manifest.json +0 -23
- package/templates/react-typescript-with-script-runtime/template/src/models/ScriptApi.ts +0 -3
- package/templates/react-typescript-with-script-runtime/template/src/script/add-on-script-sdk.d.ts +0 -11
- package/templates/typescript-with-script-runtime/template/src/manifest.json +0 -23
- package/templates/typescript-with-script-runtime/template/src/models/ScriptApi.ts +0 -3
- package/templates/typescript-with-script-runtime/template/src/script/add-on-script-sdk.d.ts +0 -11
- /package/dist/templates/{javascript-with-script-runtime → javascript-with-document-sandbox}/template/gitignore +0 -0
- /package/dist/templates/{javascript-with-script-runtime → javascript-with-document-sandbox}/template.json +0 -0
- /package/dist/templates/{react-javascript-with-script-runtime → react-javascript-with-document-sandbox}/template/.babelrc +0 -0
- /package/dist/templates/{react-javascript-with-script-runtime → react-javascript-with-document-sandbox}/template/gitignore +0 -0
- /package/dist/templates/{react-javascript-with-script-runtime → react-javascript-with-document-sandbox}/template/src/ui/components/App.css +0 -0
- /package/dist/templates/{react-typescript-with-script-runtime → react-typescript-with-document-sandbox}/template/gitignore +0 -0
- /package/dist/templates/{react-typescript-with-script-runtime → react-typescript-with-document-sandbox}/template/src/ui/add-on-ui-sdk.d.ts +0 -0
- /package/dist/templates/{react-typescript-with-script-runtime → react-typescript-with-document-sandbox}/template/src/ui/components/App.css +0 -0
- /package/dist/templates/{react-typescript-with-script-runtime → react-typescript-with-document-sandbox}/template/src/ui/tsconfig.json +0 -0
- /package/dist/templates/{react-typescript-with-script-runtime → react-typescript-with-document-sandbox}/template/tsconfig.json +0 -0
- /package/dist/templates/{typescript-with-script-runtime → typescript-with-document-sandbox}/template/gitignore +0 -0
- /package/dist/templates/{typescript-with-script-runtime → typescript-with-document-sandbox}/template/src/ui/add-on-ui-sdk.d.ts +0 -0
- /package/dist/templates/{typescript-with-script-runtime → typescript-with-document-sandbox}/template/src/ui/components/App.css.ts +0 -0
- /package/dist/templates/{typescript-with-script-runtime → typescript-with-document-sandbox}/template/src/ui/index.ts +0 -0
- /package/dist/templates/{typescript-with-script-runtime → typescript-with-document-sandbox}/template/src/ui/tsconfig.json +0 -0
- /package/dist/templates/{typescript-with-script-runtime → typescript-with-document-sandbox}/template/tsconfig.json +0 -0
- /package/templates/{javascript-with-script-runtime → javascript-with-document-sandbox}/template/gitignore +0 -0
- /package/templates/{javascript-with-script-runtime → javascript-with-document-sandbox}/template.json +0 -0
- /package/templates/{react-javascript-with-script-runtime → react-javascript-with-document-sandbox}/template/.babelrc +0 -0
- /package/templates/{react-javascript-with-script-runtime → react-javascript-with-document-sandbox}/template/gitignore +0 -0
- /package/templates/{react-javascript-with-script-runtime → react-javascript-with-document-sandbox}/template/src/ui/components/App.css +0 -0
- /package/templates/{react-typescript-with-script-runtime → react-typescript-with-document-sandbox}/template/gitignore +0 -0
- /package/templates/{react-typescript-with-script-runtime → react-typescript-with-document-sandbox}/template/src/ui/add-on-ui-sdk.d.ts +0 -0
- /package/templates/{react-typescript-with-script-runtime → react-typescript-with-document-sandbox}/template/src/ui/components/App.css +0 -0
- /package/templates/{react-typescript-with-script-runtime → react-typescript-with-document-sandbox}/template/src/ui/tsconfig.json +0 -0
- /package/templates/{react-typescript-with-script-runtime → react-typescript-with-document-sandbox}/template/tsconfig.json +0 -0
- /package/templates/{typescript-with-script-runtime → typescript-with-document-sandbox}/template/gitignore +0 -0
- /package/templates/{typescript-with-script-runtime → typescript-with-document-sandbox}/template/src/ui/add-on-ui-sdk.d.ts +0 -0
- /package/templates/{typescript-with-script-runtime → typescript-with-document-sandbox}/template/src/ui/components/App.css.ts +0 -0
- /package/templates/{typescript-with-script-runtime → typescript-with-document-sandbox}/template/src/ui/index.ts +0 -0
- /package/templates/{typescript-with-script-runtime → typescript-with-document-sandbox}/template/src/ui/tsconfig.json +0 -0
- /package/templates/{typescript-with-script-runtime → typescript-with-document-sandbox}/template/tsconfig.json +0 -0
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
"package": "ccweb-add-on-scripts package --use webpack"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@spectrum-web-components/theme": "0.
|
|
10
|
-
"@swc-react/button": "0.
|
|
11
|
-
"@swc-react/theme": "0.
|
|
9
|
+
"@spectrum-web-components/theme": "0.40.0",
|
|
10
|
+
"@swc-react/button": "0.40.0",
|
|
11
|
+
"@swc-react/theme": "0.40.0",
|
|
12
12
|
"react-dom": "18.2.0",
|
|
13
13
|
"react": "18.2.0"
|
|
14
14
|
},
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
"css-loader": "6.8.1",
|
|
20
20
|
"html-webpack-plugin": "5.5.3",
|
|
21
21
|
"style-loader": "3.3.3",
|
|
22
|
-
"ts-loader": "9.
|
|
23
|
-
"typescript": "5.
|
|
22
|
+
"ts-loader": "9.5.1",
|
|
23
|
+
"typescript": "5.3.2",
|
|
24
24
|
"webpack-cli": "5.1.4",
|
|
25
|
-
"webpack": "5.
|
|
25
|
+
"webpack": "5.89.0"
|
|
26
26
|
}
|
|
27
27
|
}
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
"package": "ccweb-add-on-scripts package --use webpack"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@spectrum-web-components/button": "0.
|
|
10
|
-
"@spectrum-web-components/theme": "0.
|
|
9
|
+
"@spectrum-web-components/button": "0.40.0",
|
|
10
|
+
"@spectrum-web-components/theme": "0.40.0",
|
|
11
11
|
"lit": "2.8.0"
|
|
12
12
|
},
|
|
13
13
|
"devDependencies": {
|
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
"css-loader": "6.8.1",
|
|
16
16
|
"html-webpack-plugin": "5.5.3",
|
|
17
17
|
"style-loader": "3.3.3",
|
|
18
|
-
"ts-loader": "9.
|
|
19
|
-
"typescript": "5.
|
|
18
|
+
"ts-loader": "9.5.1",
|
|
19
|
+
"typescript": "5.3.2",
|
|
20
20
|
"webpack-cli": "5.1.4",
|
|
21
|
-
"webpack": "5.
|
|
21
|
+
"webpack": "5.89.0"
|
|
22
22
|
}
|
|
23
23
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
## About
|
|
2
2
|
|
|
3
|
-
This project has been created with _@adobe/create-ccweb-add-on_. As an example, this Add-on demonstrates how to get started with Add-on development using TypeScript with
|
|
3
|
+
This project has been created with _@adobe/create-ccweb-add-on_. As an example, this Add-on demonstrates how to get started with Add-on development using TypeScript with Document Sandbox Runtime.
|
|
4
4
|
|
|
5
5
|
## Tools
|
|
6
6
|
|
|
@@ -2,8 +2,11 @@
|
|
|
2
2
|
<html lang="en">
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
|
-
<meta
|
|
6
|
-
|
|
5
|
+
<meta
|
|
6
|
+
name="description"
|
|
7
|
+
content="Get started with Add-on development using TypeScript with Document Sandbox Runtime"
|
|
8
|
+
/>
|
|
9
|
+
<meta name="keywords" content="Adobe, Express, Add-On, TypeScript, Document Sandbox Runtime" />
|
|
7
10
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
8
11
|
<title>Get Started</title>
|
|
9
12
|
</head>
|
package/dist/templates/typescript-with-document-sandbox/template/src/sandbox/add-on-sandbox-sdk.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// DO NOT modify this file.
|
|
2
|
+
|
|
3
|
+
declare module "add-on-sdk-document-sandbox" {
|
|
4
|
+
import { AddOnDocumentSandboxSdkTypes } from "@adobe/ccweb-add-on-sdk-types";
|
|
5
|
+
export default AddOnDocumentSandboxSdkTypes.default;
|
|
6
|
+
export * from "@adobe/ccweb-add-on-sdk-types/sandbox/add-on-sdk-document-sandbox";
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
declare module "express-document-sdk" {
|
|
10
|
+
export * from "@adobe/ccweb-add-on-sdk-types/sandbox/express-document-sdk";
|
|
11
|
+
}
|
|
@@ -1,24 +1,23 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { editor, utils } from "express";
|
|
3
|
-
import {
|
|
1
|
+
import addOnSandboxSdk from "add-on-sdk-document-sandbox";
|
|
2
|
+
import { editor, utils } from "express-document-sdk";
|
|
3
|
+
import { DocumentSandboxApi } from "../models/DocumentSandboxApi";
|
|
4
4
|
|
|
5
|
-
// Get the
|
|
6
|
-
const { runtime } =
|
|
5
|
+
// Get the document sandbox runtime.
|
|
6
|
+
const { runtime } = addOnSandboxSdk.instance;
|
|
7
7
|
|
|
8
8
|
function start(): void {
|
|
9
9
|
// APIs to be exposed to the UI runtime
|
|
10
|
-
// i.e., to the `
|
|
11
|
-
const
|
|
10
|
+
// i.e., to the `App.ts` file of this add-on.
|
|
11
|
+
const sandboxApi: DocumentSandboxApi = {
|
|
12
12
|
createRectangle: () => {
|
|
13
13
|
const rectangle = editor.createRectangle();
|
|
14
14
|
|
|
15
15
|
// Define rectangle dimensions.
|
|
16
|
-
rectangle.width =
|
|
17
|
-
rectangle.height =
|
|
16
|
+
rectangle.width = 240;
|
|
17
|
+
rectangle.height = 180;
|
|
18
18
|
|
|
19
19
|
// Define rectangle position.
|
|
20
|
-
rectangle.
|
|
21
|
-
rectangle.translateY = 100;
|
|
20
|
+
rectangle.translation = { x: 10, y: 10 };
|
|
22
21
|
|
|
23
22
|
// Define rectangle color.
|
|
24
23
|
const [red, green, blue, alpha] = [0.32, 0.34, 0.89, 1];
|
|
@@ -33,8 +32,8 @@ function start(): void {
|
|
|
33
32
|
}
|
|
34
33
|
};
|
|
35
34
|
|
|
36
|
-
// Expose `
|
|
37
|
-
runtime.exposeApi(
|
|
35
|
+
// Expose `sandboxApi` to the UI runtime.
|
|
36
|
+
runtime.exposeApi(sandboxApi);
|
|
38
37
|
}
|
|
39
38
|
|
|
40
39
|
start();
|
|
@@ -12,7 +12,7 @@ import "@spectrum-web-components/theme/sp-theme.js";
|
|
|
12
12
|
|
|
13
13
|
import { LitElement, html } from "lit";
|
|
14
14
|
import { customElement, property, state } from "lit/decorators.js";
|
|
15
|
-
import {
|
|
15
|
+
import { DocumentSandboxApi } from "../../models/DocumentSandboxApi";
|
|
16
16
|
import { style } from "./App.css";
|
|
17
17
|
|
|
18
18
|
import { AddOnSDKAPI, RuntimeType } from "https://new.express.adobe.com/static/add-on-sdk/sdk.js";
|
|
@@ -23,7 +23,7 @@ export class App extends LitElement {
|
|
|
23
23
|
addOnUISdk!: AddOnSDKAPI;
|
|
24
24
|
|
|
25
25
|
@state()
|
|
26
|
-
private
|
|
26
|
+
private _sandboxProxy: DocumentSandboxApi;
|
|
27
27
|
|
|
28
28
|
static get styles() {
|
|
29
29
|
return style;
|
|
@@ -34,13 +34,13 @@ export class App extends LitElement {
|
|
|
34
34
|
const { runtime } = this.addOnUISdk.instance;
|
|
35
35
|
|
|
36
36
|
// Get the proxy object, which is required
|
|
37
|
-
// to call the APIs defined in the
|
|
37
|
+
// to call the APIs defined in the Document Sandbox runtime
|
|
38
38
|
// i.e., in the `code.ts` file of this add-on.
|
|
39
|
-
this.
|
|
39
|
+
this._sandboxProxy = await runtime.apiProxy(RuntimeType.documentSandbox);
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
private _handleClick() {
|
|
43
|
-
this.
|
|
43
|
+
this._sandboxProxy.createRectangle();
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
render() {
|
|
@@ -5,14 +5,14 @@ const CopyWebpackPlugin = require("copy-webpack-plugin");
|
|
|
5
5
|
const isEnvProduction = process.env.NODE_ENV === "production";
|
|
6
6
|
|
|
7
7
|
const uiPath = path.resolve(__dirname, "./src/ui");
|
|
8
|
-
const
|
|
8
|
+
const sandboxPath = path.resolve(__dirname, "./src/sandbox");
|
|
9
9
|
|
|
10
10
|
module.exports = {
|
|
11
11
|
mode: isEnvProduction ? "production" : "development",
|
|
12
12
|
devtool: "source-map",
|
|
13
13
|
entry: {
|
|
14
14
|
index: "./src/ui/index.ts",
|
|
15
|
-
code: "./src/
|
|
15
|
+
code: "./src/sandbox/code.ts"
|
|
16
16
|
},
|
|
17
17
|
experiments: {
|
|
18
18
|
outputModule: true
|
|
@@ -25,8 +25,8 @@ module.exports = {
|
|
|
25
25
|
externalsType: "module",
|
|
26
26
|
externalsPresets: { web: true },
|
|
27
27
|
externals: {
|
|
28
|
-
|
|
29
|
-
express: "express"
|
|
28
|
+
"add-on-sdk-document-sandbox": "add-on-sdk-document-sandbox",
|
|
29
|
+
"express-document-sdk": "express-document-sdk"
|
|
30
30
|
},
|
|
31
31
|
plugins: [
|
|
32
32
|
new HtmlWebpackPlugin({
|
|
@@ -59,11 +59,11 @@ module.exports = {
|
|
|
59
59
|
{
|
|
60
60
|
loader: "ts-loader",
|
|
61
61
|
options: {
|
|
62
|
-
configFile: path.resolve(
|
|
62
|
+
configFile: path.resolve(sandboxPath, "tsconfig.json")
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
],
|
|
66
|
-
include:
|
|
66
|
+
include: sandboxPath,
|
|
67
67
|
exclude: /node_modules/
|
|
68
68
|
}
|
|
69
69
|
]
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
"package": "ccweb-add-on-scripts package --use webpack"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@spectrum-web-components/button": "0.
|
|
10
|
-
"@spectrum-web-components/theme": "0.
|
|
9
|
+
"@spectrum-web-components/button": "0.40.0",
|
|
10
|
+
"@spectrum-web-components/theme": "0.40.0",
|
|
11
11
|
"lit": "2.8.0"
|
|
12
12
|
},
|
|
13
13
|
"devDependencies": {
|
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
"css-loader": "6.8.1",
|
|
16
16
|
"html-webpack-plugin": "5.5.3",
|
|
17
17
|
"style-loader": "3.3.3",
|
|
18
|
-
"ts-loader": "9.
|
|
19
|
-
"typescript": "5.
|
|
18
|
+
"ts-loader": "9.5.1",
|
|
19
|
+
"typescript": "5.3.2",
|
|
20
20
|
"webpack-cli": "5.1.4",
|
|
21
|
-
"webpack": "5.
|
|
21
|
+
"webpack": "5.89.0"
|
|
22
22
|
}
|
|
23
23
|
}
|