|
4 | 4 |
|
5 | 5 | [](https://www.npmjs.com/package/solid-create-script) [](https://github.com/thedanchez/solid-create-script/actions/workflows/ci.yaml) [](https://bun.sh/) |
6 | 6 |
|
7 | | -# solid-create-script |
| 7 | +# @dschz/solid-create-script |
8 | 8 |
|
9 | 9 | Utility function to dynamically load external scripts in both declarative and imperative styles within SolidJS. |
10 | 10 |
|
11 | 11 | ## Installation |
12 | 12 |
|
13 | 13 | ```bash |
14 | | -npm install solid-js solid-create-script |
15 | | -pnpm add solid-js solid-create-script |
16 | | -yarn add solid-js solid-create-script |
17 | | -bun add solid-js solid-create-script |
| 14 | +npm install solid-js @dschz/solid-create-script |
| 15 | +pnpm add solid-js @dschz/solid-create-script |
| 16 | +yarn add solid-js @dschz/solid-create-script |
| 17 | +bun add solid-js @dschz/solid-create-script |
18 | 18 | ``` |
19 | 19 |
|
20 | 20 | ## Summary |
21 | 21 |
|
22 | 22 | This library exports two APIs: `createScript` and `loadScript`. |
23 | 23 |
|
24 | 24 | ```ts |
25 | | -import { createScript, loadScript } from "solid-create-script"; |
| 25 | +import { createScript, loadScript } from "@dschz/solid-create-script"; |
26 | 26 | ``` |
27 | 27 |
|
28 | 28 | ## API Breakdown |
@@ -51,7 +51,7 @@ It is useful for: |
51 | 51 |
|
52 | 52 | ```ts |
53 | 53 | import { Switch, Match } from "solid-js" |
54 | | -import { createScript } from "solid-create-script" |
| 54 | +import { createScript } from "@dschz/solid-create-script" |
55 | 55 |
|
56 | 56 | const CustomComponent = () => { |
57 | 57 | const script = createScript("https://example.com/library.js", { async: true }); |
@@ -94,7 +94,7 @@ Useful for: |
94 | 94 |
|
95 | 95 | ```ts |
96 | 96 | import { Switch, Match, onMount } from "solid-js" |
97 | | -import { loadScript } from "solid-create-script" |
| 97 | +import { loadScript } from "@dschz/solid-create-script" |
98 | 98 |
|
99 | 99 | const CustomComponent = () => { |
100 | 100 | let containerRef!: HTMLElement; |
|
0 commit comments