{"id":15458114,"url":"https://github.com/dmotz/natal","last_synced_at":"2025-04-05T20:01:50.751Z","repository":{"id":57308164,"uuid":"41633552","full_name":"dmotz/natal","owner":"dmotz","description":"📲 Bootstrap ClojureScript React Native apps","archived":false,"fork":false,"pushed_at":"2016-02-11T03:25:10.000Z","size":134,"stargazers_count":404,"open_issues_count":10,"forks_count":116,"subscribers_count":16,"default_branch":"master","last_synced_at":"2025-03-29T19:05:24.375Z","etag":null,"topics":["cli","clojure","clojurescript","react","react-native"],"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/dmotz.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":"2015-08-30T15:33:40.000Z","updated_at":"2025-03-23T09:50:00.000Z","dependencies_parsed_at":"2022-09-09T07:50:17.255Z","dependency_job_id":null,"html_url":"https://github.com/dmotz/natal","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmotz%2Fnatal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmotz%2Fnatal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmotz%2Fnatal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmotz%2Fnatal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dmotz","download_url":"https://codeload.github.com/dmotz/natal/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247393545,"owners_count":20931811,"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":["cli","clojure","clojurescript","react","react-native"],"created_at":"2024-10-01T22:59:04.234Z","updated_at":"2025-04-05T20:01:50.718Z","avatar_url":"https://github.com/dmotz.png","language":"CoffeeScript","funding_links":[],"categories":["CoffeeScript"],"sub_categories":[],"readme":"# Natal\n### Bootstrap ClojureScript-based React Native apps\n[Dan Motzenbecker](http://oxism.com), MIT License\n[@dcmotz](https://twitter.com/dcmotz)\n\n---\n\nNatal is a simple command-line utility that automates most of the process of\nsetting up a React Native app running on ClojureScript.\n\nIt stands firmly on the shoulders of giants, specifically those of\n[Mike Fikes](http://blog.fikesfarm.com) who created\n[Ambly](https://github.com/omcljs/ambly) and the\n[documentation](http://cljsrn.org/ambly.html)\non setting up a ClojureScript React Native app.\n\n\n## Usage\n\nBefore getting started, make sure you have the\n[required dependencies](#dependencies) installed.\n\nThen, install the CLI using npm:\n\n```\n$ npm install -g natal\n```\n\nTo bootstrap a new app, run `natal init` with your app's name as an argument:\n\n```\n$ natal init FutureApp\n```\n\nIf your app's name is more than a single word, be sure to type it in CamelCase.\nA corresponding hyphenated Clojure namespace will be created.\n\nBy default Natal will create a simple skeleton based on the current stable\nversion of [Om](http://omcljs.org) (aka Om Now). If you'd like to base your app\nupon Om Next, you can specify a React interface template during init:\n\n```\n$ natal init FutureApp --interface om-next\n```\n\nKeep in mind your app isn't limited to the React interfaces Natal provides\ntemplates for; these are just for convenience.\n\nIf all goes well your app should compile and boot in the simulator.\n\nFrom there you can begin an interactive workflow by starting the REPL.\n\n```\n$ cd future-app\n$ rlwrap natal repl\n```\n\n(If you don't have `rlwrap` installed, you can simply run `natal repl`, but\nusing `rlwrap` allows the use of arrow keys).\n\nIf there are no issues, the REPL should connect to the simulator automatically.\nTo manually choose which device it connects to, you can run `rlwrap natal repl --choose`.\n\nAt the prompt, try loading your app's namespace:\n\n```clojure\n(in-ns 'future-app.core)\n```\n\nChanges you make via the REPL or by changing your `.cljs` files should appear live\nin the simulator.\n\nTry this command as an example:\n\n```clojure\n(swap! app-state assoc :text \"Hello Native World\")\n```\n\nWhen the REPL connects to the simulator it will begin to automatically log\nsuccess messages, warnings, and errors whenever you update your `.cljs` files.\n\n\n## Tips\n- Having `rlwrap` installed is optional but highly recommended since it makes\nthe REPL a much nicer experience with arrow keys.\n\n- Don't press ⌘-R in the simulator; code changes should be reflected automatically.\nSee [this issue](https://github.com/omcljs/ambly/issues/97) in Ambly for details.\n\n- Running multiple React Native apps at once can cause problems with the React\nPackager so try to avoid doing so.\n\n- You can launch your app on the simulator without opening Xcode by running\n`natal launch` in your app's root directory.\n\n- By default new Natal projects will launch on the iPhone 6 simulator. To change\nwhich device `natal launch` uses, you can run `natal listdevices` to see a list\nof available simulators, then select one by running `natal setdevice` with the\nindex of the device on the list.\n\n- To change advanced settings run `natal xcode` to quickly open the Xcode project.\n\n- The Xcode-free workflow is for convenience. If you're encountering app crashes,\nyou should open the Xcode project and run it from there to view errors.\n\n- You can run any command with `--verbose` or `-v` to see output that may be\nhelpful in diagnosing errors.\n\n\n## Dependencies\nAs Natal is the orchestration of many individual tools, there are quite a few dependencies.\nIf you've previously done React Native or Clojure development, you should hopefully\nhave most installed already. Platform dependencies are listed under their respective\ntools.\n\n- [npm](https://www.npmjs.com) `\u003e=1.4`\n    - [Node.js](https://nodejs.org) `\u003e=4.0.0`\n- [Leiningen](http://leiningen.org) `\u003e=2.5.3`\n    - [Java 8](http://www.oracle.com/technetwork/java/javase/downloads/index.html)\n- [CocoaPods](https://cocoapods.org) `\u003e=0.38.2`\n    - [Ruby](https://www.ruby-lang.org) `\u003e=2.0.0`\n- [Xcode](https://developer.apple.com/xcode) (+ Command Line Tools) `\u003e=6.3`\n    - [OS X](http://www.apple.com/osx) `\u003e=10.10`\n- [Watchman](https://facebook.github.io/watchman) `\u003e=3.7.0`\n- [rlwrap](http://utopia.knoware.nl/~hlub/uck/rlwrap/) `\u003e=0.42` (optional but recommended for REPL use)\n- [react-native-cli](https://www.npmjs.com/package/react-native-cli) `\u003e=0.1.7` (install with `npm install -g react-native-cli`)\n\n## Updating Natal\nYou can get the latest version of Natal by running `npm install -g natal` again.\n\n\n## Aspirations\n- [x] Xcode-free workflow with CLI tools\n- [x] Templates for other ClojureScript React wrappers\n- [x] Automatic wrapping of all React Native component functions for ClojureScript\n- [x] Automatically tail compilation log and report errors to REPL\n- [ ] Automatically run React packager in background\n- [ ] Working dev tools\n- [ ] Automatic bundling for offline device usage and App Store distribution\n- [ ] Android support\n- [ ] Automatic setup of JS modules\n\n\n## Example apps bootstrapped with Natal\n- [Om Next app with Python server](https://github.com/dvcrn/om-react-native-demo)\n  by David Mohl, demonstrated in\n  [a talk at the Tokyo iOS Meetup](https://www.youtube.com/watch?v=oJ8t8Hc9XaE).\n\n- [Zooborns](https://github.com/iamjarvo/zooborns)\n  by Jearvon Dharrie, demonstrated in\n  [a talk at Clojure/conj 2015](https://www.youtube.com/watch?v=GDA-g6Ca_dQ).\n\n\n## Coda\nContributions are welcome.\n\nFor more ClojureScript React Native resources visit [cljsrn.org](http://cljsrn.org).\n\nIf you're looking for a simple ClojureScript wrapper around the React Native API,\ncheck out the companion library [Natal Shell](https://github.com/dmotz/natal-shell).\nIt is included by default in projects generated by Natal.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmotz%2Fnatal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdmotz%2Fnatal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmotz%2Fnatal/lists"}