1.0.0 • Published 4 years ago

ibxpackager v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
4 years ago

ibxpackager README

The ibxpackager is a node application. It will take an ibx resource bundle(s) as input, and combine those bundles into a single packaged bundle.

Dependencies

  • xmldom - npm install xmldom
  • uglify-es - npm install uglify-es
  • uglifycss - npm install uglifycss

Configuration

The ibxpackager config file is a json object with the following layout:

{
	"defaults":
	{
		"recurse":true,
		"allowDuplicates":false,
		"addUnresolvedLinks":true,
		"minify":false,
		"obfuscate":false,
		"ibxEmbedded":false,
		"template":"ibx.packager.bundle.template.xml",
		"contexts":
		{
			"loadContext":"ibx",
			"webRoot":"c:/ibi/WebFOCUS82/webapps/webfocus",
			"ibx":"./ibx/resources",
			"app":"."
		},
		"output":
		{
			"replace":true,
			"dir":"ibxpkgs/${bundle_name}",
			"bundle":"${bundle_name}.pkgd.xml",
			"js":"${bundle_name}.pkgd.js",
			"css":"${bundle_name}.pkgd.css",
			"markup":"${bundle_name}.pkgd.xml",
			"strings":"${bundle_name}.pkgd.str"
		},
		"logging":
		{
			"timestamps":true
		}
	},
	"ibxResbundles":
	[
		{
			"enabled":true,
			"id":"sample_res_bundle_block",
			"src":"c:/path/to/bundle/to/package.xml"
		}
	]
}
  • defaults - you can selectively add overrides for the defaults in each 'ibxResbundles' entry. recurse - package referenced bundles. allowDuplicates - will package the same resource multiple times (if included in a deeper referenced bundle). addUnresolvedLinks - when a resources can't be loaded, add a reference to the external file. minify - minify the packaged js/css content. obfuscate - obfuscate the packaged js/css content. ibxEmbedded - add the ibx library to the package. template - the skeleton resource bundle template to use when building the package. contexts - the various locations used for resolving file locations when relative paths are used in the bundle. loadContext - the default load context used to resolve relative paths. webRoot - where ibi_apps would be in the file system (c:/ibi/WebFOCUS82/webapps/webfocus). ibx - whereever ibx is located (c:/ibi/WebFOCUS82/webapps/webfocus/ibx/resources). app - the location on disk where the ibx application would be. output - where output should be created, and what output to create. replace - overwrite existing out put files. dir - the output directory (can be relative/absolute). bundle - the location of the bundle file. js - the location of packaged javascript. css - the location of packaged css. markup - the location of packaged ibx markup. strings - the location of the packaged strings (NOT USED strings are always packaged inline). logging - various logging options. timestamps - log the time when the resource was processesed.
  • ibxResbundles - array of objects speicifying the ibx resource bundles to package. enabled - include this resource bundle in the packaging. id - an identifier for the package. You can use this as a package-time variable for name substitution. * src - the location of the ibx resource bundle you want to package.

Runtime Variables

You can use various pieces of packaging information in output file paths. They are used as Template Strings

  • ${bundle_id} - the id of the bundle's block in the config file.
  • ${bundle_path} - path to the source bundle.
  • ${bundle_name} - name of the source bundle.
  • ${config_path} - path to the packager config file.
  • ${config_name} - name of the packager config file.

Known Issues

Release Notes

1.0.0

  • Initial release of ibxpackager
1.0.0

4 years ago