Isomorphic (single page app) options
clientControllers[Object]: Allows you to expose controller (route) file code to frontend JS for client-side routing.enable[Boolean]: Whether or not to bundle controller files.exposeAll[Boolean]: Option to expose all templates.blocklist[Array of Strings]: List of files or folders to exclude whenexposeAllis enabled.- Can also be set declaratively by putting a
// roosevelt-blocklistcomment at the top of any controller file.
- Can also be set declaratively by putting a
allowlist[Object of Arrays]: List of JS files to create mapped to which controller files to expose.- Example:
{ "mainPages.js": ["index.js", "about.js"] } - Can also be set declaratively by putting a
// roosevelt-allowlist file_pathcomment at the top of any controller file.
- Example:
defaultBundle[String]: File name for the default JS controller bundle.output[String]: Subdirectory withinbuildFolderto write JS controller bundles to.
Default: [Object]
{
enable: false,
exposeAll: false,
blocklist: [],
allowlist: {},
defaultBundle: 'controllers.js',
output: 'js'
}clientViews[Object]: Allows you to expose view (template) file code to frontend JS for client-side templating.enable[Boolean]: Whether or not to bundle view files.exposeAll[Boolean]: Option to expose all templates.blocklist[Array of Strings]: List of files or folders to exclude whenexposeAllis enabled.- Can also be set declaratively by putting a
<!-- roosevelt-blocklist -->tag at the top of any template.
- Can also be set declaratively by putting a
allowlist[Object of Arrays]: List of JS files to create mapped to which view files to expose.- Example:
{ "mainPages.js": ["baseLayout.html", "footer.html"] } - Can also be set declaratively by putting a
<!-- roosevelt-allowlist file_path -->tag at the top of any template.
- Example:
defaultBundle[String]: File name for the default JS view bundle.output[String]: Subdirectory withinbuildFolderto write JS view bundles to.minify[Boolean]: Option to minify templates that are exposed via this feature.- Be careful with this feature because it can break your templates depending on which templating system you use, and as such it is off by default. You may need to make liberal use of the
minifyOptionsparam to make it work right with your templating system.
- Be careful with this feature because it can break your templates depending on which templating system you use, and as such it is off by default. You may need to make liberal use of the
minifyOptions[Object]: Parameters to supply to html-minifier's API.- Uses the params you set in
html.minifier.optionsif empty.
- Uses the params you set in
Default: [Object]
{
enable: false,
exposeAll: false,
blocklist: [],
allowlist: {},
defaultBundle: 'views.js',
output: 'js',
minify: false,
minifyOptions: {}
}