@jahia/create-module 0.5.6 → 0.6.1
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 +9 -10
- package/index.js +2 -2
- package/package.json +2 -2
- package/template/README.md +17 -32
- package/template/settings/content-types-icons/$MODULE_helloCard.png +0 -0
- package/template/settings/content-types-icons/$MODULE_helloWorld.png +0 -0
- package/template/settings/content-types-icons/$MODULE_languageSwitcher.png +0 -0
- package/template/settings/definitions.cnd +4 -2
- package/template/settings/import.xml +5 -5
- package/template/settings/resources/$MODULE.properties +11 -11
- package/template/settings/resources/$MODULE_fr.properties +11 -11
- package/template/src/components/HelloCard/default.server.tsx +3 -4
- package/template/src/components/HelloCard/definition.cnd +1 -1
- package/template/src/components/HelloWorld/component.module.css +2 -1
- package/template/src/components/HelloWorld/default.server.tsx +7 -16
- package/template/src/components/HelloWorld/definition.cnd +2 -2
- package/template/src/components/LanguageSwitcher/default.server.tsx +7 -15
- package/template/src/components/LanguageSwitcher/definition.cnd +1 -1
- package/template/src/{pages → templates}/Layout.tsx +6 -6
- package/template/src/templates/MainResource/default.server.tsx +15 -0
- package/template/src/{pages → templates/Page}/basic.server.tsx +2 -2
- package/template/src/{pages → templates}/global.css +1 -0
- package/template/vite.config.mjs +1 -1
- /package/template/static/arrows/{bottom.svg → down.svg} +0 -0
package/README.md
CHANGED
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @jahia/create-module
|
|
2
2
|
|
|
3
|
-
This
|
|
3
|
+
This CLI scaffolds a new Jahia JavaScript module.
|
|
4
4
|
|
|
5
5
|
## Usage
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
To create a new module, run:
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
```
|
|
10
|
+
npm init @jahia/module@latest <module-name>
|
|
11
|
+
```
|
|
10
12
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
- `module`: Standard Jahia module. This is the default value.
|
|
15
|
-
- `system`: Critical module for the whole platform.
|
|
16
|
-
- `namespace-definitions` (optional) The namespace used for content definitions. Default is the project name in camel case.
|
|
13
|
+
It creates a new JavaScript Module in a directory named `module-name` in the current working directory.
|
|
14
|
+
|
|
15
|
+
See the [Getting Started guide](https://github.com/Jahia/javascript-modules/tree/main/docs/1-getting-started/1-dev-environment#create-a-new-project) for more information.
|
package/index.js
CHANGED
|
@@ -26,7 +26,7 @@ Upgrade guide: ${styleText("underline", "https://nodejs.org/en/download")}
|
|
|
26
26
|
console.error(
|
|
27
27
|
`No module name provided.
|
|
28
28
|
|
|
29
|
-
Usage: npm init @jahia/module ${styleText("blueBright", "<module-name>")}
|
|
29
|
+
Usage: npm init @jahia/module@latest ${styleText("blueBright", "<module-name>")}
|
|
30
30
|
|
|
31
31
|
It will create a new module at this location with the provided name:
|
|
32
32
|
|
|
@@ -82,7 +82,7 @@ Next steps:
|
|
|
82
82
|
"# Commit all files",
|
|
83
83
|
)}
|
|
84
84
|
${styleText("magentaBright", "code .")} ${styleText("dim", "# Open the project in VSCode")}
|
|
85
|
-
${styleText("magentaBright", "yarn dev")} ${styleText("dim", "#
|
|
85
|
+
${styleText("magentaBright", "yarn build && yarn dev")} ${styleText("dim", "# Build and start the dev mode")}
|
|
86
86
|
`);
|
|
87
87
|
} catch (error) {
|
|
88
88
|
console.error(
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jahia/create-module",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.1",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"template"
|
|
6
6
|
],
|
|
7
|
-
"homepage": "https://github.com/Jahia/javascript-modules/javascript-create-module",
|
|
7
|
+
"homepage": "https://github.com/Jahia/javascript-modules/tree/main/javascript-create-module#readme",
|
|
8
8
|
"bugs": {
|
|
9
9
|
"url": "https://github.com/Jahia/javascript-modules/issues"
|
|
10
10
|
},
|
package/template/README.md
CHANGED
|
@@ -1,39 +1,24 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Welcome!
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Your JavaScript module was successfully created. If this is your first time creating a module, you may want to consult the [Getting Started guide](https://github.com/Jahia/javascript-modules/tree/main/docs/1-getting-started/1-dev-environment#create-a-new-project).
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
If you don't use default configuration for the Docker container name or for Jahia deployments, please modify the provided `.env` file
|
|
8
|
-
|
|
9
|
-
## Documentation
|
|
10
|
-
|
|
11
|
-
You can find the documentation on how to use this module on the [Jahia Academy](https://academy.jahia.com/get-started/developers/templating) templating tutorial.
|
|
12
|
-
|
|
13
|
-
## Prerequisites
|
|
14
|
-
|
|
15
|
-
Yarn is required to build the project.
|
|
5
|
+
This README assumes you have a working development environment with Node.js, Yarn and Docker installed and configured. Please refer to the [Getting Started](https://github.com/Jahia/javascript-modules/tree/main/docs/1-getting-started/1-dev-environment#pre-requisites) guide if you need help setting up your environment.
|
|
16
6
|
|
|
17
|
-
|
|
7
|
+
## Scripts
|
|
18
8
|
|
|
19
|
-
|
|
9
|
+
This module comes with some scripts to help you develop your module. You can run them with `yarn <script>`:
|
|
20
10
|
|
|
21
|
-
|
|
11
|
+
| Category | Script | Description |
|
|
12
|
+
| ------------ | --------------------- | ----------------------------------------------------------------------- |
|
|
13
|
+
| Build | `build` | Produces a deployable artifact that can be uploaded to a Jahia instance |
|
|
14
|
+
| Build | `deploy` | Pushes the build artifact to a Jahia instance |
|
|
15
|
+
| Development | `dev` (alias `watch`) | Watches for changes and rebuilds the module |
|
|
16
|
+
| Code quality | `format` | Runs Prettier (a code formatter) on your code |
|
|
17
|
+
| Code quality | `lint` | Runs ESLint (a linter) on your code |
|
|
18
|
+
| Utils | `clean` | Removes build artifacts |
|
|
19
|
+
| Utils | `package` | Packs distributions files in a `.tgz` archive inside the `dist/` folder |
|
|
20
|
+
| Utils | `watch:callback` | Called every time a build succeeds in watch mode |
|
|
22
21
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
```
|
|
26
|
-
yarn build
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
2. To deploy the generated package to your Jahia instance (configured in your [`.env`](.env)):
|
|
30
|
-
|
|
31
|
-
```
|
|
32
|
-
yarn deploy
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
3. Alternatively, to deploy during development using watch mode:
|
|
22
|
+
## Configuration
|
|
36
23
|
|
|
37
|
-
|
|
38
|
-
yarn watch
|
|
39
|
-
```
|
|
24
|
+
If you don't use default configuration for the Docker container name or for Jahia deployments, please modify the provided `.env` file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
<jnt = 'http://www.jahia.org/jahia/nt/1.0'>
|
|
2
2
|
<jmix = 'http://www.jahia.org/jahia/mix/1.0'>
|
|
3
3
|
<$MODULE = 'https://example.com/$MODULE/1.0'>
|
|
4
|
+
<$MODULEmix = 'https://example.com/$MODULEmix/1.0'>
|
|
4
5
|
|
|
5
6
|
// Defining the content types is similar to defining a data model: once deployed, you cannot change the type of a property.
|
|
6
7
|
// If you need to do changes during the development phase, it is possible to remove the definitions from the tools:
|
|
7
8
|
// http://localhost:8080/cms/login?redirect=/modules/tools/definitionsBrowser.jsp however that will remove content created with this type.
|
|
8
|
-
// Learn more about content types definitions here:
|
|
9
|
+
// Learn more about content types definitions here:
|
|
10
|
+
// https://github.com/Jahia/javascript-modules/tree/main/docs/3-reference/1-cnd-format/
|
|
9
11
|
|
|
10
12
|
// This mixin creates a category to regroup types in the content type selector UI. Apply it to any definition you want
|
|
11
13
|
// to see in this category.
|
|
12
|
-
[$
|
|
14
|
+
[$MODULEmix:component] > jmix:droppableContent, jmix:accessControllableContent mixin
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
jcr:mixinTypes="jmix:isAreaList"
|
|
27
27
|
jcr:primaryType="jnt:contentList"
|
|
28
28
|
>
|
|
29
|
-
<hello-world jcr:primaryType="$MODULE:
|
|
29
|
+
<hello-world jcr:primaryType="$MODULE:helloWorld">
|
|
30
30
|
<j:translation_en
|
|
31
31
|
jcr:language="en"
|
|
32
32
|
jcr:primaryType="jnt:translation"
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
name="le monde"
|
|
39
39
|
/>
|
|
40
40
|
<read-the-documentation
|
|
41
|
-
jcr:primaryType="$MODULE:
|
|
41
|
+
jcr:primaryType="$MODULE:helloCard"
|
|
42
42
|
illustration="read"
|
|
43
43
|
>
|
|
44
44
|
<j:translation_en
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
/>
|
|
54
54
|
</read-the-documentation>
|
|
55
55
|
<code-a-new-component
|
|
56
|
-
jcr:primaryType="$MODULE:
|
|
56
|
+
jcr:primaryType="$MODULE:helloCard"
|
|
57
57
|
illustration="code"
|
|
58
58
|
>
|
|
59
59
|
<j:translation_en
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
/>
|
|
69
69
|
</code-a-new-component>
|
|
70
70
|
<explore-the-interface
|
|
71
|
-
jcr:primaryType="$MODULE:
|
|
71
|
+
jcr:primaryType="$MODULE:helloCard"
|
|
72
72
|
illustration="interface"
|
|
73
73
|
>
|
|
74
74
|
<j:translation_en
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
/>
|
|
84
84
|
</explore-the-interface>
|
|
85
85
|
<create-content
|
|
86
|
-
jcr:primaryType="$MODULE:
|
|
86
|
+
jcr:primaryType="$MODULE:helloCard"
|
|
87
87
|
illustration="write"
|
|
88
88
|
>
|
|
89
89
|
<j:translation_en
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
$MODULE_component=$MODULE - Components
|
|
2
2
|
|
|
3
|
-
$
|
|
4
|
-
$
|
|
3
|
+
$MODULE_helloWorld=Hello World
|
|
4
|
+
$MODULE_helloWorld.name=Name
|
|
5
5
|
|
|
6
|
-
$
|
|
7
|
-
$
|
|
8
|
-
$
|
|
9
|
-
$
|
|
10
|
-
$
|
|
11
|
-
$
|
|
12
|
-
$
|
|
13
|
-
$
|
|
6
|
+
$MODULE_helloCard=Hello Card
|
|
7
|
+
$MODULE_helloCard.title=Title
|
|
8
|
+
$MODULE_helloCard.illustration=Illustration
|
|
9
|
+
$MODULE_helloCard.illustration.code=A developer coding
|
|
10
|
+
$MODULE_helloCard.illustration.coffee=Buying coffee
|
|
11
|
+
$MODULE_helloCard.illustration.interface=Consulting an interface
|
|
12
|
+
$MODULE_helloCard.illustration.read=Looking at a bookshelf
|
|
13
|
+
$MODULE_helloCard.illustration.write=Writing with a typewriter
|
|
14
14
|
|
|
15
|
-
$
|
|
15
|
+
$MODULE_languageSwitcher=Language Switcher
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
$MODULE_component=$MODULE - Composants
|
|
2
2
|
|
|
3
|
-
$
|
|
4
|
-
$
|
|
3
|
+
$MODULE_helloWorld=Bienvenue
|
|
4
|
+
$MODULE_helloWorld.name=Nom
|
|
5
5
|
|
|
6
|
-
$
|
|
7
|
-
$
|
|
8
|
-
$
|
|
9
|
-
$
|
|
10
|
-
$
|
|
11
|
-
$
|
|
12
|
-
$
|
|
13
|
-
$
|
|
6
|
+
$MODULE_helloCard=Carte de bienvenue
|
|
7
|
+
$MODULE_helloCard.title=Titre
|
|
8
|
+
$MODULE_helloCard.illustration=Illustration
|
|
9
|
+
$MODULE_helloCard.illustration.code=Un développeur qui code
|
|
10
|
+
$MODULE_helloCard.illustration.coffee=Acheter un café
|
|
11
|
+
$MODULE_helloCard.illustration.interface=Observer une interface
|
|
12
|
+
$MODULE_helloCard.illustration.read=Consulter une bibliothèque
|
|
13
|
+
$MODULE_helloCard.illustration.write=Écrire avec une machine à écrire
|
|
14
14
|
|
|
15
|
-
$
|
|
15
|
+
$MODULE_languageSwitcher=Changeur de langue
|
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { buildModuleFileUrl, jahiaComponent } from "@jahia/javascript-modules-library";
|
|
2
2
|
import classes from "./component.module.css";
|
|
3
3
|
|
|
4
4
|
jahiaComponent(
|
|
5
5
|
{
|
|
6
|
-
nodeType: "$MODULE:
|
|
6
|
+
nodeType: "$MODULE:helloCard",
|
|
7
7
|
componentType: "view",
|
|
8
8
|
},
|
|
9
9
|
({ illustration, title }: { illustration: string; title: string }) => {
|
|
10
|
-
const { buildStaticUrl } = useUrlBuilder();
|
|
11
10
|
return (
|
|
12
11
|
<article className={classes.card}>
|
|
13
|
-
<img src={
|
|
12
|
+
<img src={buildModuleFileUrl(`static/illustrations/${illustration}.svg`)} alt="" />
|
|
14
13
|
<p>{title}</p>
|
|
15
14
|
</article>
|
|
16
15
|
);
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
|
-
AddContentButtons,
|
|
3
2
|
HydrateInBrowser,
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
RenderChildren,
|
|
4
|
+
buildModuleFileUrl,
|
|
6
5
|
jahiaComponent,
|
|
7
|
-
useUrlBuilder,
|
|
8
6
|
} from "@jahia/javascript-modules-library";
|
|
9
7
|
import { t } from "i18next";
|
|
10
8
|
import { Trans } from "react-i18next";
|
|
@@ -13,12 +11,11 @@ import classes from "./component.module.css";
|
|
|
13
11
|
|
|
14
12
|
jahiaComponent(
|
|
15
13
|
{
|
|
16
|
-
nodeType: "$MODULE:
|
|
14
|
+
nodeType: "$MODULE:helloWorld",
|
|
17
15
|
displayName: "Hello World Component",
|
|
18
16
|
componentType: "view",
|
|
19
17
|
},
|
|
20
|
-
({ name }: { name: string }, { renderContext
|
|
21
|
-
const { buildStaticUrl } = useUrlBuilder();
|
|
18
|
+
({ name }: { name: string }, { renderContext }) => {
|
|
22
19
|
return (
|
|
23
20
|
<>
|
|
24
21
|
<section className={classes.section}>
|
|
@@ -33,7 +30,7 @@ jahiaComponent(
|
|
|
33
30
|
{renderContext.isEditMode() && (
|
|
34
31
|
<div className={classes.hint} style={{ alignItems: "center" }}>
|
|
35
32
|
<img
|
|
36
|
-
src={
|
|
33
|
+
src={buildModuleFileUrl("static/arrows/left.svg")}
|
|
37
34
|
alt="←"
|
|
38
35
|
width="80"
|
|
39
36
|
height="16"
|
|
@@ -44,13 +41,7 @@ jahiaComponent(
|
|
|
44
41
|
</header>
|
|
45
42
|
<p>{t("7l9zetMbU4cKpL4NxSOtL")}</p>
|
|
46
43
|
<div className={classes.grid}>
|
|
47
|
-
|
|
48
|
-
(node) => (
|
|
49
|
-
// @ts-expect-error Fix the types
|
|
50
|
-
<Render key={node.getIdentifier()} node={node} />
|
|
51
|
-
),
|
|
52
|
-
)}
|
|
53
|
-
<AddContentButtons />
|
|
44
|
+
<RenderChildren />
|
|
54
45
|
</div>
|
|
55
46
|
|
|
56
47
|
<p className={classes.attribution}>
|
|
@@ -71,7 +62,7 @@ jahiaComponent(
|
|
|
71
62
|
{renderContext.isEditMode() && (
|
|
72
63
|
<div className={classes.hint} style={{ marginLeft: "calc(50% - 0.5rem)" }}>
|
|
73
64
|
<img
|
|
74
|
-
src={
|
|
65
|
+
src={buildModuleFileUrl("static/arrows/down.svg")}
|
|
75
66
|
alt="↓"
|
|
76
67
|
width="70"
|
|
77
68
|
height="100"
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
[$MODULE:
|
|
1
|
+
[$MODULE:helloWorld] > jnt:content, $MODULEmix:component orderable
|
|
2
2
|
- name (string) i18n mandatory
|
|
3
|
-
+ * ($MODULE:
|
|
3
|
+
+ * ($MODULE:helloCard) = $MODULE:helloCard
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { buildNodeUrl, getSiteLocales, jahiaComponent } from "@jahia/javascript-modules-library";
|
|
2
2
|
import { t } from "i18next";
|
|
3
3
|
import { Fragment } from "react";
|
|
4
4
|
import classes from "./component.module.css";
|
|
@@ -6,26 +6,18 @@ import classes from "./component.module.css";
|
|
|
6
6
|
jahiaComponent(
|
|
7
7
|
{
|
|
8
8
|
componentType: "view",
|
|
9
|
-
nodeType: "$MODULE:
|
|
9
|
+
nodeType: "$MODULE:languageSwitcher",
|
|
10
10
|
displayName: "Language Switcher",
|
|
11
11
|
// Disable cache for this component
|
|
12
12
|
properties: { "cache.timeout": "0" },
|
|
13
13
|
},
|
|
14
|
-
(_, {
|
|
15
|
-
const
|
|
16
|
-
? renderContext.getSite().getActiveLiveLanguagesAsLocales()
|
|
17
|
-
: renderContext.getSite().getLanguagesAsLocales();
|
|
18
|
-
const currentLanguage = currentResource.getLocale().getLanguage();
|
|
14
|
+
(_, { mainNode, currentResource }) => {
|
|
15
|
+
const currentLanguage = currentResource.getLocale().toString();
|
|
19
16
|
return (
|
|
20
17
|
<p style={{ textAlign: "center" }}>
|
|
21
18
|
{t("JI87mYV8J5pAEST4RIUcb")}{" "}
|
|
22
|
-
{
|
|
23
|
-
const
|
|
24
|
-
const href = buildUrl(
|
|
25
|
-
{ path: mainNode.getPath(), language },
|
|
26
|
-
renderContext,
|
|
27
|
-
currentResource,
|
|
28
|
-
);
|
|
19
|
+
{Object.entries(getSiteLocales()).map(([language, locale], i, { length }) => {
|
|
20
|
+
const href = buildNodeUrl(mainNode, { language });
|
|
29
21
|
return (
|
|
30
22
|
<Fragment key={language}>
|
|
31
23
|
<a
|
|
@@ -35,7 +27,7 @@ jahiaComponent(
|
|
|
35
27
|
>
|
|
36
28
|
{locale.getDisplayLanguage(locale)}
|
|
37
29
|
</a>
|
|
38
|
-
{i <
|
|
30
|
+
{i < length - 1 && " • "}
|
|
39
31
|
</Fragment>
|
|
40
32
|
);
|
|
41
33
|
})}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[$MODULE:
|
|
1
|
+
[$MODULE:languageSwitcher] > jnt:content, $MODULEmix:component
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
AddResources,
|
|
3
|
+
buildModuleFileUrl,
|
|
4
|
+
useServerContext,
|
|
5
|
+
} from "@jahia/javascript-modules-library";
|
|
2
6
|
import type { ReactNode } from "react";
|
|
3
7
|
|
|
4
8
|
import "modern-normalize/modern-normalize.css";
|
|
@@ -6,16 +10,12 @@ import "./global.css";
|
|
|
6
10
|
|
|
7
11
|
/** Places `children` in an html page. */
|
|
8
12
|
export const Layout = ({ title, children }: { title: string; children: ReactNode }) => {
|
|
9
|
-
const { buildStaticUrl } = useUrlBuilder();
|
|
10
13
|
const { currentResource } = useServerContext();
|
|
11
14
|
const lang = currentResource.getLocale().getLanguage();
|
|
12
15
|
return (
|
|
13
16
|
<html lang={lang}>
|
|
14
17
|
<head>
|
|
15
|
-
<AddResources
|
|
16
|
-
type="css"
|
|
17
|
-
resources={buildStaticUrl({ assetPath: "../dist/server/style.css" })}
|
|
18
|
-
/>
|
|
18
|
+
<AddResources type="css" resources={buildModuleFileUrl("dist/server/style.css")} />
|
|
19
19
|
<title>{title}</title>
|
|
20
20
|
</head>
|
|
21
21
|
<body>{children}</body>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jahiaComponent, Render } from "@jahia/javascript-modules-library";
|
|
2
|
+
import { Layout } from "../Layout.jsx";
|
|
3
|
+
|
|
4
|
+
jahiaComponent(
|
|
5
|
+
{
|
|
6
|
+
componentType: "template",
|
|
7
|
+
nodeType: "jmix:mainResource",
|
|
8
|
+
priority: -1, // allow to overwrite this template by defining a component with a higher priority. When not specified, the default priority is 0
|
|
9
|
+
},
|
|
10
|
+
({ "jcr:title": title }, { currentNode }) => (
|
|
11
|
+
<Layout title={title}>
|
|
12
|
+
<Render node={currentNode} view="fullPage" />
|
|
13
|
+
</Layout>
|
|
14
|
+
),
|
|
15
|
+
);
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { Area, jahiaComponent } from "@jahia/javascript-modules-library";
|
|
2
|
-
import { Layout } from "
|
|
2
|
+
import { Layout } from "../Layout.jsx";
|
|
3
3
|
|
|
4
4
|
jahiaComponent(
|
|
5
5
|
{
|
|
6
|
+
componentType: "template",
|
|
6
7
|
nodeType: "jnt:page",
|
|
7
8
|
name: "basic",
|
|
8
9
|
displayName: "Basic page",
|
|
9
|
-
componentType: "template",
|
|
10
10
|
},
|
|
11
11
|
({ "jcr:title": title }) => (
|
|
12
12
|
<Layout title={title}>
|
package/template/vite.config.mjs
CHANGED
|
@@ -22,7 +22,7 @@ export default defineConfig({
|
|
|
22
22
|
},
|
|
23
23
|
// This function is called every time a build succeeds in watch mode
|
|
24
24
|
watchCallback() {
|
|
25
|
-
spawnSync("yarn", ["watch:callback"], { stdio: "inherit" });
|
|
25
|
+
spawnSync("yarn", ["watch:callback"], { stdio: "inherit", shell: true });
|
|
26
26
|
},
|
|
27
27
|
}),
|
|
28
28
|
],
|
|
File without changes
|