{"id":23248894,"url":"https://github.com/sinhapaurush/yugal_spa_lib","last_synced_at":"2025-04-06T01:20:39.290Z","repository":{"id":113435406,"uuid":"464177955","full_name":"sinhapaurush/yugal_spa_lib","owner":"sinhapaurush","description":null,"archived":false,"fork":false,"pushed_at":"2023-04-20T13:38:30.000Z","size":19,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-12T07:25:44.949Z","etag":null,"topics":[],"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/sinhapaurush.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}},"created_at":"2022-02-27T15:39:19.000Z","updated_at":"2022-02-27T15:40:08.000Z","dependencies_parsed_at":null,"dependency_job_id":"af8acc18-b23c-4e7b-a910-7e46cca729fb","html_url":"https://github.com/sinhapaurush/yugal_spa_lib","commit_stats":null,"previous_names":["fuhrerindia/yugal_spa_lib","sinhapaurush/yugal_spa_lib"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinhapaurush%2Fyugal_spa_lib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinhapaurush%2Fyugal_spa_lib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinhapaurush%2Fyugal_spa_lib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinhapaurush%2Fyugal_spa_lib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sinhapaurush","download_url":"https://codeload.github.com/sinhapaurush/yugal_spa_lib/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247421111,"owners_count":20936234,"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":"2024-12-19T08:16:06.184Z","updated_at":"2025-04-06T01:20:39.273Z","avatar_url":"https://github.com/sinhapaurush.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Yugal.JS in Yugal.PHP (SPA)\nYou can install `Yugal.JS` a *Single Page App Module* in `Yugal.PHP`.\nRun command below in your project folder.\n\n```bash\nyugal --install https://github.com/sinhapaurush/yugal_spa_lib.git\n```\nThis command will install `Yugal.JS` in your `Yugal.PHP` project.\nFollow steps below to configure Single Page Apps (Yugal.JS) in your project.\n\n- In `index.php` or any landing `Yugal.PHP` file and add another `library` in `meta` function.\n```php\n    meta(\n        array(\n            \"title\"=\u003e\"Yugal App\",\n            ...\n            \"library\"=\u003earray(\n                ...\n                + \"yugal_spa_lib\"\n            )\n        )\n    );\n```  \nIn above code, `...` represents other codes, don't forget to remove `+` sign.\n\n- Use `spa_root()` as code to render to screen.\nExample\n```php\n    $body = spa_root();\n    export_screen($body);\n```\n- Run `create_spa()` after exporting screen to browser and before using `end_doc()`.\nExample\n```php\n    $body = spa_root();\n    export_screen($body);\n    create_spa(); //THIS function IS VERY IMPORTANT\n    end_doc(\n        array()\n    );\n```\nNavigate to [Yugal.JS Documentation](https://spa.yugal.ml) to know how to use Yugal.JS.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsinhapaurush%2Fyugal_spa_lib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsinhapaurush%2Fyugal_spa_lib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsinhapaurush%2Fyugal_spa_lib/lists"}