create-outsystems-astro 0.8.2 → 0.10.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/README.md +1 -1
- package/bin/cli.js +62 -1
- package/integrations/.prettierignore +15 -0
- package/integrations/.yarn/releases/yarn-4.15.0.cjs +940 -0
- package/integrations/.yarnrc.yml +6 -0
- package/integrations/bun.lock +1225 -0
- package/integrations/bunfig.toml +3 -0
- package/integrations/deno.json +4 -0
- package/integrations/deno.lock +3896 -0
- package/integrations/eslint.config.mjs +61 -0
- package/integrations/html/client.ts +30 -0
- package/integrations/html/index.ts +57 -0
- package/integrations/html/server.ts +54 -0
- package/integrations/package-lock.json +8898 -0
- package/integrations/package.json +39 -0
- package/integrations/pnpm-lock.yaml +5499 -0
- package/integrations/pnpm-workspace.yaml +4 -0
- package/integrations/tsconfig.json +15 -0
- package/integrations/yarn.lock +6305 -0
- package/package.json +3 -1
- package/template/.github/workflows/bun-test.yml +127 -0
- package/template/.github/workflows/deno-test.yml +127 -0
- package/template/.github/workflows/{test.yml → npm-test.yml} +7 -7
- package/template/.github/workflows/pnpm-test.yml +158 -0
- package/template/.github/workflows/yarn-test.yml +158 -0
- package/template/.gitignore +4 -0
- package/template/.prettierignore +1 -0
- package/template/.yarn/releases/yarn-4.15.0.cjs +940 -0
- package/template/.yarnrc.yml +8 -0
- package/template/AGENTS.md +46 -1
- package/template/README.md +15 -0
- package/template/astro.config.mjs +8 -3
- package/template/bun.lock +580 -966
- package/template/bunfig.toml +3 -0
- package/template/deno.json +3 -19
- package/template/deno.lock +1416 -1548
- package/template/eslint.config.mjs +1 -0
- package/template/package-lock.json +7332 -9398
- package/template/package.json +69 -93
- package/template/patches/@analogjs+astro-angular+2.5.2.patch +26 -0
- package/template/pnpm-lock.yaml +2638 -2683
- package/template/pnpm-workspace.yaml +11 -6
- package/template/src/framework/html/Demo.ts +105 -0
- package/template/src/framework/html/Store.ts +47 -0
- package/template/src/images/html.png +0 -0
- package/template/src/pages/html/html-demo.astro +61 -0
- package/template/src/pages/multi/store.astro +3 -1
- package/template/src/stores/framework.ts +1 -0
- package/template/test/e2e/html/html-demo.spec.ts +36 -0
- package/template/test/integration/html/Demo.test.ts +83 -0
- package/template/tsconfig.json +1 -1
- package/template/vitest.config.ts +9 -0
- package/template/yarn.lock +14730 -10574
- package/template/patches/@analogjs+astro-angular+2.3.1.patch +0 -13
- package/template/patches-deno/playwright+1.58.2.patch +0 -26
- /package/template/patches/{@angular+build+21.2.5.patch → @angular+build+21.2.12.patch} +0 -0
package/template/AGENTS.md
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
- The output generation will be only client side. No server side rendering or server side components will be used.
|
|
7
7
|
- The Astro Islands can be used generated with the following frameworks:
|
|
8
8
|
- Angular - Documentation available at https://analogjs.org/docs/packages/astro-angular/overview
|
|
9
|
+
- HTML - Documentation available at https://hs2323.github.io/create-outsystems-astro/guides/integrations/html/
|
|
9
10
|
- Preact - Documentation available at https://docs.astro.build/en/guides/integrations-guide/preact/
|
|
10
11
|
- React - Documentation available at https://docs.astro.build/en/guides/integrations-guide/react/
|
|
11
12
|
- SolidJS - Documentation available at https://docs.astro.build/en/guides/integrations-guide/solid-js/
|
|
@@ -38,6 +39,7 @@ In OutSystems Developer Cloud, the Islands library is available at https://www.o
|
|
|
38
39
|
- The files in src/pages/\*.astro are used as a starting point and holds the components for generation. They can be tested by running `npm run dev`. That will show what the component looks like as rendered. The sample example pages are broken out by framework name (src/pages/react, src/pages/vue, etc). This page will house the component(s) entry points.
|
|
39
40
|
- When importing a component, the component must have the attribute of the client:only= + the framework name.\
|
|
40
41
|
- Angular: `client:load`
|
|
42
|
+
- HTML: `client:load`
|
|
41
43
|
- Preact: `client:only="preact"`
|
|
42
44
|
- React: `client:only="react"`
|
|
43
45
|
- SolidJS: `client:only="solid-js"`
|
|
@@ -88,6 +90,10 @@ Astro slots can be sent in. A slot can be either the default one or the named on
|
|
|
88
90
|
|
|
89
91
|
Angular does not support the use of slots. Any use of slots with Angular should be discouraged.
|
|
90
92
|
|
|
93
|
+
##### HTML
|
|
94
|
+
|
|
95
|
+
The HTML integration does not support the use of slots. Any use of slots with the HTML integration should be discouraged.
|
|
96
|
+
|
|
91
97
|
##### Preact
|
|
92
98
|
|
|
93
99
|
- In Preact, slots are handled as props. The default slot is the `children` prop. A named slot will have the name of its slot as the parameter. For example, a slot with the following:
|
|
@@ -98,7 +104,7 @@ Angular does not support the use of slots. Any use of slots with Angular should
|
|
|
98
104
|
|
|
99
105
|
will have the parameter named header.
|
|
100
106
|
|
|
101
|
-
- The slots are then rendered using the regular
|
|
107
|
+
- The slots are then rendered using the regular Preact rendering parameter method. With the following Astro component:
|
|
102
108
|
|
|
103
109
|
```js
|
|
104
110
|
---
|
|
@@ -300,6 +306,45 @@ Nano Stores are currently supported for only Preact - https://github.com/nanosto
|
|
|
300
306
|
|
|
301
307
|
In OutSystems, the store will be on the Window object. The Islands component will then have to access it from there.
|
|
302
308
|
|
|
309
|
+
#### HTML
|
|
310
|
+
|
|
311
|
+
```html
|
|
312
|
+
<div class="nanostore-value"></div>
|
|
313
|
+
<script>
|
|
314
|
+
const nanostoreEl = container.querySelector(".nanostore-value");
|
|
315
|
+
|
|
316
|
+
if (!window.Stores) window.Stores = {};
|
|
317
|
+
if (!window.Stores["htmlStore"]) {
|
|
318
|
+
let _value = "Test Value";
|
|
319
|
+
const _subs = [];
|
|
320
|
+
window.Stores["htmlStore"] = {
|
|
321
|
+
get: function () {
|
|
322
|
+
return _value;
|
|
323
|
+
},
|
|
324
|
+
set: function (v) {
|
|
325
|
+
_value = v;
|
|
326
|
+
_subs.forEach(function (fn) {
|
|
327
|
+
fn(v);
|
|
328
|
+
});
|
|
329
|
+
},
|
|
330
|
+
subscribe: function (fn) {
|
|
331
|
+
fn(_value);
|
|
332
|
+
_subs.push(fn);
|
|
333
|
+
return function () {
|
|
334
|
+
_subs.splice(_subs.indexOf(fn), 1);
|
|
335
|
+
};
|
|
336
|
+
},
|
|
337
|
+
};
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
const store = window.Stores["htmlStore"];
|
|
341
|
+
nanostoreEl.textContent = store.get();
|
|
342
|
+
store.subscribe(function (value) {
|
|
343
|
+
nanostoreEl.textContent = value;
|
|
344
|
+
});
|
|
345
|
+
</script>
|
|
346
|
+
```
|
|
347
|
+
|
|
303
348
|
#### Preact
|
|
304
349
|
|
|
305
350
|
```jsx
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# create-outsystems-astro
|
|
2
|
+
|
|
3
|
+
To install dependencies:
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
bun install
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
To run:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
bun run
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
This project was created using `bun init` in bun v1.3.5. [Bun](https://bun.com) is a fast all-in-one JavaScript runtime.
|
|
@@ -6,10 +6,12 @@ import solid from "@astrojs/solid-js";
|
|
|
6
6
|
import svelte from "@astrojs/svelte";
|
|
7
7
|
import vue from "@astrojs/vue";
|
|
8
8
|
import { defineConfig } from "astro/config";
|
|
9
|
+
import html from "islands-integrations/html";
|
|
9
10
|
|
|
10
11
|
// https://astro.build/config
|
|
11
12
|
export default defineConfig({
|
|
12
13
|
build: {
|
|
14
|
+
assets: "assets",
|
|
13
15
|
inlineStylesheets: "always",
|
|
14
16
|
},
|
|
15
17
|
integrations: [
|
|
@@ -20,6 +22,9 @@ export default defineConfig({
|
|
|
20
22
|
},
|
|
21
23
|
},
|
|
22
24
|
}),
|
|
25
|
+
html({
|
|
26
|
+
include: ["src/framework/html/*"],
|
|
27
|
+
}),
|
|
23
28
|
preact({
|
|
24
29
|
compat: true,
|
|
25
30
|
include: ["src/framework/preact/*"],
|
|
@@ -46,9 +51,9 @@ export default defineConfig({
|
|
|
46
51
|
build: {
|
|
47
52
|
rollupOptions: {
|
|
48
53
|
output: {
|
|
49
|
-
assetFileNames: `assets/[name]
|
|
50
|
-
chunkFileNames: `[name]
|
|
51
|
-
entryFileNames: `[name]
|
|
54
|
+
assetFileNames: `assets/[name].[hash].[ext]`,
|
|
55
|
+
chunkFileNames: `[name].[hash].js`,
|
|
56
|
+
entryFileNames: `[name].[hash].js`,
|
|
52
57
|
manualChunks: (id) => {
|
|
53
58
|
if (id.includes("node_modules")) {
|
|
54
59
|
return "app";
|