{"id":13774077,"url":"https://github.com/cebor/rollup-plugin-angular","last_synced_at":"2025-04-14T23:09:59.228Z","repository":{"id":57742144,"uuid":"63846147","full_name":"cebor/rollup-plugin-angular","owner":"cebor","description":"Angular2 template and styles inliner","archived":false,"fork":false,"pushed_at":"2017-08-23T16:25:01.000Z","size":187,"stargazers_count":15,"open_issues_count":6,"forks_count":14,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-14T23:09:53.951Z","etag":null,"topics":["angular","css","html","rollup"],"latest_commit_sha":null,"homepage":"","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/cebor.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":"2016-07-21T07:15:03.000Z","updated_at":"2020-05-10T22:30:50.000Z","dependencies_parsed_at":"2022-09-05T17:00:51.565Z","dependency_job_id":null,"html_url":"https://github.com/cebor/rollup-plugin-angular","commit_stats":null,"previous_names":[],"tags_count":34,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cebor%2Frollup-plugin-angular","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cebor%2Frollup-plugin-angular/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cebor%2Frollup-plugin-angular/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cebor%2Frollup-plugin-angular/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cebor","download_url":"https://codeload.github.com/cebor/rollup-plugin-angular/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248975316,"owners_count":21192210,"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":["angular","css","html","rollup"],"created_at":"2024-08-03T17:01:23.472Z","updated_at":"2025-04-14T23:09:59.211Z","avatar_url":"https://github.com/cebor.png","language":"JavaScript","readme":"[![Build Status](https://travis-ci.org/cebor/rollup-plugin-angular.svg?branch=master)](https://travis-ci.org/cebor/rollup-plugin-angular)\n\n# rollup-plugin-angular\nAngular2 template and styles inliner for rollup\n\n## Looking for new maintainer\nI have no time to maintain this plugin anymore. So im looking for a new Maintainer. Feel free to create an issue, when you want to maintain this plugin.\n\n## Installation\n```bash\nnpm install --save-dev rollup-plugin-angular\n```\n\n## Example\n```javascript\n// rollup.config.js\nimport angular from 'rollup-plugin-angular';\nimport typescript from 'rollup-plugin-typescript';\nimport alias from 'rollup-plugin-alias';\nimport nodeResolve from 'rollup-plugin-node-resolve';\n\nexport default {\n  entry: 'src/main.ts',\n  format: 'iife',\n  dest: 'dist/bundle.js',\n  plugins: [\n    angular(),\n    typescript(),\n    alias({ rxjs: __dirname + '/node_modules/rxjs-es' }), // rxjs fix (npm install rxjs-es)\n    nodeResolve({ jsnext: true, main: true })\n  ]\n}\n```\n\n## Template \u0026 Style preprocessing\nYou may need to do some preprocessing on your templates \u0026 styles such as minification and/or transpilation.\n\nTo do this you can pass a preprocessors object as an option, containing a style and/or template preprocessor.\n\nIf you are using rollup on a source that has already been transpiled to JavaScript you will also need to set the sourcetype.\n\n### Signature\n```typescript\nsourcetype: 'js' //defaults to 'ts'\npreprocessors: {\n  template: (source: string, path: string) =\u003e string,\n  style: (source: string, path: string) =\u003e string,\n}\n```\n`source` - The contents of the style or template's file.\n\n`path` - The path to the loaded file. Can be useful for checking file extensions for example.\n\nreturns the manipulated source as a string.\n\n### Example\nThe following example shows how you can use sass, clean-css (for css minification), and htmlmin.\n\n```javascript\n// rollup.config.js\nimport angular from 'rollup-plugin-angular';\nimport typescript from 'rollup-plugin-typescript';\nimport nodeResolve from 'rollup-plugin-node-resolve';\nimport sass from 'node-sass';\nimport CleanCSS from 'clean-css';\nimport { minify as minifyHtml } from 'html-minifier';\n\nconst cssmin = new CleanCSS();\nconst htmlminOpts = {\n    caseSensitive: true,\n    collapseWhitespace: true,\n    removeComments: true,\n};\n\nexport default {\n  input: 'src/main.ts',\n  output: {\n    format: 'umd',\n    file: 'dist/bundle.js'\n  },\n  plugins: [\n    angular({\n      // additional replace `templateUrl` and `stylesUrls` in every `.js` file\n      // default: true\n      replace: false, \n      preprocessors: {\n        template: template =\u003e minifyHtml(template, htmlminOpts),\n        style: scss =\u003e {\n            const css = sass.renderSync({ data: scss }).css;\n            return cssmin.minify(css).styles;\n        },\n      }\n    })\n    typescript(),\n    nodeResolve({ jsnext: true, main: true })\n  ]\n}\n```\n","funding_links":[],"categories":["Plugins"],"sub_categories":["Frameworks"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcebor%2Frollup-plugin-angular","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcebor%2Frollup-plugin-angular","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcebor%2Frollup-plugin-angular/lists"}