{"id":17126297,"url":"https://github.com/aquariuslt/karma-jawr-sample","last_synced_at":"2026-05-02T09:34:29.746Z","repository":{"id":68994629,"uuid":"104211489","full_name":"aquariuslt/karma-jawr-sample","owner":"aquariuslt","description":"Spring + JAWR + Ext3 Java Web Sample Project","archived":false,"fork":false,"pushed_at":"2023-12-15T20:23:25.000Z","size":1538,"stargazers_count":2,"open_issues_count":1,"forks_count":1,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-01-29T09:49:45.919Z","etag":null,"topics":["ext","jawr","jsf2","springmvc"],"latest_commit_sha":null,"homepage":"","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/aquariuslt.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-09-20T12:17:18.000Z","updated_at":"2023-04-11T02:14:03.000Z","dependencies_parsed_at":"2023-12-15T22:01:48.086Z","dependency_job_id":null,"html_url":"https://github.com/aquariuslt/karma-jawr-sample","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aquariuslt%2Fkarma-jawr-sample","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aquariuslt%2Fkarma-jawr-sample/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aquariuslt%2Fkarma-jawr-sample/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aquariuslt%2Fkarma-jawr-sample/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aquariuslt","download_url":"https://codeload.github.com/aquariuslt/karma-jawr-sample/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245206464,"owners_count":20577580,"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":["ext","jawr","jsf2","springmvc"],"created_at":"2024-10-14T18:47:32.889Z","updated_at":"2026-05-02T09:34:29.708Z","avatar_url":"https://github.com/aquariuslt.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Karma Jawr Sample\n\n[![Build Status](https://travis-ci.org/aquariuslt/karma-jawr-sample.svg?branch=master)](https://travis-ci.org/aquariuslt/karma-jawr-sample)\n[![Coverage Status](https://coveralls.io/repos/github/aquariuslt/karma-jawr-sample/badge.svg?branch=master)](https://coveralls.io/github/aquariuslt/karma-jawr-sample?branch=master)\n\n\nThe focus point is: Providing a way to show: how to write graceful javascript unittest in server render template engine.\n\n\n## Background\n- Spring Framework \n- Spring MVC\n- JAWR\n- JAWR Locale Message Generator\n- Ext3\n\n## Features\n- Karma + Mocha + Chai\n- Sinon\n- Integration with CI System\n\n## Problems\n- **How to load necessary JS files into runtime easily?** Because Java side uses JAWR as assets bundling tool to compact multiple JS files into one. Then Front-end uses `\u003cscript\u003e` tags to include those bundles. This make it difficult to get the correct dependencies JS files.\n- **How to mock the Locale Message Generator in global?** Currently the JAWR Locale Message Generator is assigned as a property of the global object(We use it like `locale.namesapce.field.a()`). We need to construct this object when running test cases otherwise a lot of code will throw exception.\n- **No best practice for Ext3 can be found from Internet**\n\n## Plan: outline\n\n\n## Usage\n\n### Install Dependencies\n```bash\nmvn install \u0026\u0026 npm install\n```\n\n### Build War \u0026 Deploy\nYou can deploy you war file in `target/karma-jawr.war` to your webapp container.(Tomcat, JBoss, Weblogic...)\n\n### Install Frontend UnitTest Dependencies\n```bash\nnpm install\n```\n\nFor China User, since `puppeteer v0.13.0` support CHROMIUM binary download mirror.\n\nPlease export environment variables `PUPPETEER_DOWNLOAD_HOST=https://npm.taobao.org/mirrors` before npm install\n\nFor Windows Run \n\n```bash\nSET PUPPETEER_DOWNLOAD_HOST=https://npm.taobao.org/mirrors\n```\n\n\u003e Since 2018-03-13 cnpmjs.org network issue, found another mirror on taobao.org\n\u003e So you can also use this [https://npm.taobao.org/mirrors](https://npm.taobao.org/mirrors)\n\n\nFor Unix Run \n```bash\nexport PUPPETEER_DOWNLOAD_HOST=https://npm.taobao.org/mirrors\n```\n\n\n### Frontend UnitTest\n```bash\nnpm test\n```\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faquariuslt%2Fkarma-jawr-sample","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faquariuslt%2Fkarma-jawr-sample","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faquariuslt%2Fkarma-jawr-sample/lists"}