{"id":19938613,"url":"https://github.com/sectore/mithrilify","last_synced_at":"2025-05-03T14:32:17.245Z","repository":{"id":18392559,"uuid":"21573751","full_name":"sectore/mithrilify","owner":"sectore","description":"Browserify transform for converting Mithril view templates based on msx","archived":false,"fork":false,"pushed_at":"2015-12-09T20:07:56.000Z","size":21,"stargazers_count":38,"open_issues_count":1,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-15T18:04:36.337Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sectore.png","metadata":{"files":{"readme":"README.md","changelog":"HISTORY.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-07-07T14:35:04.000Z","updated_at":"2021-05-08T11:33:10.000Z","dependencies_parsed_at":"2022-08-28T13:40:57.648Z","dependency_job_id":null,"html_url":"https://github.com/sectore/mithrilify","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sectore%2Fmithrilify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sectore%2Fmithrilify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sectore%2Fmithrilify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sectore%2Fmithrilify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sectore","download_url":"https://codeload.github.com/sectore/mithrilify/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252203327,"owners_count":21710944,"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-11-12T23:41:21.200Z","updated_at":"2025-05-03T14:32:16.820Z","avatar_url":"https://github.com/sectore.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mithrilify\n\n[Browserify](http://browserify.org/) [transform](https://github.com/substack/node-browserify#btransformopts-tr)\nfor converting [Mithril](http://lhorie.github.io/mithril/) view templates\nusing [MSX](https://github.com/insin/msx)\n\n[![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][daviddm-url]][daviddm-image]\n\n\n## Install\n\n```bash\n$ npm install --save-dev mithrilify\n```\n\n\n## Usage\n\n### Example of a Mithril view template.\n\nIt can be defined within a `*.js` or `*.msx` file and\nshould include `/** @jsx m */` at the top.\n\n\n```javascript\n'use strict';\n\nvar View = function (ctrl) {\n  return \u003cdiv\u003e\n      hello\n    \u003c/div\u003e;\n};\n\nmodule.exports = View;\n```\n\n### Command line:\n\n```bash\n$ browserify -t mithrilify ./view.js \u003e ./bundle.js\n```\n\n### [Gulp](http://gulpjs.com/) and [gulp-browserify](https://github.com/deepak1556/gulp-browserify)\n\n```javascript\nvar gulp = require('gulp');\n  browserify = require('gulp-browserify'),\n  rename = require('gulp-rename');\n\ngulp.task('bundle', function() {\n  gulp.src('app/scripts/view.js')\n    .pipe(browserify({\n      transform: ['mithrilify']\n    }))\n    .pipe(rename('bundle.js'))\n    .pipe(gulp.dest('build/'))\n});\n```\n\n\n### [Grunt](http://gruntjs.com/) and [grunt-browserify](https://github.com/jmreidy/grunt-browserify)\n\n```javascript\n\nbrowserify: {\n  dist: {\n    files: {\n      'build/bundle.js': 'app/scripts/view.js',\n    },\n    options: {\n      transform: ['mithrilify']\n    }\n  }\n}\n```\n\n\n### Output:\n\n\n```javascript\n'use strict';\n\nvar View = function (ctrl) {\n  return {tag: \"div\", attrs: {}, children: [\n      \"hello\"\n    ]};\n};\nmodule.exports = View;\n```\n\n## Test\n\nClone project:\n\n```bash\n$ git clone https://github.com/sectore/mithrilify.git \u0026\u0026 cd $_\n```\n\nInstall dependencies (only once):\n\n```bash\n$ npm install\n```\n\nRun tests:\n\n```bash\n$ gulp test\n```\n\n## Credits:\n\n* [MSX](https://github.com/insin/msx) for supporting JSX to Mithril  \n* [generator-node-gulp](https://github.com/youngmountain/generator-node-gulp) to create a Node.js module with yo, including gulp and Mocha unit tests.\n\n\n## Contributors\n\n* [magnetised](https://github.com/magnetised)\n* [mkautzmann ](https://github.com/mkautzmann)\n* [Naddiseo](https://github.com/Naddiseo)\n* [shigi](https://github.com/shigi)\n* [sibsibsib](https://github.com/sibsibsib)\n\n\n## Release History\n\n[History](./HISTORY.md)\n\n\n## License\n\nCopyright (c) 2015 Jens Krause. Licensed under the [MIT license](./LICENSE.md).\n\n\n\n[npm-url]: https://npmjs.org/package/mithrilify\n[npm-image]: https://badge.fury.io/js/mithrilify.svg\n[travis-url]: https://travis-ci.org/sectore/mithrilify\n[travis-image]: https://travis-ci.org/sectore/mithrilify.svg?branch=master\n[daviddm-url]: https://david-dm.org/sectore/mithrilify.svg?theme=shields.io\n[daviddm-image]: https://david-dm.org/sectore/mithrilify\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsectore%2Fmithrilify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsectore%2Fmithrilify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsectore%2Fmithrilify/lists"}