{"id":18812597,"url":"https://github.com/jsreport/jsreport-static-resources","last_synced_at":"2025-04-13T21:24:43.209Z","repository":{"id":57286287,"uuid":"44592143","full_name":"jsreport/jsreport-static-resources","owner":"jsreport","description":"jsreport extension serving static scripts and styles like jquery or bootstrap from the pre-configured directory.","archived":false,"fork":false,"pushed_at":"2017-03-21T16:56:23.000Z","size":7,"stargazers_count":3,"open_issues_count":1,"forks_count":1,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-27T11:43:35.147Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jsreport.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-10-20T08:21:21.000Z","updated_at":"2017-06-19T17:53:52.000Z","dependencies_parsed_at":"2022-09-10T01:01:48.847Z","dependency_job_id":null,"html_url":"https://github.com/jsreport/jsreport-static-resources","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsreport%2Fjsreport-static-resources","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsreport%2Fjsreport-static-resources/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsreport%2Fjsreport-static-resources/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsreport%2Fjsreport-static-resources/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jsreport","download_url":"https://codeload.github.com/jsreport/jsreport-static-resources/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248783783,"owners_count":21160984,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T23:34:15.875Z","updated_at":"2025-04-13T21:24:43.150Z","avatar_url":"https://github.com/jsreport.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# jsreport-static-resources\n[![NPM Version](http://img.shields.io/npm/v/jsreport-static-resources.svg?style=flat-square)](https://npmjs.com/package/jsreport-static-resources)\n\n\u003e **!!! Please use [assets](https://jsreport.net/learn/assets) extension which solves the static resources referencing in better way instead**\n\n\n**[jsreport](https://github.com/jsreport/jsreport) extension serving static scripts and styles like jquery or bootstrap from the pre-configured directory.**\n\n1.\n\n```\nnpm install jsreport-static-resources\n```\n\n2.\n\nCopy the scripts, styles or other static resources to the jsreport data directory `data\\staticResources`\n\n3.\n\nReference resources inside the template content using `$staticResources` property provided to the templating engine.\n```html\n\u003chtml\u003e\n\t\u003chead\u003e\n\t\t\u003clink rel=\"stylesheet\" type=\"text/css\" href=\"{{$staticResources}}/style.css\"\u003e\n\t\u003c/head\u003e\n...\n```\n\n4.\nOptionally override the path to the static resources directory inside the jsreport configuration \n```js\n{\n  ...\n  'static-resources': {\n    'directory': 'c:\\build'\n  }\n  ...\n}\n```\n\n## jsreport-core\nYou can apply this extension also manually to [jsreport-core](https://github.com/jsreport/jsreport-core)\n\n```js\nvar jsreport = require('jsreport-core')()\njsreport.use(require('jsreport-static-resources')())\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjsreport%2Fjsreport-static-resources","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjsreport%2Fjsreport-static-resources","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjsreport%2Fjsreport-static-resources/lists"}