npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

entoj-export-jsp

v0.3.7

Published

[![Linux Build][travis-image]][travis-url] [![Windows Build][appveyor-image]][appveyor-url] [![Test Coverage][coveralls-image]][coveralls-url]

Downloads

86

Readme

Linux Build Windows Build Test Coverage

Entoj JSP Export

Features

JspExportCommand

A jsp artefact exporter. For detailed configuration see the Configuration section below.

Configuration

configuration.commands.push(
	{
		type: require('entoj-export-jsp').command.JspExportCommand
	});

Configuration

Global

// 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'
    }
};

Build environments

// 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'
	}
};

Options

jsp.exportPath

  • 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.

jsp.jspBasePath

  • Type: String
  • Global: Yes
  • Environment: Yes
  • Default: includes

The base path used to store exported jsp artefacts. This is relative to jsp.exportPath.

jsp.jspIncludePath

  • Type: String
  • Global: Yes
  • Environment: Yes
  • Default: /includes

The base url used to include jsp artefacts.

jsp.imageBaseUrl

  • Type: String
  • Global: Yes
  • Environment: Yes
  • Default: ``

Used as the base url for rendering |imageUrl filters

jsp.assetBaseUrl

  • Type: String
  • Global: Yes
  • Environment: Yes
  • Default: ``

Used as the base url for rendering |assetUrl filters

jsp.svgBaseUrl

  • Type: String
  • Global: Yes
  • Environment: Yes
  • Default: ``

Used as the base url for rendering |svgUrl filters

jsp.svgBasePath

  • Type: String
  • Global: Yes
  • Environment: Yes
  • Default: ``

Used as the base path for reading svg icons needed to render |svgViewBox filters

jsp.viewHelperUri

  • Type: String
  • Global: Yes
  • Environment: Yes
  • Default: https://entoj.io/entoj

Used as the uri for the main view helper registration

jsp.viewHelperNamespace

  • Type: String
  • Global: Yes
  • Environment: Yes
  • Default: entoj

Used as the namespace for the main view helper registration

Artefact export

// 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"
                            }
                        }
                    }
                }
            }
        ]
	}
}

Options

macro

  • 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.

filename

  • 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.

mode

  • 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.

parameters

  • 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

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.

mapping.variables

  • 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.

Running tests

Run all test specs at once

npm test

Run all tests matching the given regex

npm test -- --grep model/

Enable logging while running tests

npm test --vvvv

Run all tests and shows test coverage

npm run coverage

Lint all source files

npm run lint

Licence

Apache License 2.0