{"id":16832662,"url":"https://github.com/zswang/penjs","last_synced_at":"2025-04-11T04:32:45.671Z","repository":{"id":57260050,"uuid":"87292414","full_name":"zswang/penjs","owner":"zswang","description":"Mobile-side page small development framework.","archived":false,"fork":false,"pushed_at":"2017-05-04T13:05:03.000Z","size":239,"stargazers_count":4,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-08T12:51:01.576Z","etag":null,"topics":["framework","mobile-web","mvvm"],"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/zswang.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":"2017-04-05T09:38:48.000Z","updated_at":"2019-07-21T18:34:07.000Z","dependencies_parsed_at":"2022-08-25T01:52:16.303Z","dependency_job_id":null,"html_url":"https://github.com/zswang/penjs","commit_stats":null,"previous_names":["zswang/h5page"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zswang%2Fpenjs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zswang%2Fpenjs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zswang%2Fpenjs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zswang%2Fpenjs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zswang","download_url":"https://codeload.github.com/zswang/penjs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248345202,"owners_count":21088231,"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":["framework","mobile-web","mvvm"],"created_at":"2024-10-13T11:49:57.611Z","updated_at":"2025-04-11T04:32:45.631Z","avatar_url":"https://github.com/zswang.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"penjs\n--------\n\n![logo](penjs.png)\n\n# [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coverage Status][coverage-image]][coverage-url]\n\nMobile-web small development framework.\n\n## API\n\n### constructer\n\n```js\nfunction penjs(element, options) {}\n```\n\n## Example\n\n```html\n\u003cdiv id=\"app\"\u003e\n  \u003cscript type=\"text/jhtmls\"\u003e\n    var info = {\n      createCount: 0,\n      destroyCount: 0,\n    }\n    \u003ch1\u003ejhtmls -- #{title} -- #{time}\u003c/h1\u003e\n    \u003ch3 :bind=\"info\"\u003ecreate #{info.createCount} destroy: #{info.destroyCount}\u003c/h3\u003e\n    var asc = 1;\n    \u003cbutton @tap=\"now()\"\u003enow\u003c/button\u003e\n    \u003cbutton @tap=\"ajax()\"\u003eajax\u003c/button\u003e\n    \u003cbutton @tap=\"sort(items, asc = -asc)\"\u003esort\u003c/button\u003e\n    \u003cbutton @tap=\"push(items)\"\u003epush\u003c/button\u003e\n    \u003cul :bind=\"items\"\u003e\n      items.forEach(function (item) {\n      \u003cli :bind=\"item\" @create=\"info.createCount++\" @destroy=\"info.destroyCount++\"\u003e\n        if (item.editing === 'jhtmls') {\n          \u003cinput type=\"text\"\n            :value=\"item.title\"\n            @create=\"this.focus();\"\n            @keydown.enter=\"this.blur();\"\n            @focusout=\"item.title = this.value; item.editing = false;\"\u003e\n        } else {\n          \u003cspan @dblclick=\"item.editing = 'jhtmls'\"\u003e#{item.title}\u003c/span\u003e\n          \u003cbutton @tap=\"remove(items, item)\"\u003eremove\u003c/button\u003e\n        }\n      \u003c/li\u003e\n      });\n    \u003c/ul\u003e\n  \u003c/script\u003e\n\u003c/div\u003e\n```\n\n## License\n\nMIT © [zswang](http://weibo.com/zswang)\n\n[npm-url]: https://npmjs.org/package/penjs\n[npm-image]: https://badge.fury.io/js/penjs.svg\n[travis-url]: https://travis-ci.org/zswang/penjs\n[travis-image]: https://travis-ci.org/zswang/penjs.svg?branch=master\n[coverage-url]: https://coveralls.io/github/zswang/penjs?branch=master\n[coverage-image]: https://coveralls.io/repos/zswang/penjs/badge.svg?branch=master\u0026service=github","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzswang%2Fpenjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzswang%2Fpenjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzswang%2Fpenjs/lists"}