@jahia/create-module 0.0.3 → 0.0.5
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/.yarn/releases/{yarn-4.4.0.cjs → yarn-4.5.0.cjs} +224 -224
- package/.yarnrc.yml +1 -1
- package/README.md +9 -4
- package/index.js +68 -88
- package/package.json +5 -8
- package/template/.babelrc +9 -0
- package/{jsx → template}/doteslintrc.cjs +1 -0
- package/{handlebars → template}/dotgitignore +3 -0
- package/{jsx → template}/dotnpmignore +1 -1
- package/{jsx → template}/package.json +4 -4
- package/template/settings/README.md +30 -0
- package/template/settings/content-types-icons/MODULE_NAMESPACE_simpleContent.png +0 -0
- package/{jsx → template/settings}/definitions.cnd +2 -2
- package/template/settings/resources/MODULE_NAME.properties +3 -0
- package/template/settings/resources/MODULE_NAME_fr.properties +3 -0
- package/template/settings/template-thumbnail.png +0 -0
- package/{jsx → template}/src/client/index.jsx +1 -1
- package/template/src/server/templates/page/PageHome.jsx +31 -0
- package/template/src/server/views/index.js +1 -0
- package/template/src/server/views/simpleContent/SimpleContentDefault.jsx +19 -0
- package/template/src/server/views/simpleContent/index.js +1 -0
- package/{jsx → template}/webpack.config.js +4 -1
- package/babel.config.cjs.disabled +0 -3
- package/handlebars/components/MODULE_NAMESPACE/hello/hello.cnd +0 -6
- package/handlebars/components/MODULE_NAMESPACE/hello/hello.default.hbs +0 -1
- package/handlebars/components/MODULE_NAMESPACE/hello/hello.icon.png +0 -0
- package/handlebars/components/jnt/page/page.home.hbs +0 -18
- package/handlebars/components/jnt/page/page.home.png +0 -0
- package/handlebars/components/jnt/page/page.home.properties +0 -2
- package/handlebars/definitions.cnd +0 -8
- package/handlebars/dotenv +0 -4
- package/handlebars/doteslintrc.cjs +0 -29
- package/handlebars/dotnpmignore +0 -4
- package/handlebars/import.xml +0 -8
- package/handlebars/locales/de.json +0 -3
- package/handlebars/locales/en.json +0 -3
- package/handlebars/locales/fr.json +0 -3
- package/handlebars/package.json +0 -42
- package/handlebars/resources/MODULE_NAME.properties +0 -2
- package/handlebars/resources/MODULE_NAME_fr.properties +0 -2
- package/handlebars/settings/README.txt +0 -9
- package/handlebars/src/index.js +0 -0
- package/handlebars/webpack.config.js +0 -67
- package/jsx/.yarn/releases/yarn-4.3.1.cjs +0 -894
- package/jsx/.yarnrc.yml +0 -3
- package/jsx/README.md +0 -31
- package/jsx/dotgitignore +0 -18
- package/jsx/resources/MODULE_NAME.properties +0 -3
- package/jsx/resources/MODULE_NAME_fr.properties +0 -3
- package/jsx/settings/README.txt +0 -9
- package/jsx/src/server/templates/page/PageHome.jsx +0 -27
- package/jsx/src/server/views/hello/HelloDefault.jsx +0 -19
- package/jsx/src/server/views/hello/index.js +0 -1
- package/jsx/src/server/views/index.js +0 -1
- package/jsx/yarn.lock +0 -0
- /package/{handlebars → template}/.yarn/releases/yarn-4.3.1.cjs +0 -0
- /package/{handlebars → template}/.yarnrc.yml +0 -0
- /package/{handlebars → template}/README.md +0 -0
- /package/{jsx → template}/css/styles.css +0 -0
- /package/{jsx → template}/dotenv +0 -0
- /package/{jsx → template/settings}/import.xml +0 -0
- /package/{jsx → template/settings}/locales/de.json +0 -0
- /package/{jsx → template/settings}/locales/en.json +0 -0
- /package/{jsx → template/settings}/locales/fr.json +0 -0
- /package/{jsx → template}/src/server/components/index.js +0 -0
- /package/{jsx → template}/src/server/index.js +0 -0
- /package/{jsx → template}/src/server/templates/index.js +0 -0
- /package/{jsx → template}/src/server/templates/page/index.js +0 -0
- /package/{handlebars → template}/yarn.lock +0 -0
package/jsx/.yarnrc.yml
DELETED
package/jsx/README.md
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
# $$MODULE_NAME$$
|
|
2
|
-
|
|
3
|
-
A simple Jahia NPM module created using the NPM module starter project template
|
|
4
|
-
|
|
5
|
-
## Configuration
|
|
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
|
-
## Run
|
|
14
|
-
|
|
15
|
-
1) Enable Corepack if needed :
|
|
16
|
-
|
|
17
|
-
`enable corepack`
|
|
18
|
-
|
|
19
|
-
2) Install the dependencies :
|
|
20
|
-
|
|
21
|
-
``yarn``
|
|
22
|
-
|
|
23
|
-
3) Build and run the project :
|
|
24
|
-
|
|
25
|
-
``yarn watch``
|
|
26
|
-
|
|
27
|
-
## How to upgrade yarn version to latest stable
|
|
28
|
-
|
|
29
|
-
This command will upgrade yarn to the latest stable release and update the yarn installer in .yarn/releases
|
|
30
|
-
|
|
31
|
-
``yarn set version stable``
|
package/jsx/dotgitignore
DELETED
package/jsx/settings/README.txt
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
In this directory you can put directly :
|
|
2
|
-
- Rule files (*.drl, *.dsl)
|
|
3
|
-
- URL rewrite XML files
|
|
4
|
-
|
|
5
|
-
In the configurations directory you can put :
|
|
6
|
-
- OSGi configuration files (*.cfg, *.yml)
|
|
7
|
-
|
|
8
|
-
In the jahia-content-editor-forms you can put content editor form and field set overrides,
|
|
9
|
-
see examples here : https://academy.jahia.com/documentation/jahia/jahia-8/developer/extending-and-customizing-jahia-ui/customizing-content-editor-forms/examples-of-content-definition-json-overrides
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import {Area, AddResources, defineJahiaComponent} from '@jahia/js-server-core';
|
|
3
|
-
import {useTranslation} from 'react-i18next';
|
|
4
|
-
|
|
5
|
-
export const PageHome = () => {
|
|
6
|
-
const {t} = useTranslation();
|
|
7
|
-
return (<>
|
|
8
|
-
<head>
|
|
9
|
-
<AddResources type='css' resources='styles.css' />
|
|
10
|
-
<title>Home</title>
|
|
11
|
-
</head>
|
|
12
|
-
<body>
|
|
13
|
-
{/* Using i18next defined in locales */}
|
|
14
|
-
<h1>{t('homeTitle')}</h1>
|
|
15
|
-
<main>
|
|
16
|
-
<Area name="pagecontent" />
|
|
17
|
-
</main>
|
|
18
|
-
</body>
|
|
19
|
-
</>);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
PageHome.jahiaComponent = defineJahiaComponent({
|
|
23
|
-
nodeType: 'jnt:page',
|
|
24
|
-
name: 'home',
|
|
25
|
-
displayName: 'Home page',
|
|
26
|
-
componentType: 'template'
|
|
27
|
-
});
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import {useServerContext, getNodeProps, defineJahiaComponent} from '@jahia/js-server-core'
|
|
3
|
-
|
|
4
|
-
export const HelloDefault = () => {
|
|
5
|
-
const { currentNode } = useServerContext();
|
|
6
|
-
const props = getNodeProps(currentNode, ['textHello']);
|
|
7
|
-
return (
|
|
8
|
-
<div>
|
|
9
|
-
<h2>{props.textHello}</h2>
|
|
10
|
-
</div>
|
|
11
|
-
)
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
HelloDefault.jahiaComponent = defineJahiaComponent({
|
|
15
|
-
name: 'default',
|
|
16
|
-
nodeType: '$$MODULE_NAMESPACE$$:hello',
|
|
17
|
-
displayName: 'Hello (default)',
|
|
18
|
-
componentType: 'view'
|
|
19
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './HelloDefault';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './hello';
|
package/jsx/yarn.lock
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/{jsx → template}/dotenv
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|