{"id":24083324,"url":"https://github.com/mitranim/gulp-atril-html2js","last_synced_at":"2026-05-12T08:39:47.730Z","repository":{"id":82132047,"uuid":"36572435","full_name":"mitranim/gulp-atril-html2js","owner":"mitranim","description":"Convert HTML templates into strings for atril","archived":false,"fork":false,"pushed_at":"2015-06-03T19:00:53.000Z","size":94,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-20T15:57:00.134Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://mitranim.com/atril/","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/mitranim.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":"2015-05-30T19:26:27.000Z","updated_at":"2015-05-31T22:12:28.000Z","dependencies_parsed_at":"2023-02-28T12:46:18.417Z","dependency_job_id":null,"html_url":"https://github.com/mitranim/gulp-atril-html2js","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/mitranim/gulp-atril-html2js","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitranim%2Fgulp-atril-html2js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitranim%2Fgulp-atril-html2js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitranim%2Fgulp-atril-html2js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitranim%2Fgulp-atril-html2js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mitranim","download_url":"https://codeload.github.com/mitranim/gulp-atril-html2js/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitranim%2Fgulp-atril-html2js/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32931311,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-11T17:09:15.040Z","status":"online","status_checked_at":"2026-05-12T02:00:06.338Z","response_time":102,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":"2025-01-09T23:56:23.943Z","updated_at":"2026-05-12T08:39:47.715Z","avatar_url":"https://github.com/mitranim.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Description\n\nThis is a [`gulp`](http://gulpjs.com) plugin for\n[`atril`](http://mitranim.com/atril/), an experimental UI framework in\nthe collective spirit of ReactJS, Polymer, Angular 2 and Aurelia.\n\nConverts HTML templates into JavaScript modules that self-add to `atril`'s\nview cache. This lets you avoid runtime XHR imports.\n\nThe converted files use `require` style imports.\n\n## Installation and Usage\n\nTo install:\n\n```shell\nnpm i --save-dev gulp-atril-html2js\n```\n\n### Without Concatenation\n\nIn your `gulpfile.js`:\n\n```javascript\nvar $ = require('gulp-load-plugins')();\n\ngulp.task('views', function() {\n  return gulp.src([\n      'src/app/**/*.html',\n      'src/app/**/*.svg'\n    ])\n    .pipe($.atrilHtml2js({stripPrefix: 'src'}))\n    .pipe(gulp.dest('dist/app'));\n});\n```\n\nIn your scripts:\n\n```typescript\n// Each view has to be imported separately.\nimport 'app/my-component/my-component.html';\nimport {Component} from 'atril';\n\n@Component({my-component})\nclass VM {static viewUrl = 'app/my-component/my-component.html'}\n```\n\n### With Concatenation\n\nIn your `gulpfile.js`:\n\n```javascript\nvar $ = require('gulp-load-plugins')();\n\ngulp.task('views', function() {\n  return gulp.src([\n      'src/app/**/*.html',\n      'src/app/**/*.svg'\n    ])\n    .pipe($.atrilHtml2js({\n      stripPrefix: 'src',\n      concat: 'views.js'\n    }))\n    .pipe(gulp.dest('dist/app'));\n});\n```\n\nIn your scripts:\n\n```typescript\n// Imports and caches all views at once.\nimport 'app/views';\nimport {Component} from 'atril';\n\n@Component({my-component})\nclass VM {static viewUrl = 'app/my-component/my-component.html'}\n```\n\n## Alternative\n\nA great alternative for `SystemJS` / `jspm` users is the SystemJS [text\nplugin](https://github.com/systemjs/plugin-text). Example usage:\n\n```\nimport {Component} from 'atril';\n// Import as a string.\nimport view from './my-component.html!text';\n\n@Component({my-component})\nclass VM {static view = view}\n```\n\nThis automatically works with `jspm`'s bundling. If you're not using TypeScript\n(which is impossible to stop from complaining about relative text imports), this\nis a better option than `gulp-atril-html2js`.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmitranim%2Fgulp-atril-html2js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmitranim%2Fgulp-atril-html2js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmitranim%2Fgulp-atril-html2js/lists"}