{"id":14973411,"url":"https://github.com/spirosikmd/nghtml2js-jest","last_synced_at":"2025-10-27T01:30:33.619Z","repository":{"id":25864457,"uuid":"106722093","full_name":"spirosikmd/nghtml2js-jest","owner":"spirosikmd","description":"Jest preprocessor to turn Angular 1 templates into JS and put in modules.","archived":false,"fork":false,"pushed_at":"2022-12-07T10:02:51.000Z","size":881,"stargazers_count":2,"open_issues_count":25,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-01T01:25:02.732Z","etag":null,"topics":["angular1","angularjs","jest","nghtml2js"],"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/spirosikmd.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-10-12T17:06:53.000Z","updated_at":"2019-11-20T18:30:40.000Z","dependencies_parsed_at":"2023-01-14T03:45:15.973Z","dependency_job_id":null,"html_url":"https://github.com/spirosikmd/nghtml2js-jest","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/spirosikmd%2Fnghtml2js-jest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spirosikmd%2Fnghtml2js-jest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spirosikmd%2Fnghtml2js-jest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spirosikmd%2Fnghtml2js-jest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spirosikmd","download_url":"https://codeload.github.com/spirosikmd/nghtml2js-jest/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238418214,"owners_count":19468865,"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":["angular1","angularjs","jest","nghtml2js"],"created_at":"2024-09-24T13:48:40.821Z","updated_at":"2025-10-27T01:30:33.254Z","avatar_url":"https://github.com/spirosikmd.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nghtml2js-jest\n\nJest preprocessor to turn Angular 1 templates into JS and put in modules.\n\n[![Build Status][build-badge]][build]\n[![version][version-badge]][package]\n[![PRs Welcome][prs-badge]](http://makeapullrequest.com)\n[![All Contributors][all-contributors-badge]](#contributors)\n\n## Install\n\n`npm install --save-dev ng-html2js nghtml2js-jest`\n\nor\n\n`yarn add ng-html2js nghtml2js-jest --dev`\n\n## Example\n\nAssuming the project uses babel, create a `jest.json` file and use the `nghtml2js-jest` preprocessor to transform html files.\nThe `test/setup.js` file will probably be needed to import `angular` and `angular-mocks`. \n\n```json\n{\n  \"bail\": true,\n  \"verbose\": true,\n  \"transform\": {\n    \"^.+\\\\.js$\": \"babel-jest\",\n    \"^.+\\\\.html$\": \"\u003crootDir\u003e/node_modules/nghtml2js-jest/preprocessor.js\"\n  },\n  \"moduleFileExtensions\": [\n    \"js\"\n  ],\n  \"setupTestFrameworkScriptFile\": \"\u003crootDir\u003e/test/setup.js\"\n}\n```\n\nFor a more complete example have a look at the [example](https://github.com/spirosikmd/nghtml2js-jest/tree/master/example) folder.\n\n## Contributors\n\nThanks goes to these wonderful people ([emoji key](https://github.com/kentcdodds/all-contributors#emoji-key)):\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --\u003e\n| [\u003cimg src=\"https://avatars3.githubusercontent.com/u/1057324?v=4\" width=\"100px;\"/\u003e\u003cbr /\u003e\u003csub\u003eSpyros Ioakeimidis\u003c/sub\u003e](http://www.spyros.io)\u003cbr /\u003e[💬](#question-spirosikmd \"Answering Questions\") [💻](https://github.com/spirosikmd/nghtml2js/commits?author=spirosikmd \"Code\") [⚠️](https://github.com/spirosikmd/nghtml2js/commits?author=spirosikmd \"Tests\") |\n| :---: |\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\n\nThis project follows the [all-contributors](https://github.com/kentcdodds/all-contributors) specification.\nContributions of any kind welcome!\n\n[version-badge]: https://img.shields.io/npm/v/nghtml2js-jest.svg?style=flat-square\n[package]: https://www.npmjs.com/package/nghtml2js-jest\n[prs-badge]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square\n[build-badge]: https://img.shields.io/travis/spirosikmd/nghtml2js-jest.svg?style=flat-square\n[build]: https://travis-ci.org/spirosikmd/nghtml2js-jest.svg\n[all-contributors-badge]: https://img.shields.io/badge/all_contributors-1-orange.svg?style=flat-square\n[greenkeeper-badge]: https://badges.greenkeeper.io/spirosikmd/nghtml2js-jest.svg\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspirosikmd%2Fnghtml2js-jest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspirosikmd%2Fnghtml2js-jest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspirosikmd%2Fnghtml2js-jest/lists"}