You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Check out the [Using Lit & Typescript Guide](./using-lit-typescript.md) for a more detailed explanation of using TypeScript with the Add-on SDK.
23
+
20
24
## Webpack & JavaScript bundler
21
25
22
26
When using Node libraries or other frameworks, you'll often need to use a JavaScript bundler. All of the templates the CLI provides (other than the basic `javascript` template) are pre-configured for webpack via the `--use` option set on the `ccweb-add-on-scripts` commands. If you create a new add-on project based on a react or typescript based template for instance, you will see the following `scripts` block generated in your `package.json`, and the existence of a `webpack.config.js` in the root of your project:
@@ -63,10 +67,25 @@ The CLI supports two different [react-based templates](../getting_started/dev_to
63
67
64
68
## Lit Framework
65
69
66
-
The CLI provides [starter template options](../getting_started/dev_tooling.md#templates) which provide a basic setup to allow you to use the Lit framework, a lightweight library for building fast, lightweight web components. There are currently template options available for either using basic JavaScript (`swc-javascript`) with Lit or TypeScript (`swc-typescript`), preconfigured to help you get started.
70
+
Build fast, lightweight web components using the Lit framework. Our CLI offers [starter templates](../getting_started/dev_tooling.md#templates) to help you get started:
71
+
72
+
-`swc-javascript`: For building with Lit and JavaScript
73
+
-`swc-typescript`: For building with Lit and TypeScript
74
+
-`swc-typescript-with-document-sandbox`: For building with Lit and TypeScript with the Document Sandbox
75
+
-`swc-javascript-with-document-sandbox`: For building with Lit and JavaScript with the Document Sandbox
76
+
77
+
All templates come pre-configured with the necessary setup and dependencies.
67
78
68
-
<!-- To learn more about developing with [Lit](https://lit.dev/), be sure to check out the [Using Lit & TypeScript Guide](./using-lit-typescript.md).-->
79
+
For detailed guidance on using Lit with TypeScript, you can check out our[Using Lit & TypeScript Guide](./using-lit-typescript.md).
69
80
70
81
## Other JavaScript and CSS libraries
71
82
72
-
You should be able to use any other JavaScript or CSS libraries you might want to include in your add-ons (ie: jQuery, Bootstrap) without any issues. Just make sure you include the necessary scripts and stylesheets in your project, and ensure they are bundled correctly by your chosen bundler.
83
+
You can enhance your add-ons with additional JavaScript and CSS libraries like jQuery or Bootstrap. Follow these steps to integrate them:
84
+
85
+
1. Add the library's scripts and stylesheets to your project.
86
+
2. Configure your bundler to process these files.
87
+
3. Import the libraries where needed in your code.
88
+
89
+
<InlineAlertslots="text"variant="info"/>
90
+
91
+
Make sure your chosen bundler is properly configured to handle any additional libraries you include.
0 commit comments