{"id":28028498,"url":"https://github.com/cheft/riot-spa-template","last_synced_at":"2025-07-18T17:05:01.227Z","repository":{"id":26682804,"uuid":"30139550","full_name":"cheft/riot-spa-template","owner":"cheft","description":"a riot spa template","archived":false,"fork":false,"pushed_at":"2015-09-09T05:42:19.000Z","size":2760,"stargazers_count":24,"open_issues_count":4,"forks_count":2,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-05-11T07:16:05.550Z","etag":null,"topics":[],"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/cheft.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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-02-01T07:24:04.000Z","updated_at":"2024-10-25T10:50:55.000Z","dependencies_parsed_at":"2022-08-25T04:50:38.051Z","dependency_job_id":null,"html_url":"https://github.com/cheft/riot-spa-template","commit_stats":null,"previous_names":["cheft/cheftjs"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/cheft/riot-spa-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cheft%2Friot-spa-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cheft%2Friot-spa-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cheft%2Friot-spa-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cheft%2Friot-spa-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cheft","download_url":"https://codeload.github.com/cheft/riot-spa-template/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cheft%2Friot-spa-template/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265798247,"owners_count":23829908,"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":[],"created_at":"2025-05-11T07:16:02.810Z","updated_at":"2025-07-18T17:05:01.172Z","avatar_url":"https://github.com/cheft.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Alt text](snapshot/demo.png)\n\n# cheftjs\n是基于 riot.js 薄封装的一套类 flux 框架\n\n\n    ||=====================||      \n    ||     Application     ||\n    ||=====================||\n    ||        Router       ||\n    ||=====================||\n    Tag   --\u003e  do  --\u003e   on\n      \\        |         /\n       \\     Store      /\n        \\______________/\n              \u003c--\n\n## Application\n    var c = require('cheftjs');\n    var app = new c.Applicaton({\n        router: require('./router.js')\n    });    \n\n## Router - [like backbone](http://backbonejs.org/#Router-routes)\n    module.exports = {\n        routes: {\n            '': 'home'\n        },\n        home: function() {\n\n        }\n    }\n\n## Tag - [base on riot](https://github.com/riot/riot)\n    \u003ctest\u003e\n        \u003cscript\u003e\u003c/script\u003e\n        \u003ch1\u003e{result}\u003c/h1\u003e\n        \u003cbutton onclick={clickMe}\u003etest\u003c/button\u003e\n    \u003c/test\u003e\n\n## do\n    \n    module.exports = {\n        do: {\n            clickMe: function() {\n                this.result = 'click success!';\n                this.trigger('clicked');\n            }\n        }\n    }\n\n## Store\n\n    module.exports = {\n        store: ''\n    }\n\nor\n\n    module.exports = {\n        store: {\n            url: '',\n            contentType: ''\n        }\n    }\n\n### method\n* get()\n* save()\n* del()\n* post()\n* put()\n\n## on\n    \n    module.exports = {\n        on: {\n            init:    function() {}\n            mount:   function() {}\n            update:  function() {}\n            updated: function() {}\n            geted  : function(data, status) {}\n            posted : function(data, status) {}\n            puted  : function(data, status) {}\n            saved  : function(data, status) {}\n            deleted: function(data, status) {}\n            \n            clicked : function() {\n                console.log('the tag can auto update');\n            }\n        }\n    }\n\n## Demo\n    cd demo\n    npm install\n    gulp\n\n![Alt text](snapshot/demo.png)\n\n## [Project](https://github.com/cheft/extend-frontend)\n![Alt text](snapshot/1.jpg)\n\n\u003c!-- ### Snapshot\n![Alt text](snapshot/1.jpg)\n![Alt text](snapshot/2.jpg)\n![Alt text](snapshot/3.jpg)\n![Alt text](snapshot/4.jpg)\n![Alt text](snapshot/5.jpg) --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcheft%2Friot-spa-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcheft%2Friot-spa-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcheft%2Friot-spa-template/lists"}