{"id":15814352,"url":"https://github.com/austinkelleher/arc-plugin-marko","last_synced_at":"2025-05-07T23:23:28.270Z","repository":{"id":57183207,"uuid":"111713246","full_name":"austinkelleher/arc-plugin-marko","owner":"austinkelleher","description":"Plugin to easily use Marko with arc.codes","archived":false,"fork":false,"pushed_at":"2018-01-22T14:19:23.000Z","size":12,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-12-27T19:39:10.086Z","etag":null,"topics":["architect","aws","aws-lambda","lambda","marko"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/austinkelleher.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}},"created_at":"2017-11-22T17:24:46.000Z","updated_at":"2017-12-28T15:42:04.000Z","dependencies_parsed_at":"2022-09-14T06:10:37.805Z","dependency_job_id":null,"html_url":"https://github.com/austinkelleher/arc-plugin-marko","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/austinkelleher%2Farc-plugin-marko","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/austinkelleher%2Farc-plugin-marko/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/austinkelleher%2Farc-plugin-marko/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/austinkelleher%2Farc-plugin-marko/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/austinkelleher","download_url":"https://codeload.github.com/austinkelleher/arc-plugin-marko/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250430597,"owners_count":21429323,"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":["architect","aws","aws-lambda","lambda","marko"],"created_at":"2024-10-05T04:24:18.175Z","updated_at":"2025-05-07T23:23:28.227Z","avatar_url":"https://github.com/austinkelleher.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# arc-plugin-marko\n\nA plugin for using [Marko](https://github.com/marko-js/marko) with\n[architect](https://arc.codes/).\n\n## Installation\n\nThis plugin contains both build-time code and runtime code, you will need to\ninstall it in the root of your architect project as well as each architect\nroute that will be serving Marko templates:\n\n```bash\nnpm install arc-plugin-marko --save\n```\n\n## Usage\n\n[marko-architect-todomvc](https://github.com/marko-js-samples/marko-architect-todomvc)\nis a fully functioning sample app using this plugin.\n\nInside the `.arc` file inside your project, you will need to specify the `pages`\nproperty, which are the absolute paths to the pages that will be served, and the\n`bucket` property, which a globally unique [AWS S3](https://aws.amazon.com/s3/)\nbucket.\n\n**.arc**\n```\n...\n@plugins\narc-plugin-marko\n  pages ./src/html/get-index/page.marko\n  bucket marko-todomvc-bucket\n```\n\nThen you need to register the runtime code for each page that should be rendered:\n\n**src/html/get-index/index.js**\n```js\nexports.handler = require('arc-plugin-marko/runtime').run({\n  template: require('./page')\n})\n```\n\nExample of a top-level page:\n\n**src/html/get-index/page.marko**\n\n```marko\n\u003c!doctype html\u003e\n\u003chtml\u003e\n  \u003chead\u003e\n    \u003ctitle\u003eMarko + Arc = \u003c3\u003c/title\u003e\n  \u003c/head\u003e\n  \u003cbody\u003e\n    \u003cmy-fancy-button/\u003e\n  \u003c/body\u003e\n\u003c/html\u003e\n```\n\n## Plugin API Configuration\n\nSupported properties that can be passed to the plugin:\n\n* *{Object} options.pages* - [**Required**] Absolute path to all Marko top-level\n  pages to render\n* *{String} options.bucket* - Globally unique [AWS S3](https://aws.amazon.com/s3/)\n bucket name\n* *{Object} options.config* - Custom [Lasso](https://github.com/lasso-js/lasso)\n  configuration\n\n## Plugin Runtime API\n\nAPI for `require('arc-plugin-marko/runtime')`\n\n* **run**(options)\n  * *{Object} options.template* - [**Required**] template module to render\n  * *{Object} options.buildConfig* - Custom [Lasso](https://github.com/lasso-js/lasso)\n    configuration\n  * *{Object} options.data* - Data that will be passed to the Marko template\n  * *{Function} options.onDone* - Callback function to call when the Marko\n    template has finished rendering\n  * *{Function} options.onError* - Callback function to call if the Marko\n    template render failed with an error\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faustinkelleher%2Farc-plugin-marko","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faustinkelleher%2Farc-plugin-marko","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faustinkelleher%2Farc-plugin-marko/lists"}