{"id":15649672,"url":"https://github.com/zkat/can.viewify","last_synced_at":"2025-10-04T16:24:06.063Z","repository":{"id":14454635,"uuid":"17166364","full_name":"zkat/can.viewify","owner":"zkat","description":"require() mustache and ejs modules as compiled CanJS views","archived":false,"fork":false,"pushed_at":"2015-01-13T08:41:16.000Z","size":244,"stargazers_count":39,"open_issues_count":1,"forks_count":99,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-30T17:03:35.528Z","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/zkat.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":"2014-02-25T08:30:36.000Z","updated_at":"2025-04-15T15:12:42.000Z","dependencies_parsed_at":"2022-09-16T18:01:55.914Z","dependency_job_id":null,"html_url":"https://github.com/zkat/can.viewify","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zkat%2Fcan.viewify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zkat%2Fcan.viewify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zkat%2Fcan.viewify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zkat%2Fcan.viewify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zkat","download_url":"https://codeload.github.com/zkat/can.viewify/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251748935,"owners_count":21637414,"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-10-03T12:30:48.803Z","updated_at":"2025-10-04T16:24:05.918Z","avatar_url":"https://github.com/zkat.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# can.viewify\n\n[can.viewify](https://github.com/zkat/can.viewify) is a\n[browserify](http://browserify.org/) transform that allows you to `require()`\n`.mustache` and `.ejs` files as precompiled\n[CanJS views](http://canjs.com/docs/can.view.html).\n\n# Quickstart\n\n### Install\n\n    $ npm install can.viewify\n\n### Examples\n\n#### Command Line\n\n```\nbrowserify -t can.viewify main.js -o bundle.js\n```\n\n#### API\n\n```javascript\nvar browserify = require('browserify');\nvar fs = require('fs');\n\nvar b = browserify('main.js');\nb.transform('can.viewify');\n\nb.bundle().pipe(fs.createWriteStream('bundle.js'));\n```\n\n#### package.json\n\nFor packages that include these views, add a browserify transform field to\n`package.json` and browserify will apply the transform to all modules in the\npackage as it builds a bundle. Note that `can.view` must be accessible globally\nin `window`, at runtime.\n\n```\n{\n  \"name\": \"anchor\",\n  \"main\": \"main\",\n  \"browserify\": {\n    \"transform\": \"can.viewify\"\n  }\n}\n```\n\n### Issues\n\n* `can.view` must be present globally in order for these views to work at\n  runtime, otherwise they will return plain strings. In the future, this module\n  will generate modules that explicitly `require('can')` or `require('canjs')`\n  or something of the sort.\n\n### License\n\n`can.viewify` is a public domain work, dedicated using\n[CC0 1.0](https://creativecommons.org/publicdomain/zero/1.0/). Feel free to do\nwhatever you want with it.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzkat%2Fcan.viewify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzkat%2Fcan.viewify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzkat%2Fcan.viewify/lists"}