Skip to content

jsreport extension serving static scripts and styles like jquery or bootstrap from the pre-configured directory.

License

Notifications You must be signed in to change notification settings

jsreport/jsreport-static-resources

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jsreport-static-resources

NPM Version

!!! Please use assets extension which solves the static resources referencing in better way instead

jsreport extension serving static scripts and styles like jquery or bootstrap from the pre-configured directory.

npm install jsreport-static-resources

Copy the scripts, styles or other static resources to the jsreport data directory data\staticResources

Reference resources inside the template content using $staticResources property provided to the templating engine.

<html>
	<head>
		<link rel="stylesheet" type="text/css" href="{{$staticResources}}/style.css">
	</head>
...

Optionally override the path to the static resources directory inside the jsreport configuration

{
  ...
  'static-resources': {
    'directory': 'c:\build'
  }
  ...
}

jsreport-core

You can apply this extension also manually to jsreport-core

var jsreport = require('jsreport-core')()
jsreport.use(require('jsreport-static-resources')())

About

jsreport extension serving static scripts and styles like jquery or bootstrap from the pre-configured directory.

Resources

License

Stars

Watchers

Forks

Packages

No packages published