Codeblog CLI lets you turn React components into something anyone can use with no code.
For example, this confetti button is a React component published with Codeblog's CLI.
Since it's on Codeblog, I can use it without coding:
I just type "Conf" – I don't even have to type "Confetti Button" – and I get a confetti button in this post. And, I can change the colors of the confetti button to be whatever I want (also, with no coding).
I didn't have to import anything. There was no build, install, or configuration step. There was no development server. I didn't even to write JSX. I just typed "Conf", pressed enter, and a confetti button appeared.
When you publish a component on Codeblog, anyone else can use it immediately. It shows up in search, like any other component.
Code from your own text editor and debug/test it on https://codeblog.com/write. As you edit, Codeblog instantly reloads your component.
When you're happy with your component, run codeblog publish and anyone else on Codeblog will be able to find and use your component.
Installing Codeblog CLI
Installing the CLI is absolutely not required to use components – just to build them.
Before we get started, you'll need to you have Node.js (v8+) installed.
To install the CLI, run the following command in your terminal
npm install -g codeblog
Make a new component
codeblog new HelloCodeblog
After you enter a filename, this will create two files in the current directory:
The first file is your code. The second file is the metadata required for Codeblog to know how to use your component. You might not need to mess with the second file.
Immediately after creating the files, it will open the files in your text editor and then run codeblog dev for you, kicking off the development server.