All Projects â†’ dmotz â†’ Natal

dmotz / Natal

Licence: mit
📲 Bootstrap ClojureScript React Native apps

Programming Languages

clojure
4091 projects
coffeescript
4710 projects
clojurescript
191 projects

Projects that are alternatives of or similar to Natal

Cinf
Command line tool to view namespaces and cgroups, useful for low-level container prodding
Stars: ✭ 389 (-3.71%)
Mutual labels:  cli
Fire Hpp
Fire for C++: Create fully functional CLIs using function signatures
Stars: ✭ 395 (-2.23%)
Mutual labels:  cli
Args
Toolkit for building command line interfaces
Stars: ✭ 399 (-1.24%)
Mutual labels:  cli
Moro
Simple CLI tool for tracking work hours. Note: Heavy changes are happening in this repository. Docs might not be up to date, and things might be broken. Only the released NPM version is stable.
Stars: ✭ 390 (-3.47%)
Mutual labels:  cli
Protolock
Protocol Buffer companion tool. Track your .proto files and prevent changes to messages and services which impact API compatibility.
Stars: ✭ 394 (-2.48%)
Mutual labels:  cli
Bpfd
Framework for running BPF programs with rules on Linux as a daemon. Container aware.
Stars: ✭ 396 (-1.98%)
Mutual labels:  cli
Resume Cli
CLI tool to easily setup a new resume 📑
Stars: ✭ 3,967 (+881.93%)
Mutual labels:  cli
Cli
The Aurelia 1 command line tool. Use the CLI to create projects, scaffold components, and bundle your app for release.
Stars: ✭ 401 (-0.74%)
Mutual labels:  cli
Mri
Quickly scan for CLI flags and arguments
Stars: ✭ 394 (-2.48%)
Mutual labels:  cli
Go Prompt
Building powerful interactive prompts in Go, inspired by python-prompt-toolkit.
Stars: ✭ 4,255 (+953.22%)
Mutual labels:  cli
Pipupgrade
đŸ—Ŋ Like yarn outdated/upgrade, but for pip. Upgrade all your pip packages and automate your Python Dependency Management.
Stars: ✭ 391 (-3.22%)
Mutual labels:  cli
Triage
Interactive command-line GitHub issue & notification triaging tool.
Stars: ✭ 394 (-2.48%)
Mutual labels:  cli
Isogram
Generate Google Analytics tracking code with any isogrammic parameters you like
Stars: ✭ 396 (-1.98%)
Mutual labels:  cli
Beats
A command-line drum machine. Convert a beat notated in YAML into a *.wav file.
Stars: ✭ 389 (-3.71%)
Mutual labels:  cli
Cli
CLI tool for dead-simple serverless Docker deployments on managed Kubernetes services. A self-hosted PaaS. ⚡ī¸
Stars: ✭ 400 (-0.99%)
Mutual labels:  cli
Swaggen
OpenAPI/Swagger 3.0 Parser and Swift code generator
Stars: ✭ 385 (-4.7%)
Mutual labels:  cli
Cpx
A cli tool to watch and copy file globs.
Stars: ✭ 394 (-2.48%)
Mutual labels:  cli
Singel
Single Element Pattern
Stars: ✭ 404 (+0%)
Mutual labels:  cli
Zlsgo
įŽ€å•æ˜“į”¨ã€čļŗ够čŊģ量、性čƒŊåĨŊįš„ Golang åē“ - Easy to use, light enough, good performance Golang library
Stars: ✭ 398 (-1.49%)
Mutual labels:  cli
Cocona
Micro-framework for .NET Core console application. Cocona makes it easy and fast to build console applications on .NET Core.
Stars: ✭ 398 (-1.49%)
Mutual labels:  cli

Natal

Bootstrap ClojureScript-based React Native apps

Dan Motzenbecker, MIT License @dcmotz


Natal is a simple command-line utility that automates most of the process of setting up a React Native app running on ClojureScript.

It stands firmly on the shoulders of giants, specifically those of Mike Fikes who created Ambly and the documentation on setting up a ClojureScript React Native app.

Usage

Before getting started, make sure you have the required dependencies installed.

Then, install the CLI using npm:

$ npm install -g natal

To bootstrap a new app, run natal init with your app's name as an argument:

$ natal init FutureApp

If your app's name is more than a single word, be sure to type it in CamelCase. A corresponding hyphenated Clojure namespace will be created.

By default Natal will create a simple skeleton based on the current stable version of Om (aka Om Now). If you'd like to base your app upon Om Next, you can specify a React interface template during init:

$ natal init FutureApp --interface om-next

Keep in mind your app isn't limited to the React interfaces Natal provides templates for; these are just for convenience.

If all goes well your app should compile and boot in the simulator.

From there you can begin an interactive workflow by starting the REPL.

$ cd future-app
$ rlwrap natal repl

(If you don't have rlwrap installed, you can simply run natal repl, but using rlwrap allows the use of arrow keys).

If there are no issues, the REPL should connect to the simulator automatically. To manually choose which device it connects to, you can run rlwrap natal repl --choose.

At the prompt, try loading your app's namespace:

(in-ns 'future-app.core)

Changes you make via the REPL or by changing your .cljs files should appear live in the simulator.

Try this command as an example:

(swap! app-state assoc :text "Hello Native World")

When the REPL connects to the simulator it will begin to automatically log success messages, warnings, and errors whenever you update your .cljs files.

Tips

  • Having rlwrap installed is optional but highly recommended since it makes the REPL a much nicer experience with arrow keys.

  • Don't press ⌘-R in the simulator; code changes should be reflected automatically. See this issue in Ambly for details.

  • Running multiple React Native apps at once can cause problems with the React Packager so try to avoid doing so.

  • You can launch your app on the simulator without opening Xcode by running natal launch in your app's root directory.

  • By default new Natal projects will launch on the iPhone 6 simulator. To change which device natal launch uses, you can run natal listdevices to see a list of available simulators, then select one by running natal setdevice with the index of the device on the list.

  • To change advanced settings run natal xcode to quickly open the Xcode project.

  • The Xcode-free workflow is for convenience. If you're encountering app crashes, you should open the Xcode project and run it from there to view errors.

  • You can run any command with --verbose or -v to see output that may be helpful in diagnosing errors.

Dependencies

As Natal is the orchestration of many individual tools, there are quite a few dependencies. If you've previously done React Native or Clojure development, you should hopefully have most installed already. Platform dependencies are listed under their respective tools.

Updating Natal

You can get the latest version of Natal by running npm install -g natal again.

Aspirations

  • [x] Xcode-free workflow with CLI tools
  • [x] Templates for other ClojureScript React wrappers
  • [x] Automatic wrapping of all React Native component functions for ClojureScript
  • [x] Automatically tail compilation log and report errors to REPL
  • [ ] Automatically run React packager in background
  • [ ] Working dev tools
  • [ ] Automatic bundling for offline device usage and App Store distribution
  • [ ] Android support
  • [ ] Automatic setup of JS modules

Example apps bootstrapped with Natal

Coda

Contributions are welcome.

For more ClojureScript React Native resources visit cljsrn.org.

If you're looking for a simple ClojureScript wrapper around the React Native API, check out the companion library Natal Shell. It is included by default in projects generated by Natal.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].