{"id":19497772,"url":"https://github.com/toshusai/one","last_synced_at":"2025-04-25T22:32:36.122Z","repository":{"id":208844120,"uuid":"625099139","full_name":"toshusai/one","owner":"toshusai","description":"a JavaScript framework in a 1.7KB one class","archived":false,"fork":false,"pushed_at":"2024-09-11T14:58:58.000Z","size":17,"stargazers_count":15,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-09-11T23:12:12.200Z","etag":null,"topics":["framework","frontend","javascript","typescript"],"latest_commit_sha":null,"homepage":"https://toshusai.github.io/one-docs/","language":"TypeScript","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/toshusai.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-04-08T04:17:00.000Z","updated_at":"2024-09-11T15:03:18.000Z","dependencies_parsed_at":"2023-11-23T15:52:35.879Z","dependency_job_id":null,"html_url":"https://github.com/toshusai/one","commit_stats":null,"previous_names":["toshusai/one"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toshusai%2Fone","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toshusai%2Fone/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toshusai%2Fone/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toshusai%2Fone/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/toshusai","download_url":"https://codeload.github.com/toshusai/one/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224019646,"owners_count":17242176,"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","frontend","javascript","typescript"],"created_at":"2024-11-10T21:47:57.312Z","updated_at":"2024-11-10T21:47:58.616Z","avatar_url":"https://github.com/toshusai.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# One\n\n## What is One?\n\nhttps://toshusai.github.io/one-docs/\n\nOne is a lightweight, easy-to-use framework for building web applications that is simple, transparent, and fast. It consists of a single class contained in a single file of 1.7KB and requires zero dependencies and no build step.\n\n## Overview\n\nOne is a lightweight framework that makes it easy to build web applications with its focus on simplicity and transparency. The entire framework is contained within a single class, making it easy to use and understand. At only 11KB TypeScript in size (1.7KB JavaScript when gzip compressed), the class includes implementation of basic features found in modern frameworks, such as if statements, for loops, slots, and props. With zero dependencies and no build step required, One is a great choice for building small to medium-sized web applications.\n\n## How to use\n\nInstallation\n\n```bash\nnpm install @toshusai/one\n```\n\n## Usage\n\nTo use One, simply inherit the One class and implement the template method.\n\n```ts\nimport { One } from \"@toshusai/one\";\n\nexport class BasicComponent extends One {\n  render() {\n    return `\u003cdiv\u003eHello World!\u003c/div\u003e`;\n  }\n\n  mounted() {\n    console.log(\"Can you see me in the console?\");\n  }\n}\n```\n\nTo initialize the application, create an instance and pass the root HTMLElement as an argument to the mount method.\n\n```ts\nconst element = document.getElementById(\"app\")!;\nnew BasicComponent().mount(element);\n```\n\n## Features\n\nOne supports the following features:\n\n- `-if` for if statements\n- `-for` for for loops\n- `\u003cslot\u003e\u003c/slot\u003e` for multiple slots\n- `:value=\"value\"` for two-way binding\n- `@click=\"onClick\"` for event listeners\n\n## Documentation\n\ndocumentation is available on the GitHub Pages site.\nhttps://toshusai.github.io/one-docs/\n\ndocumentation source code is available on GitHub\nhttps://github.com/toshusai/one-docs\n\n## License\n\nMIT License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftoshusai%2Fone","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftoshusai%2Fone","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftoshusai%2Fone/lists"}