{"id":13400863,"url":"https://github.com/snd/react-kup","last_synced_at":"2025-10-22T20:27:31.816Z","repository":{"id":14869943,"uuid":"17593400","full_name":"snd/react-kup","owner":"snd","description":"react-kup is a simple, nonintrusive alternative to JSX for coffeescript","archived":true,"fork":false,"pushed_at":"2016-04-20T11:44:32.000Z","size":69,"stargazers_count":21,"open_issues_count":0,"forks_count":4,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-10-16T07:35:51.453Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"CoffeeScript","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/snd.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"contributing.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-03-10T13:28:38.000Z","updated_at":"2024-01-12T14:54:10.000Z","dependencies_parsed_at":"2022-08-31T00:01:14.331Z","dependency_job_id":null,"html_url":"https://github.com/snd/react-kup","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snd%2Freact-kup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snd%2Freact-kup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snd%2Freact-kup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snd%2Freact-kup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/snd","download_url":"https://codeload.github.com/snd/react-kup/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243537947,"owners_count":20307098,"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-07-30T19:00:56.423Z","updated_at":"2025-10-22T20:27:26.539Z","avatar_url":"https://github.com/snd.png","language":"CoffeeScript","readme":"# react-kup\n\n[![NPM Package](https://img.shields.io/npm/v/react-kup.svg?style=flat)](https://www.npmjs.org/package/react-kup)\n[![Build Status](https://travis-ci.org/snd/react-kup.svg?branch=master)](https://travis-ci.org/snd/react-kup/branches)\n[![Sauce Test Status](https://saucelabs.com/buildstatus/reactkup)](https://saucelabs.com/u/reactkup)\n[![codecov.io](http://codecov.io/github/snd/react-kup/coverage.svg?branch=master)](http://codecov.io/github/snd/react-kup?branch=master)\n[![Dependencies](https://david-dm.org/snd/react-kup.svg)](https://david-dm.org/snd/react-kup)\n\n**[react](http://facebook.github.io/react/)-[kup](https://github.com/snd/kup) is a simple, nonintrusive alternative to [JSX](https://facebook.github.io/react/docs/jsx-in-depth.html) for [coffeescript](http://coffeescript.org/)**\n\n- use all coffeescript features naturally when building a react component's virtual-DOM\n- [tiny single file with just under 100 lines of simple, readable, maintainable code](src/react-kup.coffee)\n- [huge test suite](test/react-kup.coffee)\n  passing [![Build Status](https://travis-ci.org/snd/react-kup.svg?branch=master)](https://travis-ci.org/snd/react-kup/branches)\n  with [![codecov.io](http://codecov.io/github/snd/react-kup/coverage.svg?branch=master)](http://codecov.io/github/snd/react-kup?branch=master)\n  code coverage\n- continuously tested in Node.js (0.12, 4 and 5) and all relevant browsers:\n  [![Sauce Test Status](https://saucelabs.com/browser-matrix/reactkup.svg)](https://saucelabs.com/u/reactkup)\n- supports CommonJS, [AMD](http://requirejs.org/docs/whyamd.html) and browser globals\n- used in production\n- npm package: `npm install react-kup`\n- bower package: `bower install react-kup`\n- no additional build step required\n- no react mixin\n- same concept as [**kup**](https://github.com/snd/kup) (kup is an html builder for nodejs)\n  but builds up nested react elements instead of html strings.\n- supports all tags supported by react\n- [changelog](CHANGELOG.md)\n\n```\nnpm install react-kup\n```\n\n```\nbower install react-kup\n```\n\n``` javascript\n\u003e var reactKup = require('react-kup');\n```\n\n[lib/react-kup.js](lib/react-kup.js) supports [AMD](http://requirejs.org/docs/whyamd.html).  \nsets the global variable `reactKup` when\nneither CommonJS nor\n[AMD](http://requirejs.org/docs/whyamd.html) are available.\n\n```coffeescript\nTodoList = React.createClass\n  render: -\u003e\n    that = this\n    createItem = (itemText) -\u003e\n      reactKup (k) -\u003e\n        k.li itemText\n    reactKup (k) -\u003e\n      k.ul that.props.items.map createItem\n\nTodoApp = React.createClass\n  getInitialState: -\u003e\n    items: ['Buy Milk', 'Buy Sugar']\n    text: 'Add #3'\n  onChange: (e) -\u003e\n    this.setState({text: e.target.value})\n  handleSubmit: (e) -\u003e\n    e.preventDefault()\n    nextItems = this.state.items.concat([this.state.text])\n    nextText = ''\n    this.setState({items: nextItems, text: nextText})\n  render: -\u003e\n    that = this\n\n    reactKup (k) -\u003e\n      k.div -\u003e\n        k.h3 'TODO'\n        k.build TodoList,\n          items: that.state.items\n        k.form {\n          onSubmit: that.handleSubmit\n        }, -\u003e\n          k.input\n            onChange: that.onChange\n            value: that.state.text\n          k.button \"Add ##{that.state.items.length + 1}\"\n```\n\n[look at the tests for additional examples](test/react-kup.coffee)\n\n### [contributing](contributing.md)\n\n### [changelog](CHANGELOG.md)\n\n### [license: MIT](LICENSE)\n","funding_links":[],"categories":["Uncategorized","Awesome React","React [🔝](#readme)"],"sub_categories":["Uncategorized","Tools"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnd%2Freact-kup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsnd%2Freact-kup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnd%2Freact-kup/lists"}