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
const isProduction = () =>false; // equivelent would be injected/definied server-side by your framework
108
131
AlpineComponents.bootstrap({
132
+
components: {
133
+
//
134
+
},
109
135
logErrors: !isProduction()
110
136
}, myAlpine);
111
137
@@ -122,13 +148,13 @@ This package is designed to be easily integrated into existing projects. You can
122
148
migrating complex, logic heavy components into classes without worrying about the simple stuff
123
149
that makes Alpine so powerful.
124
150
125
-
Take a look at the provided example project [here.](./examples/project)
151
+
Take a look at the provided example project [here.](https://github.com/NxtLvLSoftware/alpine-typescript/blob/dev/examples/project)
126
152
127
153
##### Project Setup
128
-
You'll want to start by [installing](#installation) the package then add these lines to your
154
+
You'll want to start by [installing](https://github.com/NxtLvLSoftware/alpine-typescript/blob/dev/README.md#installation) the package then add these lines to your
@@ -174,10 +200,10 @@ You can now use the component in your HTML with `x-data="myComponent('Hello Worl
174
200
#### In Packages
175
201
The main purpose of this package is to easily distribute components in their own package.
176
202
177
-
Take a look at the provided example components package [here.](./examples/package)
203
+
Take a look at the provided example components package [here.](https://github.com/NxtLvLSoftware/alpine-typescript/blob/dev/examples/package)
178
204
179
205
##### Package Setup
180
-
The easiest way to start distributing your components is to copy everything from the [package example](./examples/package)
206
+
The easiest way to start distributing your components is to copy everything from the [package example](https://github.com/NxtLvLSoftware/alpine-typescript/blob/dev/examples/package)
181
207
directory and start writing your components.
182
208
183
209
Manual setup requires a project with `typescript` installed to compile the code to javascript:
Will be accepted as a component constructor. The [signature](./src/Store.ts#L101) for registering components of this type is:
353
+
Will be accepted as a component constructor. The [signature](https://github.com/NxtLvLSoftware/alpine-typescript/blob/dev/src/Store.ts#L101) for registering components of this type is:
329
354
```typescript
330
355
/**
331
356
* Register a generic object (alpine data) as a component.
@@ -364,16 +389,21 @@ Or by listening for the `alpine-components:init` on the `document` global:
The component parameters prototype is checked for inheritance from the [AlpineComponent](./src/Component#L45)
428
+
The component parameters prototype is checked for inheritance from the [AlpineComponent](https://github.com/NxtLvLSoftware/alpine-typescript/blob/dev/src/Component#L45)
399
429
class and handled accordingly.
400
430
401
431
#### Using Components
@@ -417,21 +447,20 @@ Here's the contrived `dropdown` example re-written to use a class:
0 commit comments