A jsp artefact exporter. For detailed configuration see the Configuration section below.
configuration.commands.push(
{
type: require('entoj-export-jsp').command.JspExportCommand
});
// Full featured Example
configuration.settings =
{
jsp:
{
exportPath: '${cache}/export',
jspBasePath: 'includes',
jspBaseUrl: '/includes',
assetBaseUrl: '/assets/base',
svgBaseUrl: '/assets/base/icons',
svgBasePath: '/base/global/assets/icons',
viewHelperUri: 'http://foo.com/bar',
viewHelperNamespace: 'bar'
}
};
// Full featured Example
configuration.build.environments.staging =
{
jsp:
{
exportPath: '${cache}/export',
jspBasePath: 'includes',
jspBaseUrl: '/includes',
assetBaseUrl: '/assets/base',
svgBaseUrl: '/assets/base/icons',
svgBasePath: '/base/global/assets/icons',
viewHelperUri: 'http://foo.com/bar',
viewHelperNamespace: 'bar'
}
};
- Type:
String
- Global: Yes
- Environment: Yes
- Default:
${cache}/${configurationName}/export
The base path used to store exported artefacts. Standard directories may be used as variables.
- Type:
String
- Global: Yes
- Environment: Yes
- Default:
includes
The base path used to store exported jsp artefacts. This is relative to jsp.exportPath.
- Type:
String
- Global: Yes
- Environment: Yes
- Default:
/includes
The base url used to include jsp artefacts.
- Type:
String
- Global: Yes
- Environment: Yes
- Default: ``
Used as the base url for rendering |imageUrl filters
- Type:
String
- Global: Yes
- Environment: Yes
- Default: ``
Used as the base url for rendering |assetUrl filters
- Type:
String
- Global: Yes
- Environment: Yes
- Default: ``
Used as the base url for rendering |svgUrl filters
- Type:
String
- Global: Yes
- Environment: Yes
- Default: ``
Used as the base path for reading svg icons needed to render |svgViewBox filters
- Type:
String
- Global: Yes
- Environment: Yes
- Default:
https://entoj.io/entoj
Used as the uri for the main view helper registration
- Type:
String
- Global: Yes
- Environment: Yes
- Default:
entoj
Used as the namespace for the main view helper registration
// Full featured Example
{
"export":
{
"settings":
{
"jsp":
{
"parameters": [],
"mode": inline,
"mapping":
{
"variables":
{
"name": "value"
}
}
}
},
"jsp":
[
{
"macro": "name",
"filename": "name",
"parameters": [],
"mode": inline,
"mapping":
{
"variables":
{
"name": "value"
}
},
"settings":
{
"macro":
{
"arguments": [],
"mode": inline,
"mapping":
{
"variables":
{
"name": "value"
}
}
}
}
}
]
}
}
- Type:
String
- export.settings.jsp: Yes
- export.jsp[]: Yes
- export.jsp[].settings: Yes
- Default: The main macro of the entity
Defines the macro that will be exported.
- Type:
String
- export.settings.jsp: No
- export.jsp[]: Yes
- export.jsp[].settings: No
- Default:
${includePath}/${categoryName}/${macroName}.jsp
or${includePath}/${categoryName}/${entityId}.jsp
Change the name of the exported macro. The .jsp extensions is added automatically. When no path is specified the default path (the categroy plural name in lowercase) is prepended.
- Type:
Enum[include|inline]
- export.settings.jsp: Yes
- export.jsp[]: No
- export.jsp[].settings: Yes
- Default:
include
Defines if the macro will be included or inlined when called.
- Type:
Array
- export.settings.jsp: Yes
- export.jsp[]: Yes
- export.jsp[].settings: No
- Default:
[]
Allows to specify parameter default values for macros. This only applies to exporting full macros. If you want to change the arguments of a macro call please see #arguments
- Type:
Array
- export.settings.jsp: No
- export.jsp[]: No
- export.jsp[].settings: Yes
- Default:
[]
Allows to specify arguments that will be used when calling macros.
- Type:
Object
- export.settings.jsp: No
- export.jsp[]: Yes
- export.jsp[].settings: Yes
- Default:
[]
Allows to override specific settings for macro calls within the exported macro.
npm test
npm test -- --grep model/
npm test --vvvv
npm run coverage
npm run lint