{"id":13775108,"url":"https://github.com/btd/rollup-plugin-jst","last_synced_at":"2025-08-04T16:38:00.847Z","repository":{"id":47472262,"uuid":"55964588","full_name":"btd/rollup-plugin-jst","owner":"btd","description":"Compile _.template to javascript code for rollup","archived":false,"fork":false,"pushed_at":"2021-08-30T12:45:08.000Z","size":26,"stargazers_count":5,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-10T11:12:24.277Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/btd.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-04-11T10:53:10.000Z","updated_at":"2021-08-30T12:45:11.000Z","dependencies_parsed_at":"2022-09-23T09:10:49.836Z","dependency_job_id":null,"html_url":"https://github.com/btd/rollup-plugin-jst","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/btd/rollup-plugin-jst","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/btd%2Frollup-plugin-jst","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/btd%2Frollup-plugin-jst/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/btd%2Frollup-plugin-jst/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/btd%2Frollup-plugin-jst/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/btd","download_url":"https://codeload.github.com/btd/rollup-plugin-jst/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/btd%2Frollup-plugin-jst/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261255905,"owners_count":23131478,"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-08-03T17:01:34.026Z","updated_at":"2025-06-22T07:37:04.680Z","avatar_url":"https://github.com/btd.png","language":"JavaScript","funding_links":[],"categories":["Plugins"],"sub_categories":["Templating"],"readme":"# rollup-plugin-jst\n\nPrecompile lodash templates to javascript. It uses lodash-es/escapa for escaping capabilities. So it should be installed\nin dev dependencies.\n\n## Installation\n\n```bash\nnpm i -S lodash-es # if you use \u003c%- %\u003e escaping\nnpm i -D rollup-plugin-jst rollup-plugin-node-resolve\n```\n\n## Usage Example\n\n```js\nimport { rollup } from 'rollup';\nimport jst from 'rollup-plugin-jst';\nimport resolve from 'rollup-plugin-node-resolve';\n\nrollup({\n  entry: 'src/main.js',\n  plugins: [\n    jst({\n      // By default, all .html, .jst, .ejs files are compiled\n      extensions: [ '.html', '.ejs' ],\n\n      // You can restrict which files are compiled\n      // using `include` and `exclude`\n      include: 'src/components/**.html',\n\n      // You can pass options to _.template(code, templateOptions)\n      templateOptions: {\n        variable: 'data' // default variable for template is 'data',\n      },\n\n      // You can enable HTML minification before the template is compiled\n      // by default turned off\n      minify: true,\n\n      // You can pass options to HTMLMinifier\n      // see github.com/kangax/html-minifier for documentation\n      minifyOptions: {\n        collapseWhitespace: true\n      },\n\n      // if you do not want to use lodash-es/escape for some reason\n      // (e.g because it is quite huge for just escape function)\n      // you can set which module to use - it should have single default export\n      // you should care about correct resolving and handing of this file\n      // if it is not using modules\n      escapeModule: 'escape-html'\n    }),\n    resolve({\n      module: true,\n      main: true\n    })\n  ]\n}).then(...)\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbtd%2Frollup-plugin-jst","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbtd%2Frollup-plugin-jst","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbtd%2Frollup-plugin-jst/lists"}